Hi Tom On Mon, Nov 27, 2017 at 1:03 PM, Tom Chadwin <[email protected]> wrote: > Hello all > > I thought this might have been asked before, but if so, I've failed to find > it. How do you determine in PyQGIS whether a layer is an OpenLayers plugin > layer?
Something like this should work: isinstance(layer, QgsPluginLayer) and layer.pluginLayerType() == 'openlayers' There may be other types of plugin layers (e.g. crayfish, quickmapservices), that's why one needs to check the plugin layer type as well. Cheers Martin _______________________________________________ QGIS-Developer mailing list [email protected] List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer
