maplibre / maplibre-gl-js

MapLibre GL JS - Interactive vector tile maps in the browser
https://maplibre.org/maplibre-gl-js/docs/
Other
6.06k stars 665 forks source link

Allow invalidating tile-cache for individual tiles #3701

Open Schlepptop opened 5 months ago

Schlepptop commented 5 months ago

User Story

As a developer, I can force a map update for a tile if my tileserver notifies me of a change.

Rationale

Impact

Developers use hacky alternatives such as the ones listed in https://github.com/mapbox/mapbox-gl-js/issues/2633 that may or may not work, and seem to clear the map while the new (and old!) tiles are being re-loaded.

HarelM commented 5 months ago

Invalidating a single tile might prove very problematic, having said that, if you want to dig into the code and find the right way to do it, and open a PR with the relevant design and limitations it would be great!

Schlepptop commented 5 months ago

Invalidating a single tile might prove very problematic, having said that, if you want to dig into the code and find the right way to do it, and open a PR with the relevant design and limitations it would be great!

Which issues do you see that might arise?

HarelM commented 5 months ago

IDK, invalidating only part of the cache always seems risky to me, I might be pessimistic, but go ahead and try it out :-)