Hi, I have a QgsComposerMap that I want to zoom to the extent of a feature in a vector layer.
geomBBRect = geometry.boundingBox() myComposerMap.zoomToExtent(geomBBRect) I am trying to use zoomToExtent to make the map show the correct area. However, I get a blank map when I run my code. If I check what the current scale is, its returned as 'nan'. I tried using setNewExtent() before, but this alters the size of my QgsComposerMap. I want to keep the same map size each time. After doing a little bit of checking, it seems that: myComposerMap.currentMapExtent().xMinimum())) myComposerMap.currentMapExtent().xMaximum())) both return 'nan' but yMinimum and yMaximum return coordinates. I can not figure out why. Can anyone help shed any light on the problem? I can provide more code if needed. James
_______________________________________________ Qgis-developer mailing list [email protected] List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
