QGroundControl (QGC) V4.0.5 modified to use Google satellite maps, zoom level 24

Source
Thanks to this author for
his selfless sharing. His QGC version is
slightly different from V3.5.3 and now V4.0.5

Modify the use of Google Satellite Map

qgroundcontrol \ src \ QtLocationPlugin \ GoogleMapProvider.cpp
line 145 Change
to the following

QString GoogleSatelliteMapProvider::_getURL(const int x, const int y, const int zoom, QNetworkAccessManager* networkManager) {
    // http://mt1.google.com/vt/lyrs=s
    QString server  = QStringLiteral("khm");
    QString request = QStringLiteral("kh");
    QString sec1; // after &x=...
    QString sec2; // after &zoom=...
    _getSecGoogleWords(x, y, sec1, sec2);
    _tryCorrectGoogleVersions(networkManager);
    return QString(QStringLiteral("http://www.google.cn/maps/vt?lyrs=s&x=%1&y=%2&z=%3")).arg(x).arg(y).arg(zoom);
   // return QString(QStringLiteral("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);
}

24 level zoom map modification

QGC maximum magnification is 20, in some cases it is not enough to use
qgroundcontrol \ src \ QtLocationPlugin \ QGCMapUrlEngine.h,
line 27, 20 instead of 24.

#define MAX_MAP_ZOOM (24.0)

Renderings

Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here

Released eight original articles · won praise 11 · views 2923

Guess you like

Origin blog.csdn.net/weixin_44457020/article/details/105566597