[Qgis-developer] problem in using maptool
Arpita Singh
singarpita at gmail.com
Fri Oct 23 06:40:30 EDT 2009
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
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.
--
Arpita
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20091023/0ab817fd/attachment.html
More information about the Qgis-developer
mailing list