Commit af4b8cce authored by David Goodman's avatar David Goodman

Default map type checked and defined in QGCMapWidget.h.

parent d53fa861
......@@ -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);
......
......@@ -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);
......
......@@ -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;
......
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