vts-browser-js icon indicating copy to clipboard operation
vts-browser-js copied to clipboard

Different style for each point in PointArray

Open alam-R opened this issue 6 years ago • 3 comments

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!

alam-R avatar Oct 16 '18 11:10 alam-R

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?

davidmtech avatar Oct 16 '18 12:10 davidmtech

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?

alam-R avatar Oct 16 '18 12:10 alam-R

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.

davidmtech avatar Oct 19 '18 15:10 davidmtech