QML Map and MapObjects
Jano last edited by
I'm using Qt mobility.location 1.1 plugin.
Let me explain my scenario:
My mobile application show Map and current location. POIs are retreived from one service API through network request. So i created one model and each POI contains latitude and longitude ( and some other informations that are not needed on Map view.).
I want to dynamically load/show all those POIS in my Map view ( pois have differend icons. ) I also want to take action when user clicks on one POI on the map. Zoom and moving is also enabled on map view.
NOTE: Model of POIS is not created for Map view but for listview, but there are all data that are needed for show POIs on the map.
What i tried:
Tried to dynamically load MapObjects (MapImage) to te map ( Qt.createQmlObject ). But issue is that image ( icon ) is not shown if i set external source ( http://www.test.com/myimage.png ). It works only if i set image from Resources and i don't know how to make them clickable aswell?
I also tried to paint QML Elements (Rectangles, Image,) just on the map view, but this require some calculating so that all pois are correctly shown when moving/zooming/rotating etc.. I just wan't to avoid this.
Should i create LandMarkModel just to show MapObjects?
Many thanks for any suggestions,examples.. any kind of help.
conny last edited by
Just for future references, I think the solution is posted here: