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
9219a952
Commit
9219a952
authored
Sep 18, 2016
by
Don Gagne
Committed by
GitHub
Sep 18, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4044 from AndKe/Statkart
Maps:Added Statkart Topo2 (very useful norwegian topographic map)
parents
8fa4835b
50f8db09
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
0 deletions
+19
-0
FlightMapSettings.cc
src/FlightMap/FlightMapSettings.cc
+3
-0
QGCMapEngine.cpp
src/QtLocationPlugin/QGCMapEngine.cpp
+2
-0
QGCMapUrlEngine.cpp
src/QtLocationPlugin/QGCMapUrlEngine.cpp
+9
-0
QGCMapUrlEngine.h
src/QtLocationPlugin/QGCMapUrlEngine.h
+2
-0
QGeoTiledMappingManagerEngineQGC.cpp
src/QtLocationPlugin/QGeoTiledMappingManagerEngineQGC.cpp
+3
-0
No files found.
src/FlightMap/FlightMapSettings.cc
View file @
9219a952
...
...
@@ -32,6 +32,7 @@ void FlightMapSettings::setToolbox(QGCToolbox *toolbox)
#ifndef QGC_NO_GOOGLE_MAPS
_supportedMapProviders
<<
"Google"
;
#endif
_supportedMapProviders
<<
"Statkart"
;
_loadSettings
();
}
...
...
@@ -82,6 +83,8 @@ void FlightMapSettings::_setMapTypesForCurrentProvider(void)
_mapTypes
<<
"Street Map"
<<
"Satellite Map"
<<
"Hybrid Map"
;
}
else
if
(
_mapProvider
==
"Google"
)
{
_mapTypes
<<
"Street Map"
<<
"Satellite Map"
<<
"Terrain Map"
;
}
else
if
(
_mapProvider
==
"Statkart"
)
{
_mapTypes
<<
"Topo2"
;
}
#endif
emit
mapTypesChanged
(
_mapTypes
);
...
...
src/QtLocationPlugin/QGCMapEngine.cpp
View file @
9219a952
...
...
@@ -51,6 +51,7 @@ stQGeoTileCacheQGCMapTypes kMapTypes[] = {
{
"Bing Street Map"
,
UrlFactory
::
BingMap
},
{
"Bing Satellite Map"
,
UrlFactory
::
BingSatellite
},
{
"Bing Hybrid Map"
,
UrlFactory
::
BingHybrid
},
{
"Statkart Topo2"
,
UrlFactory
::
StatkartTopo
},
{
"MapQuest Street Map"
,
UrlFactory
::
MapQuestMap
},
{
"MapQuest Satellite Map"
,
UrlFactory
::
MapQuestSat
}
/*
...
...
@@ -463,6 +464,7 @@ QGCMapEngine::concurrentDownloads(UrlFactory::MapType type)
case
UrlFactory
:
:
BingMap
:
case
UrlFactory
:
:
BingSatellite
:
case
UrlFactory
:
:
BingHybrid
:
case
UrlFactory
:
:
StatkartTopo
:
return
12
;
case
UrlFactory
:
:
MapQuestMap
:
case
UrlFactory
:
:
MapQuestSat
:
...
...
src/QtLocationPlugin/QGCMapUrlEngine.cpp
View file @
9219a952
...
...
@@ -84,6 +84,7 @@ UrlFactory::getImageFormat(MapType type, const QByteArray& image)
case
GoogleHybrid
:
case
BingMap
:
case
OpenStreetMap
:
case
StatkartTopo
:
format
=
"png"
;
break
;
case
MapQuestMap
:
...
...
@@ -143,6 +144,9 @@ UrlFactory::getTileURL(MapType type, int x, int y, int zoom, QNetworkAccessManag
case
BingSatellite
:
request
.
setRawHeader
(
"Referrer"
,
"https://www.bing.com/maps/"
);
break
;
case
StatkartTopo
:
request
.
setRawHeader
(
"Referrer"
,
"https://www.norgeskart.no/"
);
break
;
/*
case OpenStreetMapSurfer:
case OpenStreetMapSurferTerrain:
...
...
@@ -229,6 +233,11 @@ UrlFactory::_getURL(MapType type, int x, int y, int zoom, QNetworkAccessManager*
}
break
;
#endif
case
StatkartTopo
:
{
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 OpenStreetMap:
{
...
...
src/QtLocationPlugin/QGCMapUrlEngine.h
View file @
9219a952
...
...
@@ -44,6 +44,8 @@ public:
OpenStreetMapSurfer
=
34
,
OpenStreetMapSurferTerrain
=
35
,
StatkartTopo
=
100
,
BingMap
=
444
,
BingSatellite
=
555
,
BingHybrid
=
666
,
...
...
src/QtLocationPlugin/QGeoTiledMappingManagerEngineQGC.cpp
View file @
9219a952
...
...
@@ -114,6 +114,9 @@ QGeoTiledMappingManagerEngineQGC::QGeoTiledMappingManagerEngineQGC(const QVarian
mapTypes
<<
QGeoMapType
(
QGeoMapType
::
SatelliteMapDay
,
"Bing Satellite Map"
,
"Bing satellite map"
,
false
,
false
,
UrlFactory
::
BingSatellite
);
mapTypes
<<
QGeoMapType
(
QGeoMapType
::
HybridMap
,
"Bing Hybrid Map"
,
"Bing hybrid map"
,
false
,
false
,
UrlFactory
::
BingHybrid
);
// Statkart
mapTypes
<<
QGeoMapType
(
QGeoMapType
::
TerrainMap
,
"Statkart Topo2"
,
"Statkart Topo2"
,
false
,
false
,
UrlFactory
::
StatkartTopo
);
/* See: https://wiki.openstreetmap.org/wiki/Tile_usage_policy
mapTypes << QGeoMapType(QGeoMapType::StreetMap, "Open Street Map", "Open Street map", false, false, UrlFactory::OpenStreetMap);
*/
...
...
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