[Qgis-developer] problem in using maptool
Tim Sutton
lists at linfiniti.com
Sat Oct 24 03:34:52 EDT 2009
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi
Arpita Singh wrote:
> Hi,
>
> I am new to QGIS, and I am trying to build an application.
> I downloaded your tutorial it worked nicely even i was able to use
> ZoomFullExtent, ZoomPrevious.
> but when I tried "qgsmaptoolidentify" it gave an error as:
>
> File "E:\project\viewer.py", line 158, in __init__
> self.toolIdentify = QgsMapToolIdentify(self.canvas)
> NameError: global name 'QgsMapToolIdentify' is not defined
>
did you add an include for the qgsmaptoolidentify.h to the header?
Regards
Tim
> I used the above stated header as:
>
> self.toolPan = QgsMapToolPan(self.canvas)
> self.toolPan.setAction(self.mpActionPan)
> self.toolIdentify = QgsMapToolIdentify(self.canvas)
> self.toolIdentify.setAction(self.mpActionIdentify)
> self.toolZoomIn = QgsMapToolZoom(self.canvas,False)
> self.toolZoomIn.setAction(self.mpActionZoomIn)
> self.toolZoomOut = QgsMapToolZoom(self.canvas, True)
> self.toolZoomOut.setAction(self.mpActionZoomOut)
>
> def pan(self):
> self.canvas.setMapTool(self.toolPan)
> def zoomIn(self):
> self.canvas.setMapTool(self.toolZoomIn)
> def zoomOut(self):
> self.canvas.setMapTool(self.toolZoomOut)
> def zoomFull(self):
> self.canvas.zoomFullExtent()
> def info_(self):
> self.canvas.setMapTool(self.toolIdentify)
>
> Please help me by giving any idea.
> thanks in advance
>
> regards.
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
- --
Tim Sutton - QGIS Project Steering Committee Member (Release Manager)
==============================================
Please do not email me off-list with technical
support questions. Using the lists will gain
more exposure for your issues and the knowledge
surrounding your issue will be shared with all.
Visit http://linfiniti.com to find out about:
* QGIS programming and support services
* Mapserver and PostGIS based hosting plans
* FOSS Consulting Services
Skype: timlinux
Irc: timlinux on #qgis at freenode.net
==============================================
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkrirdIACgkQqk07qZdiYjeGDQCgkbSb05eQZqgI66dHaU7Mr5CG
eC8Anjdtfss6FKDIjI/zgYZFC+KJmQXZ
=MuPo
-----END PGP SIGNATURE-----
More information about the Qgis-developer
mailing list