SpatialServer/Leaflet.MapboxVectorTile

A note for software archeologists - working with Leaflet 0.77 and vector tiles in production

Opened this issue · 0 comments

For anyone reading this: chances are that for some reason you're still using Leaflet 0.77 and looking for a more performant way to display lots of points or similar in a piece of legacy software (of course you considered upgrading to Leaflet >1 but you can't for some reason).

We were facing this exact challenge. This plugin is the only one we found that actually works! We do use it in a piece of legacy software with Postgres and a tile server plugin and are quite happy with it after all. It's performant and the only issues we have with it are the below:

  • On the edges of the tiles, the displayed elements (e.g. points) are cut off. But it's a minor inconvenience and only happens when the geometries are bigger than the tiles or right on the edges.
image
  • When the IDs in the data are not unique, tooltips behave weirdly. Just keep this in mind.
  • You need to use the custom style syntax and obviously cannot use modern JSON-based vector tile styles like this

Maybe this note will save someone some time and energy at some point. If so, feel free to let me know about your project 😄