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
af4b8cce
Commit
af4b8cce
authored
Aug 29, 2013
by
David Goodman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Default map type checked and defined in QGCMapWidget.h.
parent
d53fa861
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
1 deletion
+21
-1
QGCMapToolBar.cc
src/ui/map/QGCMapToolBar.cc
+10
-1
QGCMapWidget.cc
src/ui/map/QGCMapWidget.cc
+6
-0
QGCMapWidget.h
src/ui/map/QGCMapWidget.h
+5
-0
No files found.
src/ui/map/QGCMapToolBar.cc
View file @
af4b8cce
...
...
@@ -60,18 +60,27 @@ void QGCMapToolBar::setMap(QGCMapWidget* map)
action
=
mapTypesMenu
.
addAction
(
tr
(
"Bing Hybrid"
),
this
,
SLOT
(
setMapType
()));
action
->
setData
(
MapType
::
BingHybrid
);
action
->
setCheckable
(
true
);
#ifdef MAP_DEFAULT_TYPE_BING
action
->
setChecked
(
true
);
#endif
mapTypesGroup
->
addAction
(
action
);
action
=
mapTypesMenu
.
addAction
(
tr
(
"Google Hybrid"
),
this
,
SLOT
(
setMapType
()));
action
->
setData
(
MapType
::
GoogleHybrid
);
action
->
setCheckable
(
true
);
#ifdef MAP_DEFAULT_TYPE_GOOGLE
action
->
setChecked
(
true
);
#endif
mapTypesGroup
->
addAction
(
action
);
action
=
mapTypesMenu
.
addAction
(
tr
(
"OpenStreetMap"
),
this
,
SLOT
(
setMapType
()));
action
->
setData
(
MapType
::
OpenStreetMap
);
action
->
setCheckable
(
true
);
#ifdef MAP_DEFAULT_TYPE_OSM
action
->
setChecked
(
true
);
#endif
mapTypesGroup
->
addAction
(
action
);
//TODO check current item
optionsMenu
.
addMenu
(
&
mapTypesMenu
);
...
...
src/ui/map/QGCMapWidget.cc
View file @
af4b8cce
...
...
@@ -34,7 +34,13 @@ QGCMapWidget::QGCMapWidget(QWidget *parent) :
//this->SetShowTileGridLines(true);
//default appears to be Google Hybrid, and is broken currently
#if defined MAP_DEFAULT_TYPE_BING
this
->
SetMapType
(
MapType
::
BingHybrid
);
#elif defined MAP_DEFAULT_TYPE_GOOGLE
this
->
SetMapType
(
MapType
::
GoogleHybrid
);
#else
this
->
SetMapType
(
MapType
::
OpenStreetMap
);
#endif
this
->
setContextMenuPolicy
(
Qt
::
ActionsContextMenu
);
...
...
src/ui/map/QGCMapWidget.h
View file @
af4b8cce
...
...
@@ -5,6 +5,11 @@
#include <QTimer>
#include "../../../libs/opmapcontrol/opmapcontrol.h"
// Choose one default map type
#define MAP_DEFAULT_TYPE_BING
//#define MAP_DEFAULT_TYPE_GOOGLE
//#define MAP_DEFAULT_TYPE_OSM
class
UASInterface
;
class
UASWaypointManager
;
class
Waypoint
;
...
...
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