How can I implement tile scrolling in Google Maps in Qt?

I am using Qt / C ++ and trying to draw a large and complex QGraphicsScene. When I add a lot of objects, panning and zooming become unpleasantly slow. (Of course, there is nothing surprising here). I played with caching device coordinates (helps with panning to a point) and minimal updates to the viewport, etc., but in the end there are too many objects. What I would like to do is draw elements asynchronously due to user interface control. In other words, as with Google Maps, I want to pan and zoom and let the drawing get as fast as possible, but be able to pan again before the elements finish drawing.

One of the methods I'm trying to do is create two QGraphicsScenes. One has real objects, but it is not tied to QGraphicsView. Another QGraphicsScene is connected to a QGraphicsView, but it just has some tiled QPixmaps the size of which covers the screen. The plan is to use processor spare cycles to update any pixel pixel map that it needs. It seems like this will give me the necessary control over the rendering (so I don’t need to block the re-rendering of the entire visible scene). Thoughts? Has anyone implemented this?

+6
c ++ qt qgraphicsview
source share
1 answer

Take a look here: Creating content in streams .

It sounds like what you are trying to do. Tile mechanisms are very common ways to load large amounts of data. Other than the link, I have not seen a simple example using QGraphicsView .

40,000 Chips also shows some things about managing large amounts of data.

+3
source share

All Articles