Thread: [SailfishOS] Mapbox GL Native QML plugin
View Single Post
Posts: 58 | Thanked: 223 times | Joined on Apr 2017 @ Germany
#42
@rinigus another question:
on double tap on the map I want to zoom in and center the map at this position. Problem is the fitView does not work. I tried:
Code:
onDoubleClicked:
            {
                console.log("onDoubleClicked: " + mouse)
                map.setZoomLevel(map.zoomLevel + 1, Qt.point(mouse.x, mouse.y) );
            }
            onDoubleClickedGeo:
            {
                console.log("onDoubleClickedGeo: " + geocoordinate);
                map.fitView(geocoordinate);    //TODO: does not work!
            }
I have also problems with fitView if I want to center on a specific coordinate, it just does not work:
Code:
map.fitView(QtPositioning.coordinate(51.9854, 9.2743));  //TODO does not work!
 

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