<div dir="ltr"><div><div><div><div><div><div>Hi guys (and gals),<br><br></div>I'm trying to populate a map with marker based on a model.<br><br></div>I wanted to do this <br><br>Map {<br>        id: stationsMap<br>        anchors.fill: parent<br>

        plugin: nokia<br>        center: currentLocation.coordinate<br>        zoomLevel: stationsMap.maximumZoomLevel - 7<br>        gesture.enabled: true<br><br>        Repeater {<br>            model: myModel<br>            delegate: Marker {<br>

                coordinate: QtPositioning.coordinate(latitude, longitude)<br>            }<br>        }<br>}<br><br></div>Each entry in my model contains a latitude and longitude property<br><br></div>Here is Marker.qml<br>

<br>import QtQuick 2.0<br>import QtLocation 5.0<br><br>MapQuickItem {<br>    property string type: "station"<br><br>    sourceItem: Image {<br>        id: marker<br>        source: type == "station" ? "../images/bikster-marker.png" : "../images/you-marker.png"<br>

    }<br>    anchorPoint.x: marker.width/2<br>    anchorPoint.y: marker.height<br>}<br><br></div>Can somebody tell me what I'm doing wrong or the right way to dynamically add markers to my map ?<div class=""><div id=":1m5" class="" tabindex="0">
<img class="" src="https://mail.google.com/mail/u/0/images/cleardot.gif"></div></div><span class=""><font color="#888888"><br><br></font></span></div><span class=""><font color="#888888">Antoine</font></span></div>