[Qgis-developer] How to pass xMax, xMin, yMax, yMin of a current zoomed view

Echavarria Gregory, Maria Angelica m.echavarriagregory at umiami.edu
Wed Oct 21 17:14:26 EDT 2009


HI EVERYBODY,

Im creating a Qgis application. I need to pass to my code the map coordinates of my current zoomed-in view (need the actual corners in GWS to set the bounds of an image that will be further created in my code and then will be superimposed to this exact map area). I found QgsRect.xMax(), xMin(), yMax() and yMin()... and QgsRect.extent(). Is QgsRect the correct class? how should I use these functions if correct for my purpose? should I write them inside my zoomIn tool method after self.canvas.setMapTool(self.toolZoomIn)? none of my trials has worked... please I need guidance.

Thanks a lot
Angelica.


M. Angelica Echavarria-Gregory,
Ph.D Candidate
University of Miami
Phone 305 284-3611


More information about the Qgis-developer mailing list