I have map canvas and I need to add map layer of Italy. I already succeed to add map of whole world, but when I zoom it to Italy I get nothing. I do research and I found this page: http://mobac.sourceforge.net/forum/viewtopic.php?t=519 with XML code. But I am not sure how to add that. When I added map of whole world I just put URL in QgsRasterLayer and that was it. I find i cookbok in cookbook some guidlines, but nothing specific.
Asked
Active
Viewed 465 times
2
-
Your map canvas is: QGIS map? OpenLayers map? QGIS map created with PyQGIS? You data is: a shapefile? a WMS/WFS/WMTS URL? other? – jgrocha Jul 04 '18 at 13:29
-
I am making standalone application and I need to show on mapcanvas open layer map of Italy (epsg: 4326) together with railway and traffic shapes files that i got. I succeed to show that together with map of whole world, with this line of code: layer = QgsRasterLayer("https://services.arcgisonline.com/arcgis/rest/services/World_Street_Map/MapServer?f=json&pretty=true&EPSG=4326", "raster") But when I zoom to Italy, my map wont appear. Something like this: https://gis.stackexchange.com/questions/116238/wms-layer-in-a-qgis-2-4-stand-alone-python-script – user123480 Jul 04 '18 at 14:00
-
It sounds like Italy has a geometry error, if you have access to ArcGIS you can use Repair Geometry or follow instructions https://gis.stackexchange.com/questions/112687/fixing-geometry-validity-errors-in-qgis – Michael Stimson Jul 05 '18 at 02:17
-
Your question is confusing. Open Layers is a web client map app and QgsRasterLayer is a pyqgis object. Do you mean your trying to zoom to an Open Street Map WMS (to Italy) in QGIS? – artwork21 Jul 06 '18 at 12:24