Re: [Qgis-user] Python Bindings and Labels
On Feb 9, 2008 3:17 AM, Tim Sutton [EMAIL PROTECTED] wrote: Hi You should be able to do something like this (untested estimate based on C++ api and sip definition file): myLayer.setLabelOn(true); QgsLabel myLabel = myLayer.label(), myLabel.setLabelField( QgsLabel.Angle, fieldIndex); Yes, this code should work, it's trivial to convert it to pythonic syntax. For an example of using labeling, take a look at tutorial 3: http://blog.qgis.org/?q=node/59 Martin ___ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
[Qgis-user] Python Bindings and Labels
Hi All, Quick question - is it possible to use an attribute defined angle for a label with the python bindings? If so, how do I set it? I haven't found anything in the doc's that suggest I can do it. Thanks, Rob McCulley GIS Coordinator County of Vermilion River (780) 846-2244 www.vermilion-river.ab.ca http://www.vermilion-river.ab.ca/ ___ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user
Re: [Qgis-user] Python Bindings and Labels
Hi You should be able to do something like this (untested estimate based on C++ api and sip definition file): myLayer.setLabelOn(true); QgsLabel myLabel = myLayer.label(), myLabel.setLabelField( QgsLabel.Angle, fieldIndex); Regards Tim 2008/2/8, Rob McCulley [EMAIL PROTECTED]: Hi All, Quick question – is it possible to use an attribute defined angle for a label with the python bindings? If so, how do I set it? I haven't found anything in the doc's that suggest I can do it. Thanks, Rob McCulley GIS Coordinator County of Vermilion River (780) 846-2244 www.vermilion-river.ab.ca ___ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user -- Tim Sutton QGIS Project Steering Committee Member - Release Manager Visit http://qgis.org for a great open source GIS openModeller Desktop Developer Visit http://openModeller.sf.net for a great open source ecological niche modelling tool Home Page: http://tim.linfiniti.com Skype: timlinux Irc: timlinux on #qgis at freenode.net ___ Qgis-user mailing list Qgis-user@lists.qgis.org http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-user