small job for qgis developer: display google road map on the qgscanvas in EPSG:3857 -- 2
$10-30 USD
Igangværende
Slået op over 2 år siden
$10-30 USD
Betales ved levering
Here is my code to display google road map on the qgscanvas:
QgsDataSourceUri ds;
[login to view URL]("type", "xyz");
[login to view URL]("url", QString("https://mt1.google.com/vt/lyrs=m&x={x}&y={y}&z={z}"));
QgsRasterLayer* layer = new QgsRasterLayer([login to view URL](), "my map", "wms");
QList<QgsMapLayer*> layers = mCanvas->layers();
[login to view URL](0, layer);
mCanvas->setLayers(layers);
mCanvas->setExtent(layer->extent());
but the result display incorrect coordinate, investigate information about provider, I can not found information about CRS, map unit,..... When use QGIS desktop, I can add xyz tile layer using google map to the canvas and right click on layer, choose properties to show information about provider, it allready show crs, unit, bounding box,...