I have created one python addin tool which creates some points along a line, it works good. my problem is when my tool gets activated i am not able able to zoom/pan the map. map view just get stuck wherever it was before clicking on that tool. more elaborately when i am in the middle of creating a line map view get stuck. using below code: class PointAddressCreateClass(object😞 """Implementation for PointAddressCreate_addin.tool (Tool)""" def __init__(self😞 self.enabled = True self.shape = "Line" # Can set to "Line", "Circle" or "Rectangle" for interactive shape drawing and to activate the onLine/Polygon/Circle event sinks. def onMouseDown(self, x, y, button, shift😞 pass def onMouseDownMap(self, x, y, button, shift😞 pass def onMouseUp(self, x, y, button, shift😞 pass def onMouseUpMap(self, x, y, button, shift😞 pass def onMouseMove(self, x, y, button, shift😞 pass def onMouseMoveMap(self, x, y, button, shift😞 pass def onDblClick(self😞 pass def onKeyDown(self, keycode, shift😞 pass def onKeyUp(self, keycode, shift😞 pass def deactivate(self😞 pass def onCircle(self, circle_geometry😞 pass def onLine(self, line_geometry😞 ***Some Code HERE****
its main functionality lies in "def onLine(self, line_geometry)" function. so when i click on the map and start to create a line on map, i want zoom/pan functionality at that time. i guess there should be a function to zoom/pan in active view by either mouse scrolling or may be any other method |