[Qgis-developer] API functions
Martin Dobias
wonder.sk at gmail.com
Thu Jun 29 04:26:38 EDT 2006
On 6/28/06, Mathieu Ouimet <noryoku at gmail.com> wrote:
> Hi,
>
> Is it possible to obtain a position on the map ( well-known text (wkt) or
> well-known binary (wkb) ) by the click of the mouse in the map canvas??? Is
> there a fonction in the Qgis API who does that??
Hi Mathieu,
yes this is possible in current development version (which will be
version 0.8). You can create a plugin with your custom class derived
from QgsMapCanvasTool which will handle clicks on map canvas and use
the position for any use you might want.
>
> Also, with a position in the wkt or wkb format, is it possible to zoom to
> the position. Is there a fonction in the Api like
> "zoomToPosition(position)" where the position is a wkt or wkb.
You can use function QgsMapCanvas::setExtent to change extent of the
map canvas. For conversion from/to wkt/wkb use class QgsGeometry.
Martin
>
> Thx a lot :)
>
> --
> Mathieu Ouimet
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.qgis.org
> http://lists.qgis.org/cgi-bin/mailman/listinfo/qgis-developer
>
>
>
More information about the Qgis-developer
mailing list