I am trying to get some layers into a MapCanvas and style them. I am following the PyQgis Cookbook info here but my code is just not working. I've been spinning my wheels on this for over a week now and there's no one in my office familiar enough with python/qgis. What am I missing???
QgsMapLayerRegistry.instance().addMapLayer(layer1) canvas1.setExtent(layer1.extent()) canvas1.setLayerSet( [QgsMapCanvasLayer(layer1)] ) Traceback (most recent call last): File "<input>", line 1, in <module> NameError: name 'QgsMapCanvasLayer' is not defined
In R you just do this:
library(rgdal) nta <- readOGR("my/path", "mylayer") spplot(nta) library(sp) spplot(nta, zcol="symbolAttributes")