Hi all!
I'm trying to snap a vertex with my python plugin. (Many thanks to Martin for
the quick work with the bindings!)
My code looks like this:
def canvasReleaseEvent(self,event):
x = event.pos().x()
y = event.pos().y()
startingPoint = QPoint(x,y)
result = []
e
Here's what I do for snapping in python:
def canvasReleaseEvent(self, e):
print "mouse click", e
mapcoords =
self.canvas.getCoordinateTransform().toMapCoordinates(e.x(), e.y())
print "map position", mapcoords
snapdist = 2
r = qgis_utils.snap(self.layer,
on Möri Cedric
Gesendet: Di 18.11.2008 18:43
An: qgis-user@lists.osgeo.org
Betreff: [Qgis-user] getting QgsMapCanvasSnapper to work
Hi all!
I'm trying to snap a vertex with my python plugin. (Many thanks to Martin for
the quick work with the bindings!)
My code looks like this:
def canv
---Ursprüngliche Nachricht-
> Von: [EMAIL PROTECTED] im Auftrag von Möri Cedric
> Gesendet: Di 18.11.2008 18:43
> An: qgis-user@lists.osgeo.org
> Betreff: [Qgis-user] getting QgsMapCanvasSnapper to work
>
> Hi all!
>
> I'm trying to snap a vertex with my pyth
Hi,
On Tue, Nov 18, 2008 at 11:00 PM, Hugentobler Marco
<[EMAIL PROTECTED]> wrote:
> Hi Cedric
>
> I used your code lines and started the debugger. It seems that the
> QgsMapCanvasSnapper works correctly. I think the problem has to do with the
> QList reference in the binding:
>
> int snapToCur
Hi Martin
Thanks a lot!
It works for me now.
Regards,
Marco
On Wednesday 19 November 2008 21:12:39 Martin Dobias wrote:
> Hi,
>
> On Tue, Nov 18, 2008 at 11:00 PM, Hugentobler Marco
>
> <[EMAIL PROTECTED]> wrote:
> > Hi Cedric
> >
> > I used your code lines and started the debugger. It seems th