Does Qgc get a WMS client any time soon?

GenericMapProvider.cpp

static const QString serviceUrl = QStringLiteral("<serverUrl>/WMSServer?service=WMS&request=GetMap&layers=&styles=&format=image/png&transparent=true&version=1.1.1&width=512&height=512&srs=EPSG:3857&bbox=%1,%2,%3,%4");

QString serviceProvider::_getURL(const int x, const int y, const int zoom, QNetworkAccessManager* networkManager) {
    Q_UNUSED(networkManager)
    float north = tiley2lat(y, zoom);
    float south = tiley2lat(y + 1, zoom);
    float west = tilex2long(x, zoom);
    float east = tilex2long(x + 1, zoom);
    return serviceUrl.arg(west,0, 'f', 10).arg(south,0, 'f', 10).arg(east,0, 'f', 10).arg(north,0, 'f', 10);
}
float tilex2long(int x, int z)
{
    float n = pow(2,z);
    return (((x / n) * 360.0) - 180.0) * (20037508.34 / 180);
}

float tiley2lat(int y, int z)
{
    double n = M_PI - 2.0 * M_PI * y / (double)(1 << z);
    float lat = 180.0 / M_PI * atan(0.5 * (exp(n) - exp(-n)));
    lat = log(tan((90 + lat) * (M_PI / 360))) / (M_PI / 180);
    return (lat * (20037508.34 / 180));
}

and this is what I inserted in FlightMap.qml file

_map is the base map from whatever has been selected in App Settings.

    Map {
        id: trafficMap
        anchors.fill: parent
        color: 'transparent' // Necessary to make this map transparent
        plugin:                     Plugin { name: "QGroundControl" }
        opacity:                    0.77

        property string mapName:                        'defaultMap2'
        gesture.enabled: false
        center: _map.center
        minimumFieldOfView: _map.minimumFieldOfView
        maximumFieldOfView: _map.maximumFieldOfView
        minimumTilt: _map.minimumTilt
        maximumTilt: _map.maximumTilt
        minimumZoomLevel: _map.minimumZoomLevel
        maximumZoomLevel: _map.maximumZoomLevel
        zoomLevel: _map.zoomLevel
        tilt: _map.tilt;
        bearing: _map.bearing
        fieldOfView: _map.fieldOfView
        ...
        ...

}

Here is the result

OpenSeaMap for my baselayer and the marine traffic on top! I used a simple timer to redraw the tiles for updated traffic info.

@bcanozter @zdanek
i want to add marine charts and Geotiff charts in QGC. Kindly guide how can i do that.

Hi,
take look at my WMS map implementation at

basically you need a new provider that maps x,y,zoom into pngs in proper size.
Good luck.
Bartek

Thank you, I am building it right away.

Hello @zdanek. I saw your implementation of wms into QGroundControl. I am trying to achieve a similar task of displaying my own geotiff and shapefile maps in QGroundControl. I understand that we have to provide the tileset in order to display the map correctly.
So far, I have tried publishing my geotiff image to the GeoServer as a store and providing its link to qgc application’s ‘custom map URL’ option in settings.
The link looks like this-
http://localhost:8080/geoserver/demo_geotiff/wms?service=WMS&version=1.1.0&request=GetMap&layers=demo_geotiff%3Apune_sat2&bbox=8222002.6635%2C2093388.3571%2C8223424.7063%2C2094073.8938&width=768&height=370&srs=EPSG%3A3857&styles=&format=application/openlayers

I have changed the ‘format’ parameter in above link to ‘image/geotiff’.
By doing this, the geotiff image is getting displayed in qgc but there is one issue occurring. The geotiff is being displayed into multiple images rather than one single image.
I am attaching the screenshots below for reference.

Expected map in QGroundControl -

Resulting map -

I had some doubts regarding this whole process.

  1. How the desired geotiff should be uploaded on GeoServer so that it can be served as tiles in QGroundControl? And what should be the format of the url?
  2. I haven’t yet implemented the code you posted on github ( WmsMapProvider.cpp), will it help me serve my purpose of displaying the desired geotiff?
  3. Are there any changes required in the qml part of qgc code in order to display the custom map?

I am new to the whole GIS and maps domain. It would be a great help if you could provide some guidance on how to proceed further.
Thank you.