Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Empty map tails when return to same route #608

Closed
beerline opened this issue May 4, 2020 · 6 comments · Fixed by #609 or #715
Closed

Empty map tails when return to same route #608

beerline opened this issue May 4, 2020 · 6 comments · Fixed by #609 or #715
Labels
bug This issue reports broken functionality or another error

Comments

@beerline
Copy link

beerline commented May 4, 2020

Hi flutter_map team!

In examples, if you try to open same route the map widget show no tiles, until you trying to move or zoom map. See screen cast.

Any ideas how it can be fixed?

2020-05-04 23-58-06

@enrimon15
Copy link

enrimon15 commented May 6, 2020

I have the same problem. I have seen that if you use pushReplacementNamed('your route') this problem doesn't show up, but if you just use pushNamed('your route') it doesn't work. Is there a method to make the map work with pushNamed?
I'm on Flutter web so i need to use pushNamed instead of pushReplacementNamed

@beerline
Copy link
Author

beerline commented May 6, 2020

@enrimon15, thank you. I will try to use it as workaround

@johnpryan johnpryan added the bug This issue reports broken functionality or another error label May 6, 2020
maRci002 added a commit to maRci002/flutter_map that referenced this issue May 6, 2020
@maRci002 maRci002 mentioned this issue May 6, 2020
@matthwfalk
Copy link

In my implementation the problem with pushReplacementNamed('route') also shows up. I am not able to get it running after route state changes.

pushReplacement() - not working
pushReplacementNamed() - not working
popAndPushNamed() -not working

Any suggestions?

@enrimon15
Copy link

@matthwfalk try to put tileProvider: NonCachingNetworkTileProvider(), in TileLayerOptions. Or you can try with pushNamedAndRemoveUntil

@matthwfalk
Copy link

matthwfalk commented May 7, 2020

I found a workaround that works for me.

To make clear what I am trying to implement (Weather Radar):

  • Loading a base map from MapBox
  • Adding dynamic WMS layer tiles from local weather service on top of it
  • Changing the dynamic WMS layers on button click

This all works fine if I use the code from this commit:

  flutter_map:
    git:
      url: https://github.com/johnpryan/flutter_map.git
      ref: 3b6944343eab0805c08c857db55d9a3b125666b3

Also the problem mentioned above does not exist with this state of code.

The next commit is not working as expected. I think its all about the caching of image data in flutter.

Maybe we can fix that in the upcoming version :)

@maRci002
Copy link
Contributor

maRci002 commented Aug 4, 2020

PR #715 fix the issue without tricking with Navigator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue reports broken functionality or another error
Projects
None yet
5 participants