Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
add wms
wms_url = 'http://maps.rosreestr.ru/arcgis/services/Cadastre/CadastreWMS/MapServer/WMSServer?format=image/png&layers=1&styles=&crs=EPSG:3857'
layer = QgsRasterLayer('url=%s' % wms_url, 'Test WMS', 'wms')
if not layer.isValid():
QgsMessageLog.logMessage('ops', level=QgsMessageLog.CRITICAL)
else:
QgsMapLayerRegistry.instance().addMapLayer(layer)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment