Last active
August 29, 2015 14:11
-
-
Save yellow-sky/e2b4ff752c49aef887e0 to your computer and use it in GitHub Desktop.
add wms
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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