raptorswing / MapGraphics

A tile-based "slippy map" library written in/for C++/Qt. It's meant to enable C++/Qt developers to easily add nice, interactive maps to their applications. Supports zooming, rotating, interactive custom map objects, transparency, etc. It is a Qt map widget that can use tiles from MapQuest, Openstreetmap, or a custom source you define.
Other
163 stars 77 forks source link

Map Flicking #29

Open muby opened 2 years ago

muby commented 2 years ago

First of all : Your work is so nice, and so performant ! well done !

When you zoom In and Zoom Out, there is a flicking (white screen) appear very quickly and it so strange. I try to remove it without success, and I would like to know if you have any tips to try removing it ?

In fact, what i would like is to let the previous _tileobjects shown util the new set is ready to be painted. I hope you see what i mean :)

Thanks a lot

raptorswing commented 2 years ago

Hi,

Thanks, I'm glad you like it.

I think the flickering you're observing is the tiles displaying "Loading" very briefly before their tile has been retrieved for the new zoom level. https://github.com/raptorswing/MapGraphics/blob/0cf9af2104f545b3ec279772ef582feae304c4d1/MapGraphics/guts/MapTileGraphicsObject.cpp#L53-L56

If you just want tiles to keep displaying their old image until the new one is ready, it would be a matter of doing some refactors in https://github.com/raptorswing/MapGraphics/blob/0cf9af2104f545b3ec279772ef582feae304c4d1/MapGraphics/guts/MapTileGraphicsObject.cpp. You'd need to keep the old _tile around until the new one is retrieved instead of deleting it as soon as a new one is requested.