Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Nov 14th, 2018 84 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. class Class1:
  2.     def __init__(self):
  3.         """Constructor."""
  4.  
  5.     def get_location(self):
  6.         canvas = iface.mapCanvas()
  7.         clicked_points=canvas.setMapTool(Class2(self,canvas))
  8.         print(clicked_points)
  9.         iface.actionPan().trigger()
  10.  
  11. class Class2(QgsMapTool):
  12.     def __init__(self,canvas):
  13.         QgsMapTool.__init__(self, canvas)
  14.         self.setCursor(Qt.CrossCursor)
  15.         self.parent_class=parent_class
  16.  
  17.     def canvasReleaseEvent(self, event):
  18.         return [event.pos().x(),event.pos().y()]
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top