diff options
author | Arseniy Movshev <dodoradio@outlook.com> | 2022-11-27 12:38:32 +0000 |
---|---|---|
committer | Arseniy Movshev <dodoradio@outlook.com> | 2023-01-07 14:51:58 +0000 |
commit | de2b3d293d97eb85dc920e6facec684e79c69d43 (patch) | |
tree | cc71c7f5acc537d6b74b64535bdb7d72c51c2fa0 /src/MainMapView.qml | |
parent | d6bd9347a59df2808676a549ba81df12ecfc2d3d (diff) |
Add functionality to center view button
Diffstat (limited to 'src/MainMapView.qml')
-rw-r--r-- | src/MainMapView.qml | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/MainMapView.qml b/src/MainMapView.qml index 39a4b8e..5042d24 100644 --- a/src/MainMapView.qml +++ b/src/MainMapView.qml @@ -36,6 +36,12 @@ Item { Component.onCompleted: { zoomLevel = mapZoom.value; center.latitude = mapCenterLat.value; center.longitude = mapCenterLong.value; console.log(mapCenterLat.value,mapCenterLong.value)} onZoomLevelChanged: mapZoom.value = zoomLevel onCenterChanged: {mapCenterLat.value = center.latitude; mapCenterLong.value = center.longitude; console.log(center)} + Connections { + target: positionProvider + function onPositionChanged() { + center = positionProvider.position.coordinate + } + } } DefaultMapControls { id: mapControls |