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
65c30db0
Commit
65c30db0
authored
Sep 13, 2019
by
Pierre TILAK
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Re-add GoogleSat
parent
f538e059
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
2 deletions
+34
-2
GoogleMapProvider.cpp
src/QtLocationPlugin/GoogleMapProvider.cpp
+23
-0
GoogleMapProvider.h
src/QtLocationPlugin/GoogleMapProvider.h
+10
-1
QGCMapUrlEngine.cpp
src/QtLocationPlugin/QGCMapUrlEngine.cpp
+1
-1
No files found.
src/QtLocationPlugin/GoogleMapProvider.cpp
View file @
65c30db0
...
...
@@ -220,3 +220,26 @@ QString GoogleMapProvider::_getURL(int x, int y, int zoom,
//return {};
}
QString
GoogleSatelliteMapProvider
::
_getURL
(
int
x
,
int
y
,
int
zoom
,
QNetworkAccessManager
*
networkManager
)
{
qDebug
()
<<
"Yohou"
;
// http://mt1.google.com/vt/lyrs=s
QString
server
=
"khm"
;
QString
request
=
"kh"
;
QString
sec1
=
""
;
// after &x=...
QString
sec2
=
""
;
// after &zoom=...
_getSecGoogleWords
(
x
,
y
,
sec1
,
sec2
);
_tryCorrectGoogleVersions
(
networkManager
);
return
QString
(
"http://%1%2.google.com/%3/v=%4&hl=%5&x=%6%7&y=%8&z=%9&s=%10"
)
.
arg
(
server
)
.
arg
(
_getServerNum
(
x
,
y
,
4
))
.
arg
(
request
)
.
arg
(
_versionGoogleSatellite
)
.
arg
(
_language
)
.
arg
(
x
)
.
arg
(
sec1
)
.
arg
(
y
)
.
arg
(
zoom
)
.
arg
(
sec2
);
}
src/QtLocationPlugin/GoogleMapProvider.h
View file @
65c30db0
...
...
@@ -23,7 +23,7 @@ class GoogleMapProvider : public MapProvider {
void
_googleVersionCompleted
();
void
_replyDestroyed
();
pr
ivate
:
pr
otected
:
// Define the url to Request
QString
_getURL
(
int
x
,
int
y
,
int
zoom
,
QNetworkAccessManager
*
networkManager
)
;
...
...
@@ -42,3 +42,12 @@ class GoogleMapProvider : public MapProvider {
QString
_versionGoogleTerrain
;
QString
_secGoogleWord
;
};
class
GoogleSatelliteMapProvider
:
public
GoogleMapProvider
{
Q_OBJECT
public:
GoogleSatelliteMapProvider
(
QObject
*
parent
)
:
GoogleMapProvider
(
parent
){}
protected:
QString
_getURL
(
int
x
,
int
y
,
int
zoom
,
QNetworkAccessManager
*
networkManager
);
};
src/QtLocationPlugin/QGCMapUrlEngine.cpp
View file @
65c30db0
...
...
@@ -47,7 +47,7 @@ UrlFactory::UrlFactory()
//_versionBingMaps = "563";
#ifndef QGC_NO_GOOGLE_MAPS
_googleMapProvider
=
new
GoogleMapProvider
(
this
);
_googleMapProvider
=
new
Google
Satellite
MapProvider
(
this
);
#endif
}
...
...
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