Thread: [SailfishOS] Mapbox GL Native QML plugin
View Single Post
Posts: 52 | Thanked: 195 times | Joined on Apr 2017 @ Germany
#77
Originally Posted by rinigus View Post
When this happens, the client programs would have to enable layout properties for the symbols that they wish to keep always visible
I am working on making my app compatible to the new requirements. Just to make sure that I do it right, here is an example:
Code:
//This is the first data point, draw the start icon
map.addSourcePoint("pointStartImage",  trackLoader.trackPointAt(i));
map.addImagePath("imageStartImage", Qt.resolvedUrl("../img/map_play.png"));
map.addLayer("layerStartLayer", {"type": "symbol", "source": "pointStartImage"});
map.setLayoutProperty("layerStartLayer", "icon-image", "imageStartImage");
map.setLayoutProperty("layerStartLayer", "icon-size", 1.0 / map.pixelRatio);
map.setLayoutProperty("layerStartLayer", "visibility", "visible");
map.setLayoutProperty("layerStartLayer", "icon-allow-overlap", true);
 

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