melowntech / vts-browser-js

JavaScript WebGL 3D map rendering engine
BSD 2-Clause "Simplified" License
218 stars 42 forks source link

Different style for each point in PointArray #122

Open alam-R opened 5 years ago

alam-R commented 5 years ago

Hi,

We use this method in order to fill geodata object with features: geodata.addPointArray(coordsArray, 'fix', 'some-points');. By using the above method we can define a property object per Point Array. Later we can use the property in style filter to allocate a style for all points in this array. We would like to have a different style for each point in point array. Is this possible? We have tried to use addPoint method for the same purpose but the rendering becomes very slow for thousand points.

Thank you in advance!

davidmtech commented 5 years ago

Hi, different style for each point in PointArray is not supported and probably will no be in near future. It its more probable that some optimizations for single points will be applied. Which style properties do you change?

alam-R commented 5 years ago

We would like to change color of placemark_circle.png according to a custom value property per point. Could we apply some kind of optimization for single points geodata in order to increase speed? Do you know the reason that pointArray is so faster than single point?

davidmtech commented 5 years ago

Reason for why is pointArray faster than single point is that in case of pointArray are all points rendered at once. In case of single point, every point is rendered separately, but each one can have different properties (color, ... etc.). It possible to do some optimization and group some point during rendering, but it is possible in very specific cases. These optimizations are not implemented yet.