Coder Social home page Coder Social logo

Refresh map tiles about mapview HOT 7 CLOSED

p-lr avatar p-lr commented on June 25, 2024
Refresh map tiles

from mapview.

Comments (7)

aurelientymate avatar aurelientymate commented on June 25, 2024 1

I used your method, destroying the map and add a new one with the same id works for me. Thank you for your help.
Great job on this lib

from mapview.

p-lr avatar p-lr commented on June 25, 2024

Hi, I'd like to better understand your need.
At some point, the tiles change even when not panning or zooming, and you'd like to trigger a reload of all visible tiles. Is that correct?
This is something that could be implemented in a future version.

from mapview.

aurelientymate avatar aurelientymate commented on June 25, 2024

Yes, i would like to refresh all visible tiles on button click. As if on a real map, you would like to go from plan to satellite view for example.

from mapview.

p-lr avatar p-lr commented on June 25, 2024

I see. I do the exact same thing in my own trekking app. Do do that, I destroy the existing MapView and add a new one to the view hierarchy using the same id. This way, new tiles are displayed while the new MapView has its state automatically restored using the state (zoom, pan) of the former MapView.

So, what I'm saying is: it's already possible using a not-so-handy technique.
A redrawTiles() would be handy, and I'll see what I can do.

from mapview.

p-lr avatar p-lr commented on June 25, 2024

@aurelientymate
Hi, FYI the new 2.1.6 version has a redrawTiles() method on MapView that should work as you expect.

from mapview.

aurelientymate avatar aurelientymate commented on June 25, 2024

It works perfectly, exactly what i needed. Great job ! Thanks 👍

from mapview.

p-lr avatar p-lr commented on June 25, 2024

Thanks for the feedback!

from mapview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.