I am currently using Leaflet shapfile as a source of my data.
When the shapefile [30MB] contains 1 big layer (Feature is big with many coordinates | A whole big polygon), the UI still working but loads very long.
When the shapefile [20MB] contains multiple layers (Many Polylines, Polygons markers | Multiple Features), the UI already freezes upon load.
Is there any work around on this like load only what is visible on the map view port so performance issue will be addressed? Is this possible?
Map with shapefile:
Best Answer
It seems that there is no direct way to speed up leaflet rendering. Its just too difficult for the browser to render dozens of thousands of objects. There are some ways to improve performance though:
preferCanvas
to true (link to docs). People say it speeds up polylines rendering comparing to the default SVG renderer.