[Qgis-developer] Map Canvas Current Zoomed Extent

Bjorn Nyberg bjorn.burr.nyberg at gmail.com
Mon Jan 13 01:28:51 PST 2014


Hi,

I had a couple of questions that I was hoping could be answered here on the
mailing list. I am trying to write some code to find the current zoomed in
rectangular extent of my Map Canvas by the following pyqgis API function
<http://qgis.org/api/classQgsMapCanvas.html#a878f0c387c9475d59c6aac425db01020>
 QgsMapCanvas.extent()

however I receive the error

TypeError: QgsMapCanvas.extent(): first argument of unbound method must
have type 'QgsMapCanvas'

Im not entirely certain what that is saying - first argument of unbound
method?

I want to apply this rectangular extent to the openlayers google earth
imagery and extract the current imagery as a spatially referenced raster
image. I dont know if anyone else has done this already or had some
suggestions? I was thinking that one could get the rendered image view in
the canvas and simply apply the extent mentioned above within the WGS84
datum?

Any help is appreciated,
Cheers,
Bjorn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20140113/fc999c02/attachment.html>


More information about the Qgis-developer mailing list