Thread: [SailfishOS] Mapbox GL Native QML plugin
View Single Post
Posts: 1,414 | Thanked: 7,547 times | Joined on Aug 2016 @ Estonia
#78
Originally Posted by jdrescher View Post
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:
It looks fine. You don't need to specify "visibility" since its visible by default anyway
(https://www.mapbox.com/mapbox-gl-js/...bol-visibility). However, its a good idea to allow overlap in this case, since you change the default (https://www.mapbox.com/mapbox-gl-js/...-allow-overlap). So, the code would be:

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", "icon-allow-overlap", true);
 

The Following 3 Users Say Thank You to rinigus For This Useful Post: