Well I was actually able to do what I want with MapItemView.
On Thu, Nov 28, 2013 at 3:52 AM, Antoine Reversat <a.rever...@gmail.com>wrote: > Hi guys (and gals), > > I'm trying to populate a map with marker based on a model. > > I wanted to do this > > Map { > id: stationsMap > anchors.fill: parent > plugin: nokia > center: currentLocation.coordinate > zoomLevel: stationsMap.maximumZoomLevel - 7 > gesture.enabled: true > > Repeater { > model: myModel > delegate: Marker { > coordinate: QtPositioning.coordinate(latitude, longitude) > } > } > } > > Each entry in my model contains a latitude and longitude property > > Here is Marker.qml > > import QtQuick 2.0 > import QtLocation 5.0 > > MapQuickItem { > property string type: "station" > > sourceItem: Image { > id: marker > source: type == "station" ? "../images/bikster-marker.png" : > "../images/you-marker.png" > } > anchorPoint.x: marker.width/2 > anchorPoint.y: marker.height > } > > Can somebody tell me what I'm doing wrong or the right way to dynamically > add markers to my map ? > > > Antoine >
_______________________________________________ SailfishOS.org Devel mailing list