Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
38d30096
Unverified
Commit
38d30096
authored
Jun 06, 2018
by
Don Gagne
Committed by
GitHub
Jun 06, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6572 from DonLakeFlyer/CenterMap
Plan, Offline Maps: Support for center map to specified location
parents
29458653
85b939db
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
3 deletions
+42
-3
FlightMap.qml
src/FlightMap/FlightMap.qml
+16
-0
CenterMapDropButton.qml
src/FlightMap/Widgets/CenterMapDropButton.qml
+11
-0
CenterMapDropPanel.qml
src/FlightMap/Widgets/CenterMapDropPanel.qml
+13
-3
PlanView.qml
src/PlanView/PlanView.qml
+1
-0
OfflineMap.qml
src/QtLocationPlugin/QMLControl/OfflineMap.qml
+1
-0
No files found.
src/FlightMap/FlightMap.qml
View file @
38d30096
...
...
@@ -11,6 +11,7 @@ import QtQuick 2.3
import
QtQuick
.
Controls
1.2
import
QtLocation
5.3
import
QtPositioning
5.3
import
QtQuick
.
Dialogs
1.2
import
QGroundControl
1.0
import
QGroundControl
.
FactSystem
1.0
...
...
@@ -40,6 +41,7 @@ Map {
property
bool
firstGCSPositionReceived
:
false
///< true: first gcs position update was responded to
property
bool
firstVehiclePositionReceived
:
false
///< true: first vehicle position update was responded to
property
bool
planView
:
false
///< true: map being using for Plan view, items should be draggable
property
var
qgcView
readonly
property
real
maxZoomLevel
:
20
...
...
@@ -62,6 +64,20 @@ Map {
}
}
function
centerToSpecifiedLocation
()
{
qgcView
.
showDialog
(
specifyMapPositionDialog
,
qsTr
(
"
Specify Position
"
),
qgcView
.
showDialogDefaultWidth
,
StandardButton
.
Cancel
)
}
Component
{
id
:
specifyMapPositionDialog
EditPositionDialog
{
coordinate
:
center
onCoordinateChanged
:
center
=
coordinate
}
}
ExclusiveGroup
{
id
:
mapTypeGroup
}
// Update ground station position
...
...
src/FlightMap/Widgets/CenterMapDropButton.qml
View file @
38d30096
...
...
@@ -209,6 +209,17 @@ DropButton {
}
}
QGCButton
{
text
:
qsTr
(
"
Specified Location
"
)
Layout.fillWidth
:
true
onClicked
:
{
dropButton
.
hideDropDown
()
map
.
centerToSpecifiedLocation
()
}
}
QGCButton
{
text
:
qsTr
(
"
Vehicle
"
)
Layout.fillWidth
:
true
...
...
src/FlightMap/Widgets/CenterMapDropPanel.qml
View file @
38d30096
...
...
@@ -62,6 +62,17 @@ ColumnLayout {
}
}
QGCButton
{
text
:
qsTr
(
"
Vehicle
"
)
Layout.fillWidth
:
true
enabled
:
_activeVehicle
&&
_activeVehicle
.
coordinate
.
isValid
onClicked
:
{
dropPanel
.
hide
()
map
.
center
=
activeVehicle
.
coordinate
}
}
QGCButton
{
text
:
qsTr
(
"
Current Location
"
)
Layout.fillWidth
:
true
...
...
@@ -74,13 +85,12 @@ ColumnLayout {
}
QGCButton
{
text
:
qsTr
(
"
Vehicle
"
)
text
:
qsTr
(
"
Specified Location
"
)
Layout.fillWidth
:
true
enabled
:
_activeVehicle
&&
_activeVehicle
.
coordinate
.
isValid
onClicked
:
{
dropPanel
.
hide
()
map
.
center
=
activeVehicle
.
coordinate
map
.
center
ToSpecifiedLocation
()
}
}
}
// Column
src/PlanView/PlanView.qml
View file @
38d30096
...
...
@@ -411,6 +411,7 @@ QGCView {
allowGCSLocationCenter
:
true
allowVehicleLocationCenter
:
true
planView
:
true
qgcView
:
_qgcView
// This is the center rectangle of the map which is not obscured by tools
property
rect
centerViewport
:
Qt
.
rect
(
_leftToolWidth
,
_toolbarHeight
,
editorMap
.
width
-
_leftToolWidth
-
_rightPanelWidth
,
editorMap
.
height
-
_statusHeight
-
_toolbarHeight
)
...
...
src/QtLocationPlugin/QMLControl/OfflineMap.qml
View file @
38d30096
...
...
@@ -364,6 +364,7 @@ QGCView {
allowVehicleLocationCenter
:
false
gesture.flickDeceleration
:
3000
mapName
:
"
OfflineMap
"
qgcView
:
offlineMapView
property
bool
isSatelliteMap
:
activeMapType
.
name
.
indexOf
(
"
Satellite
"
)
>
-
1
||
activeMapType
.
name
.
indexOf
(
"
Hybrid
"
)
>
-
1
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment