Thread: [SailfishOS] Mapbox GL Native QML plugin
View Single Post
Posts: 58 | Thanked: 223 times | Joined on Apr 2017 @ Germany
#48
Originally Posted by rinigus View Post
You are very close. You are just missing definition of the source - "source_name".
Thanks, somehow I overlooked that.
There were some other small bugs, but now it works:
Code:
map.addSourcePoint("source_name",  QtPositioning.coordinate(51.9854, 9.2743));
map.addImagePath("image", Qt.resolvedUrl("./images/position-circle-blue.png"));

map.addLayer("image_layer", {"type": "symbol", "source": "source_name"});
map.setLayoutProperty("image_layer", "icon-image", "image");
map.setLayoutProperty("image_layer", "icon-size", 1.0 / map.pixelRatio);
map.setLayoutProperty("image_layer", "visibility", "visible");
 

The Following 5 Users Say Thank You to jdrescher For This Useful Post: