Search code examples
leafletvector-tiles

How to redraw vector tiles without cleaning cache?


I have vector tiles layer, and i want to redraw this layer, but i want to save my cached data. So i can't use leaflet function redraw() because this is deleting me my cache.

Is there any function to do this? I only want do draw this tiles again without any calculations, because they are made earlier.


Solution

  • So i found an answer. It's probably good. if our vector tiles layer is called tileLayer, then we can simple write this:

    tileLayer._reset();
    tileLayer._update();