Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
dce6c6aa
Unverified
Commit
dce6c6aa
authored
Nov 15, 2017
by
Don Gagne
Committed by
GitHub
Nov 15, 2017
Browse files
Merge pull request #5828 from AndKe/eniromap
Maps: added Eniro as map provider (Norway,Sweden,Finland,Denmark,Poland)
parents
c7a2e09b
7c028707
Changes
7
Hide whitespace changes
Inline
Side-by-side
src/QtLocationPlugin/QGCMapEngine.cpp
View file @
dce6c6aa
...
...
@@ -55,6 +55,7 @@ stQGeoTileCacheQGCMapTypes kMapTypes[] = {
{
"Bing Satellite Map"
,
UrlFactory
::
BingSatellite
},
{
"Bing Hybrid Map"
,
UrlFactory
::
BingHybrid
},
{
"Statkart Terrain Map"
,
UrlFactory
::
StatkartTopo
},
{
"ENIRO Terrain Map"
,
UrlFactory
::
EniroTopo
}
/*
{"MapQuest Street Map", UrlFactory::MapQuestMap},
{"MapQuest Satellite Map", UrlFactory::MapQuestSat}
...
...
@@ -466,6 +467,7 @@ QGCMapEngine::concurrentDownloads(UrlFactory::MapType type)
case
UrlFactory
::
BingSatellite
:
case
UrlFactory
::
BingHybrid
:
case
UrlFactory
::
StatkartTopo
:
case
UrlFactory
::
EniroTopo
:
case
UrlFactory
::
EsriWorldStreet
:
case
UrlFactory
::
EsriWorldSatellite
:
case
UrlFactory
::
EsriTerrain
:
...
...
src/QtLocationPlugin/QGCMapUrlEngine.cpp
View file @
dce6c6aa
...
...
@@ -95,6 +95,9 @@ UrlFactory::getImageFormat(MapType type, const QByteArray& image)
case
StatkartTopo
:
format
=
"png"
;
break
;
case
EniroTopo
:
format
=
"png"
;
break
;
/*
case MapQuestMap:
case MapQuestSat:
...
...
@@ -157,6 +160,9 @@ UrlFactory::getTileURL(MapType type, int x, int y, int zoom, QNetworkAccessManag
case
StatkartTopo
:
request
.
setRawHeader
(
"Referrer"
,
"https://www.norgeskart.no/"
);
break
;
case
EniroTopo
:
request
.
setRawHeader
(
"Referrer"
,
"https://www.eniro.se/"
);
break
;
/*
case OpenStreetMapSurfer:
case OpenStreetMapSurferTerrain:
...
...
@@ -259,6 +265,11 @@ UrlFactory::_getURL(MapType type, int x, int y, int zoom, QNetworkAccessManager*
return
QString
(
"http://opencache.statkart.no/gatekeeper/gk/gk.open_gmaps?layers=topo2&zoom=%1&x=%2&y=%3"
).
arg
(
zoom
).
arg
(
x
).
arg
(
y
);
}
break
;
case
EniroTopo
:
{
return
QString
(
"http://map.eniro.com/geowebcache/service/tms1.0.0/map/%1/%2/%3.png"
).
arg
(
zoom
).
arg
(
x
).
arg
((
1
<<
zoom
)
-
1
-
y
);
}
break
;
/*
case OpenStreetMap:
{
...
...
src/QtLocationPlugin/QGCMapUrlEngine.h
View file @
dce6c6aa
...
...
@@ -45,6 +45,7 @@ public:
OpenStreetMapSurferTerrain
=
35
,
StatkartTopo
=
100
,
EniroTopo
=
110
,
BingMap
=
444
,
BingSatellite
=
555
,
...
...
src/QtLocationPlugin/QGeoTiledMappingManagerEngineQGC.cpp
View file @
dce6c6aa
...
...
@@ -121,6 +121,8 @@ QGeoTiledMappingManagerEngineQGC::QGeoTiledMappingManagerEngineQGC(const QVarian
// Statkart
mapTypes
<<
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
);
// Esri
mapTypes
<<
QGCGEOMAPTYPE
(
QGeoMapType
::
StreetMap
,
"Esri Street Map"
,
"ArcGIS Online World Street Map"
,
true
,
false
,
UrlFactory
::
EsriWorldStreet
);
...
...
src/Settings/FlightMap.SettingsGroup.json
View file @
dce6c6aa
...
...
@@ -3,8 +3,8 @@
"name"
:
"MapProvider"
,
"shortDescription"
:
"Currently selected map provider for flight maps"
,
"type"
:
"uint32"
,
"enumStrings"
:
"Bing,Google,Statkart,Mapbox,Esri"
,
"enumValues"
:
"0,1,2,3,4"
,
"enumStrings"
:
"Bing,Google,Statkart,Mapbox,Esri
,Eniro
"
,
"enumValues"
:
"0,1,2,3,4
,5
"
,
"defaultValue"
:
0
},
{
...
...
src/Settings/FlightMapSettings.cc
View file @
dce6c6aa
...
...
@@ -110,6 +110,11 @@ void FlightMapSettings::_newMapProvider(QVariant value)
_removeEnumValue
(
mapTypeSatellite
,
enumStrings
,
enumValues
);
_removeEnumValue
(
mapTypeHybrid
,
enumStrings
,
enumValues
);
break
;
case
mapProviderEniro
:
_removeEnumValue
(
mapTypeStreet
,
enumStrings
,
enumValues
);
_removeEnumValue
(
mapTypeSatellite
,
enumStrings
,
enumValues
);
_removeEnumValue
(
mapTypeHybrid
,
enumStrings
,
enumValues
);
break
;
case
mapProviderEsri
:
_removeEnumValue
(
mapTypeHybrid
,
enumStrings
,
enumValues
);
break
;
...
...
src/Settings/FlightMapSettings.h
View file @
dce6c6aa
...
...
@@ -25,7 +25,8 @@ public:
mapProviderGoogle
,
mapProviderStarkart
,
mapProviderMapbox
,
mapProviderEsri
mapProviderEsri
,
mapProviderEniro
}
MapProvider_t
;
// This enum must match the json meta data
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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