Thread: [SailfishOS] Mapbox GL Native QML plugin
View Single Post
Posts: 58 | Thanked: 223 times | Joined on Apr 2017 @ Germany
#46
I'm sorry, but I have an other question.
I want to place an image on the map. I looked into the api and also in the sources of poor maps GL and came up with this:
Code:
map.addImagePath("image", Qt.resolvedUrl(app.getIcon("./images/position.png")))

map.addLayer("image_layer", {"type": "symbol", "source": "source_name"});
map.setLayoutProperty(constants.layerStill, "icon-image", "image");
map.setLayoutProperty(constants.layerStill, "icon-size", 1.0 / map.pixelRatio);
map.setLayoutProperty(constants.layerStill, "visibility", "visible");
There is no error but also no icon on the map. It's also unclear where do I have to put the coordinates?
 

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