I have a Leaflet map with a GeoJSON Tile Layer and a custom backend for serving geoJSON tiles. The geometries returned from the backend are simplified depending on the zoom level, but within certain bins of zoom levels (1-3, 4-6, etc) the geometries are identical. Right now, new tiles will be fetched for every single zoom level, and I was wondering whether there is a way to reuse tiles when going to a zoom level within the same bin. This would decrease the server load and reduce flickering when zooming in or out.

For example: when going from zoom level 4 to zoom level 5, no new tiles should be fetched and the existing tiles should be stretched. Likewise, when going from zoom level 5 to zoom level 4, the existing tiles should be kept and additional tiles should be fetched to complete the map.

Any thoughts?

  • I am not sure if it could apply, but if there an event to handle like zoom-change or so that you may intercept, check the current and new zoom levels, and then cancel or let the operation go? I can do it in WPF with another GIS library. – Branco Jun 24 '15 at 12:51

May be It depends up on back end for serving geojson. Just it varies for different back end serving capabilities. Just change the serving back end and observe the result. In leaflet the layer is load once from the back end and we can do more functionalities available for manipulating the layer.

| improve this answer | |
  • this doesn't really answer the question and may be better as a comment on the question – Ian Turton Jun 24 '15 at 15:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.