QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
GoogleMapProvider.cpp
Go to the documentation of this file.
1#include "GoogleMapProvider.h"
2
3void GoogleMapProvider::_getSecGoogleWords(int x, int y, QString& sec1, QString& sec2) const
4{
5 sec1 = QStringLiteral(""); // after &x=...
6 sec2 = QStringLiteral(""); // after &zoom=...
7 const int seclen = ((x * 3) + y) % 8;
8 sec2 = _secGoogleWord.left(seclen);
9 if ((y >= 10000) && (y < 100000)) {
10 sec1 = QStringLiteral("&s=");
11 }
12}
13
14QString GoogleMapProvider::_getURL(int x, int y, int zoom) const
15{
16 QString sec1;
17 QString sec2;
18 _getSecGoogleWords(x, y, sec1, sec2);
19 return _mapUrl
20 .arg(_getServerNum(x, y, 4))
21 .arg(_versionRequest, _version, _language)
22 .arg(x)
23 .arg(sec1)
24 .arg(y)
25 .arg(zoom)
26 .arg(sec2, _scale);
27}
int _getServerNum(int x, int y, int max) const
const QString _language
Definition MapProvider.h:75