Commit db025ef9 authored by Don Gagne's avatar Don Gagne

Use flight map position/zoom as initial settings

parent 65d5985d
...@@ -252,15 +252,21 @@ Rectangle { ...@@ -252,15 +252,21 @@ Rectangle {
anchors.top: parent.top anchors.top: parent.top
anchors.bottom: bottomRect.top anchors.bottom: bottomRect.top
color: (__qgcPal.globalTheme === QGCPalette.Light) ? "black" : "#98aca4" color: (__qgcPal.globalTheme === QGCPalette.Light) ? "black" : "#98aca4"
Map { Map {
id: _map id: _map
anchors.fill: parent anchors.fill: parent
anchors.margins: ScreenTools.defaultFontPixelHeight * 0.15 anchors.margins: ScreenTools.defaultFontPixelHeight * 0.15
zoomLevel: 10
center: QGroundControl.defaultMapPosition center: QGroundControl.defaultMapPosition
gesture.flickDeceleration: 3000 gesture.flickDeceleration: 3000
gesture.activeGestures: MapGestureArea.ZoomGesture | MapGestureArea.PanGesture | MapGestureArea.FlickGesture gesture.activeGestures: MapGestureArea.ZoomGesture | MapGestureArea.PanGesture | MapGestureArea.FlickGesture
plugin: Plugin { name: "QGroundControl" } plugin: Plugin { name: "QGroundControl" }
Component.onCompleted: {
center = QGroundControl.flightMapPosition
zoomLevel = QGroundControl.flightMapZoom
}
onCenterChanged: { onCenterChanged: {
handleChanges() handleChanges()
checkSanity() checkSanity()
...@@ -282,6 +288,7 @@ Rectangle { ...@@ -282,6 +288,7 @@ Rectangle {
anchors.fill: parent anchors.fill: parent
} }
} }
Rectangle { Rectangle {
width: ScreenTools.defaultFontPixelHeight * 16 width: ScreenTools.defaultFontPixelHeight * 16
height: ScreenTools.defaultFontPixelHeight * 9 height: ScreenTools.defaultFontPixelHeight * 9
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment