flutter_map icon indicating copy to clipboard operation
flutter_map copied to clipboard

Show old tiles until new ones are downloaded

Open vinicentus opened this issue 8 years ago • 52 comments

When a user zooms in enough, new, more zoomed in tiles are loaded and displayed. Would it be possible to show the images of the current layer until the new pictures are loaded instead of just showing a grey map while the new tiles are loading?

vinicentus avatar Jul 30 '18 15:07 vinicentus

Yes, we should always keep the old tiles on the screen when zooming.

johnpryan avatar Sep 14 '18 16:09 johnpryan

I have this issue too, When it's going to be fixed?

imaNNeo avatar Oct 28 '18 09:10 imaNNeo

Unfortunately, I don't have an estimate on when I'll have time to fix this

johnpryan avatar Oct 29 '18 17:10 johnpryan

That said, we accept pull requests!

johnpryan avatar Oct 29 '18 17:10 johnpryan

What is the work required here?

csjames avatar Nov 01 '18 15:11 csjames

I have this issue too, when the scrolling happens the tiles which are loading turn white which is bad UX

aswinmohanme avatar Nov 01 '18 17:11 aswinmohanme

I think this will require some additional investigation into Leaflet's tile fetching strategy. I assume it eagerly loads the tiles at the surrounding zoom levels

johnpryan avatar Nov 01 '18 22:11 johnpryan

Just glancing over the code I think we can use the placeholder field on the FadeInImage with the previously loaded tile, if we can pass in the old coords right ?

aswinmohanme avatar Nov 02 '18 02:11 aswinmohanme

I have the same issue, the usability is not good.

ganisback avatar Dec 11 '18 01:12 ganisback

Yes, we should really try to fix this, it shouldn't be too hard. I can't make any promises but if I have time I could look into doing what @aswinmohanme suggested.

vinicentus avatar Dec 11 '18 05:12 vinicentus

Guys you can use google_maps_flutter (Google Supported Officially) instead. It is made alongside flutter release v1.0.

imaNNeo avatar Dec 11 '18 06:12 imaNNeo

@imaNNeoFighT flutter_map has also great advantages towards google_maps_flutter or is it already possible that each marker on the map is also a widget?

RaimundWege avatar Dec 11 '18 08:12 RaimundWege

@RaimundWege I think it's not possible to put a widget as a marker, And maybe it is Google policy to prevent it because also in android you can't directly put a View as Marker on GoogleMap, And in android to achieve this we had to use a projection that supported by GoogleMap that converts latitude, longitude to screen pixel position, maybe in future, this functionality added to FlutterGoogleMap (or maybe it exists already).

imaNNeo avatar Dec 11 '18 09:12 imaNNeo

@johnpryan @vinicentus did you find a good solution to resolve this usability issue? really hope this can be fixed.

ganisback avatar Dec 17 '18 13:12 ganisback

@ganisback I really haven't had the time to look into this...

vinicentus avatar Dec 17 '18 14:12 vinicentus

I've possibly got a workaround to help with the grey screen on zoom level changes, where I keep cached tiles for a small amount of time by default (eg 1 second), and doesn't let pruneTiles remove a tile until that amount of time has passed. It feels like it works ok for me, it's not perfect, but would be happy for someone to test it further. I've got the tile_layer.dart file edited from a git clone, added/committed. Not sure what's best for someone to look at, a git push origin master, or a merge or something ? (I'm not familiar with git).

ibrierley avatar Dec 19 '18 15:12 ibrierley

@ibrierley you can fork the repo, push your changes to that, and make a pull request

johnpryan avatar Dec 22 '18 15:12 johnpryan

Thanks John, I figured it yesterday and created a pull request https://github.com/johnpryan/flutter_map/pull/190 . Good practice for me!

ibrierley avatar Dec 22 '18 15:12 ibrierley

This is the highest-voted issue, so it's next on the agenda, but I haven't found anyone interested in working on it yet.

johnpryan avatar Jul 29 '19 16:07 johnpryan

As someone interested in this feature, but without any experience developing flutter packages, this issue seems quite daunting.

Perhaps @johnpryan or anyone experienced with this package can give a general description of the best way to implement it and someone else can actually implement it.

I'm willing to do it, I just have no idea where to start :)

Ishadijcks avatar Aug 05 '19 09:08 Ishadijcks