PDA

View Full Version : Display infos of an object on Map



hoanghua
3rd September 2011, 18:54
Hi all,

I'm working on a small application on both Qt C++ and QML in which we need to display list of locations on a map. When user clicks on a location, I'll show a rectangle containing infos of that location.

So far, we're able to achieve this by subclassing QGraphicsGeoMap to add and display locations on map, detect the clicking event on certain location. Using this event and params, I display a QML object (with higher z value to display on top of the map) to show the extra infos. However, there are also other elements on the screen which make the z value become a mess (like an element should be above QML object to display extra info, but z value must be below the map). Please see the screenshot for easier understanding

6818

With this problem, I'm thinking that I need to use let Qt C++ code to handle the display of locations infos. I've tried to use QGeoMapTextObject to display the text inside another QGeoMapRectangleObject, but seems that text rendered by QGeoMapTextObject is not smooth at all which looks quite bad.

Can anyone please provide any help?

Thank all for spending time reading this.