-
Notifications
You must be signed in to change notification settings - Fork 69
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
improve visual while tiles are loading #2
Comments
Heya. I think I had similar problems with my original version. There seemed to be 2 main causes, 1) was obviously nothing to show :). The 2nd one was sometimes flutter seemed to miss several frames between swapping in the transparent image fallback It felt like a swap in widget "types" was the cause (as thought it couldn't transition nicely from a canvas to an image or back), and I ended up with some convoluted solution holding back the old tile canvas. It almost felt like I was having a backup for the transparent tile :D. I'm not sure what entirely to suggest there (I got around it with my own separate system, rather than within the current tile system). So just out of interest, I ended up giving up on the whole flutter_map tile loading and doing my own. I always felt like I was fighting it too much (but I also feel this strays from leaflet design so you may not like that approach). I may be straying though, and missed what the problem is in your case. I didn't like the idea of pinchzooming when having to draw backup canvas (and redrawing the paths), and the current paths, it felt too much, so I tried to come up with a solution that only loaded desired tiles if necessary. In the latest version I also swapped from multiple separate tile canvases to one large canvas which is full screen (+ allow for rotation), and simply drawing direct onto that canvas. Juries out which is the better setup, but I prefer to work with this method. Note, you can also draw images onto the canvas, so you can draw normal raster tiles onto the canvas as well! Works pretty much as well as the normal method for raster tiles and you don't need positioned Widgets etc. Just as an aside, I think when I looked at the last version there were hairline gaps between the tiles. I think I had similar, which was typically either anti-aliasing needed turning off, or rounding on the tile/canvas positioning. |
Thanks for the ideas
I'm tracking this as issue #4 |
Done. |
A mechanism is present to use alternative tiles if the needed tile isn't available, however it's not reliable. While zooming there is occasionally a missing tile which results in a flash of background color to the user. The alternative selection relies on map coordinates, zoom and scale factor. Occasionally when a tile is present in the cache with the appropriate coordinates, it is missed.
The text was updated successfully, but these errors were encountered: