Thursday, 6 April 2017

javascript - How to get a Leaflet app with a big GeoJSON file to work on mobile devices?


I have a leaflet app which displays a GeoJSON file as a layer. It works fine in the web browser. On the mobile browser it starts up, but quits after panning around on the map. I think the reason for that is that the GeoJSON file is too big (806kb). What kind of options do I have to get this to work on mobile?

























Bike Garage









Answer



It turned out, that clustering actually helps a lot. I set the disableClusteringAtZoom to 19. This way it doesn't break anymore. The many individual points are clustered in one point until zoom level 19. The mobile browser seams to handle this better than having many individual points.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...