melowntech / vts-browser-js

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

Slow rendering of points #107

Open mghildiy opened 6 years ago

mghildiy commented 6 years ago

Hi,

I am making use of VTS browser to render around 9k 3D points by reading GeoJSON data from a rest service. Every point is a Point feature. And I am defining my style icon as:

    'bitmaps': {
        'icons': 'http://maps.google.com/mapfiles/kml/shapes/placemark_circle.png'

Rendering is quite slow.

Is it down to use of .png or because all of the points are Point feature?

davidmtech commented 6 years ago

Hi,

.png does not affect rendering speed in any way. Its more difficult to determine cause without seeing application, but in general terms, rendering of large amount of points can be slow. We usually try to render as many features in one rendering call as possible, but in case of points it is more difficult and we usually render each point separately and that can be slow for large amount of points. You can speed up rendering by rendering only those points which are up to certain distance from the camera. You can do it by "visibility", property in the styles. More about styles can be found there:

https://github.com/Melown/vts-browser-js/wiki/VTS-Geodata-Format#geo-layer-styles-structure

mghildiy commented 6 years ago

May be using MultiPoint instead of Point feature would help...