[Qgis-developer] Some questions about PyQGIS

Germán Carrillo carrillo.german at gmail.com
Sun Apr 12 22:29:57 EDT 2009


Hi Martin.

> Someone probably forgot to add this function to python bindings...
> I've revised the bindings and fixed this (and few more missing
> functions) in svn trunk (r10467) and it will be included in version
> 1.1.

> But I don't think setScale() is the right method. In fact it just a
> workaround for map composer to show layers with scale-based visibility
> correctly. I'm not aware of direct method that would do it. You can
> check QgsScaleCalculator code that calculates scale from map extent -
> so you should be able to do inverse calculation.

Thanks, I will check it.

> Yes, you can do it by setting destination CRS in map renderer
> associated with map canvas.

Yes, it works!

> Right :)
> In case you need them, I can create those wrappers...

Please do it, I need them. :)

>> 4. Implementing the QgsMapTool class I have no way to get the DoubleClick
>> event, I did this:
>>     -------------
>>     def canvasDoubleClickEvent(self,event):
>>         print "Yes"
>>     -------------
>>    But it doesn't work. I get two (Raise) Release events instead of
DoubleClick one.
>> (I really want the DoubleClick event)
> I have no idea about this one. The bindings are in place, so the
> problem might be in dispatch of double click from canvas.
:-/

Thank you Martin.

-- 
-----------
  |\__
(:>__)(
  |/

Soluciones Geoinformáticas Libres
http://geotux.tuxfamily.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20090412/be27c656/attachment.html


More information about the Qgis-developer mailing list