I add google road map layer to canvas, but it seem load incorrect CRS?
QgsDataSourceUri ds;
ds.setParam("type", "xyz");
ds.setParam("url", QString("
https://mt1.google.com/vt/lyrs=m&x={x}&y={y}&z={z}";));
QgsRasterLayer* layer = new QgsRasterLayer(ds.encodedUri(), "my map",
"wms");
QList<QgsMapLayer*> layers = mCanvas->layers();
layers.insert(0, layer);
mCanvas->setLayers(layers);
mCanvas->setExtent(layer->extent());

but when I using qgis desktop, add XYZTiles with Google Maps, I get map is
square and no any information from provider about CRS, missed extent
_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to