Commit 06f79af5 authored by Tomaz Canabrava's avatar Tomaz Canabrava Committed by Daniel Agar

List-Initialize supportedMapTypes

parent 29bbce0d
......@@ -103,70 +103,68 @@ QGeoTiledMappingManagerEngineQGC::QGeoTiledMappingManagerEngineQGC(const QVarian
//-- IMPORTANT
// Changes here must reflect those in QGCMapEngine.cpp
QList<QGeoMapType> mapTypes;
setSupportedMapTypes({
#ifndef QGC_NO_GOOGLE_MAPS
mapTypes << QGCGEOMAPTYPE(QGeoMapType::StreetMap, "Google Street Map", "Google street map", false, false, UrlFactory::GoogleMap);
mapTypes << QGCGEOMAPTYPE(QGeoMapType::SatelliteMapDay, "Google Satellite Map", "Google satellite map", false, false, UrlFactory::GoogleSatellite);
mapTypes << QGCGEOMAPTYPE(QGeoMapType::TerrainMap, "Google Terrain Map", "Google terrain map", false, false, UrlFactory::GoogleTerrain);
QGCGEOMAPTYPE(QGeoMapType::StreetMap, "Google Street Map", "Google street map", false, false, UrlFactory::GoogleMap),
QGCGEOMAPTYPE(QGeoMapType::SatelliteMapDay, "Google Satellite Map", "Google satellite map", false, false, UrlFactory::GoogleSatellite),
QGCGEOMAPTYPE(QGeoMapType::TerrainMap, "Google Terrain Map", "Google terrain map", false, false, UrlFactory::GoogleTerrain),
#endif
/* TODO:
* Proper google hybrid maps requires collecting two separate bitmaps and overlaying them.
*
* mapTypes << QGCGEOMAPTYPE(QGeoMapType::HybridMap, "Google Hybrid Map", "Google hybrid map", false, false, UrlFactory::GoogleHybrid);
* mapTypes << QGCGEOMAPTYPE(QGeoMapType::HybridMap, "Google Hybrid Map", "Google hybrid map", false, false, UrlFactory::GoogleHybrid),
*
*/
// Bing
mapTypes << QGCGEOMAPTYPE(QGeoMapType::StreetMap, "Bing Street Map", "Bing street map", false, false, UrlFactory::BingMap);
mapTypes << QGCGEOMAPTYPE(QGeoMapType::SatelliteMapDay, "Bing Satellite Map", "Bing satellite map", false, false, UrlFactory::BingSatellite);
mapTypes << QGCGEOMAPTYPE(QGeoMapType::HybridMap, "Bing Hybrid Map", "Bing hybrid map", false, false, UrlFactory::BingHybrid);
QGCGEOMAPTYPE(QGeoMapType::StreetMap, "Bing Street Map", "Bing street map", false, false, UrlFactory::BingMap),
QGCGEOMAPTYPE(QGeoMapType::SatelliteMapDay, "Bing Satellite Map", "Bing satellite map", false, false, UrlFactory::BingSatellite),
QGCGEOMAPTYPE(QGeoMapType::HybridMap, "Bing Hybrid Map", "Bing hybrid map", false, false, UrlFactory::BingHybrid),
// Statkart
mapTypes << QGCGEOMAPTYPE(QGeoMapType::TerrainMap, "Statkart Terrain Map", "Statkart Terrain Map", false, false, UrlFactory::StatkartTopo);
QGCGEOMAPTYPE(QGeoMapType::TerrainMap, "Statkart Terrain Map", "Statkart Terrain Map", false, false, UrlFactory::StatkartTopo),
// Eniro
mapTypes << QGCGEOMAPTYPE(QGeoMapType::TerrainMap, "Eniro Terrain Map", "Eniro Terrain Map", false, false, UrlFactory::EniroTopo);
QGCGEOMAPTYPE(QGeoMapType::TerrainMap, "Eniro Terrain Map", "Eniro Terrain Map", false, false, UrlFactory::EniroTopo),
// Esri
mapTypes << QGCGEOMAPTYPE(QGeoMapType::StreetMap, "Esri Street Map", "ArcGIS Online World Street Map", true, false, UrlFactory::EsriWorldStreet);
mapTypes << QGCGEOMAPTYPE(QGeoMapType::SatelliteMapDay, "Esri Satellite Map", "ArcGIS Online World Imagery", true, false, UrlFactory::EsriWorldSatellite);
mapTypes << QGCGEOMAPTYPE(QGeoMapType::TerrainMap, "Esri Terrain Map", "World Terrain Base", false, false, UrlFactory::EsriTerrain);
QGCGEOMAPTYPE(QGeoMapType::StreetMap, "Esri Street Map", "ArcGIS Online World Street Map", true, false, UrlFactory::EsriWorldStreet),
QGCGEOMAPTYPE(QGeoMapType::SatelliteMapDay, "Esri Satellite Map", "ArcGIS Online World Imagery", true, false, UrlFactory::EsriWorldSatellite),
QGCGEOMAPTYPE(QGeoMapType::TerrainMap, "Esri Terrain Map", "World Terrain Base", false, false, UrlFactory::EsriTerrain),
// VWorld
mapTypes << QGCGEOMAPTYPE(QGeoMapType::SatelliteMapDay, "VWorld Satellite Map", "VWorld Satellite Map", false, false, UrlFactory::VWorldSatellite);
mapTypes << QGCGEOMAPTYPE(QGeoMapType::StreetMap, "VWorld Street Map", "VWorld Street Map", false, false, UrlFactory::VWorldStreet);
QGCGEOMAPTYPE(QGeoMapType::SatelliteMapDay, "VWorld Satellite Map", "VWorld Satellite Map", false, false, UrlFactory::VWorldSatellite),
QGCGEOMAPTYPE(QGeoMapType::StreetMap, "VWorld Street Map", "VWorld Street Map", false, false, UrlFactory::VWorldStreet),
/* See: https://wiki.openstreetmap.org/wiki/Tile_usage_policy
mapTypes << QGCGEOMAPTYPE(QGeoMapType::StreetMap, "Open Street Map", "Open Street map", false, false, UrlFactory::OpenStreetMap);
QGCGEOMAPTYPE(QGeoMapType::StreetMap, "Open Street Map", "Open Street map", false, false, UrlFactory::OpenStreetMap),
*/
// MapQuest
/*
mapTypes << QGCGEOMAPTYPE(QGeoMapType::StreetMap, "MapQuest Street Map", "MapQuest street map", false, false, UrlFactory::MapQuestMap);
mapTypes << QGCGEOMAPTYPE(QGeoMapType::SatelliteMapDay, "MapQuest Satellite Map", "MapQuest satellite map", false, false, UrlFactory::MapQuestSat);
QGCGEOMAPTYPE(QGeoMapType::StreetMap, "MapQuest Street Map", "MapQuest street map", false, false, UrlFactory::MapQuestMap),
QGCGEOMAPTYPE(QGeoMapType::SatelliteMapDay, "MapQuest Satellite Map", "MapQuest satellite map", false, false, UrlFactory::MapQuestSat),
*/
/*
* These are OK as you need your own token for accessing it. Out-of-the box, QGC does not even offer these unless you enter a proper Mapbox token.
*/
mapTypes << QGCGEOMAPTYPE(QGeoMapType::StreetMap, "Mapbox Street Map", "Mapbox Street Map", false, false, UrlFactory::MapboxStreets);
mapTypes << QGCGEOMAPTYPE(QGeoMapType::SatelliteMapDay, "Mapbox Satellite Map", "Mapbox Satellite Map", false, false, UrlFactory::MapboxSatellite);
mapTypes << QGCGEOMAPTYPE(QGeoMapType::CustomMap, "Mapbox High Contrast Map", "Mapbox High Contrast Map", false, false, UrlFactory::MapboxHighContrast);
mapTypes << QGCGEOMAPTYPE(QGeoMapType::CustomMap, "Mapbox Light Map", "Mapbox Light Map", false, false, UrlFactory::MapboxLight);
mapTypes << QGCGEOMAPTYPE(QGeoMapType::CustomMap, "Mapbox Dark Map", "Mapbox Dark Map", false, false, UrlFactory::MapboxDark);
mapTypes << QGCGEOMAPTYPE(QGeoMapType::HybridMap, "Mapbox Hybrid Map", "Mapbox Hybrid Map", false, false, UrlFactory::MapboxHybrid);
mapTypes << QGCGEOMAPTYPE(QGeoMapType::CustomMap, "Mapbox Wheat Paste Map", "Mapbox Wheat Paste Map", false, false, UrlFactory::MapboxWheatPaste);
mapTypes << QGCGEOMAPTYPE(QGeoMapType::StreetMap, "Mapbox Streets Basic Map", "Mapbox Streets Basic Map", false, false, UrlFactory::MapboxStreetsBasic);
mapTypes << QGCGEOMAPTYPE(QGeoMapType::CustomMap, "Mapbox Comic Map", "Mapbox Comic Map", false, false, UrlFactory::MapboxComic);
mapTypes << QGCGEOMAPTYPE(QGeoMapType::CustomMap, "Mapbox Outdoors Map", "Mapbox Outdoors Map", false, false, UrlFactory::MapboxOutdoors);
mapTypes << QGCGEOMAPTYPE(QGeoMapType::CycleMap, "Mapbox Run, Byke and Hike Map", "Mapbox Run, Byke and Hike Map", false, false, UrlFactory::MapboxRunBikeHike);
mapTypes << QGCGEOMAPTYPE(QGeoMapType::CustomMap, "Mapbox Pencil Map", "Mapbox Pencil Map", false, false, UrlFactory::MapboxPencil);
mapTypes << QGCGEOMAPTYPE(QGeoMapType::CustomMap, "Mapbox Pirates Map", "Mapbox Pirates Map", false, false, UrlFactory::MapboxPirates);
mapTypes << QGCGEOMAPTYPE(QGeoMapType::CustomMap, "Mapbox Emerald Map", "Mapbox Emerald Map", false, false, UrlFactory::MapboxEmerald);
setSupportedMapTypes(mapTypes);
QGCGEOMAPTYPE(QGeoMapType::StreetMap, "Mapbox Street Map", "Mapbox Street Map", false, false, UrlFactory::MapboxStreets),
QGCGEOMAPTYPE(QGeoMapType::SatelliteMapDay, "Mapbox Satellite Map", "Mapbox Satellite Map", false, false, UrlFactory::MapboxSatellite),
QGCGEOMAPTYPE(QGeoMapType::CustomMap, "Mapbox High Contrast Map", "Mapbox High Contrast Map", false, false, UrlFactory::MapboxHighContrast),
QGCGEOMAPTYPE(QGeoMapType::CustomMap, "Mapbox Light Map", "Mapbox Light Map", false, false, UrlFactory::MapboxLight),
QGCGEOMAPTYPE(QGeoMapType::CustomMap, "Mapbox Dark Map", "Mapbox Dark Map", false, false, UrlFactory::MapboxDark),
QGCGEOMAPTYPE(QGeoMapType::HybridMap, "Mapbox Hybrid Map", "Mapbox Hybrid Map", false, false, UrlFactory::MapboxHybrid),
QGCGEOMAPTYPE(QGeoMapType::CustomMap, "Mapbox Wheat Paste Map", "Mapbox Wheat Paste Map", false, false, UrlFactory::MapboxWheatPaste),
QGCGEOMAPTYPE(QGeoMapType::StreetMap, "Mapbox Streets Basic Map", "Mapbox Streets Basic Map", false, false, UrlFactory::MapboxStreetsBasic),
QGCGEOMAPTYPE(QGeoMapType::CustomMap, "Mapbox Comic Map", "Mapbox Comic Map", false, false, UrlFactory::MapboxComic),
QGCGEOMAPTYPE(QGeoMapType::CustomMap, "Mapbox Outdoors Map", "Mapbox Outdoors Map", false, false, UrlFactory::MapboxOutdoors),
QGCGEOMAPTYPE(QGeoMapType::CycleMap, "Mapbox Run, Byke and Hike Map", "Mapbox Run, Byke and Hike Map", false, false, UrlFactory::MapboxRunBikeHike),
QGCGEOMAPTYPE(QGeoMapType::CustomMap, "Mapbox Pencil Map", "Mapbox Pencil Map", false, false, UrlFactory::MapboxPencil),
QGCGEOMAPTYPE(QGeoMapType::CustomMap, "Mapbox Pirates Map", "Mapbox Pirates Map", false, false, UrlFactory::MapboxPirates),
QGCGEOMAPTYPE(QGeoMapType::CustomMap, "Mapbox Emerald Map", "Mapbox Emerald Map", false, false, UrlFactory::MapboxEmerald),
});
//-- Users (QML code) can define a different user agent
if (parameters.contains(QStringLiteral("useragent"))) {
......
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