Reputation: 2171
My question is about updating the data in leaflet. Let's assume that we have geojson which we are changing into vector tiles using geojson-vt.js and displaying it on the leaflet map. Similiary as there: geojson-vt example
Then i'm receiving an event / notifiaction that some linestring was changed, for example thise linestrings have a attribute color, which is using when displaying data, and this value has changed.
Then i want to update my map, but i dont want to recalculate, and redraw all tiles, but only this tiles where was change. How to do that?
Upvotes: 0
Views: 924
Reputation: 19069
It cannot be done. geojson-vt
only allows for creating new geojson-vt
instances, not updating them. Updating data in the internal structures is too complicated, and doesn't give any big advantages. This also means it's not possible to get a list of changed tiles, or even a list of tiles containing the updated geometry.
If this is really critical for your application, consider studying the code for geojson-vt
for yourself, and proposing a solution.
If you have a set of static features and a set of possibly-changing features, consider making separate holders for them.
Upvotes: 2