iTowns / itowns

A Three.js-based framework written in Javascript/WebGL for visualizing 3D geospatial data
http://www.itowns-project.org
Other
1.1k stars 298 forks source link

[Proposal] Improve style point option #2224

Open a-dutremble opened 11 months ago

a-dutremble commented 11 months ago

Context

Currently, the style of the point is always a circle when we using the point parameter in style.option. When you want to change the shape of the point, you have to use the style.icon parameter. But icons are linked to a LabelLayer and have the same characteristics. This means that sometimes certain points disappear as they overlap on the map for example.

Expected behavior

We expect to have access to basic shapes such as squares, crosses, triangles and so on. In addition, it would be preferable to manage custom shapes as a point option and not by using the icon option.

Proposal

There are two proposals in this problem:

These two options can use the same principle by being constructed with CanvasRenderingContext2D as was done for the circle.

Discussion

I'm not sure I understand 100% how the style rendering works. I'm just opening a discussion to improve how it works now.