0

I'm having issues while developing a new addin - it seems that ALL mouse event handlers (except onMouseMove[Map]), doesn't work/blocked when I draw a line in on the map.

I really need that functionality, since my tool needs to ignore certain points on the polyline, indicated by ctrl+left mouse click.

how can I get those events while drawing a line?

class DrawLine(object):
"""Implementation for SomeToolExample.drawline (Tool)"""
    def __init__(self):
        self.enabled = False
        self.shape = "Line"


    def onMouseDown(self, x, y, button, shift):
        # This DOESN'T work (blocked?) while a drawing a line
        pass


    def onMouseDownMap(self, x, y, button, shift):
        # This DOESN'T work (blocked?) while a drawing a line
        pass


    def onMouseUp(self, x, y, button, shift):
        # This DOESN'T work (blocked?) while a drawing a line
        pass


    def onMouseUpMap(self, x, y, button, shift):
        # This DOESN'T work (blocked?) while a drawing a line
        pass


    def onMouseMove(self, x, y, button, shift):
        # This is working while a drawing a line
        pass


    def onMouseMoveMap(self, x, y, button, shift):
        # This is working while a drawing a line
        pass


    def onDblClick(self):
        pass


    def onKeyDown(self, keycode, shift):
        # This DOESN'T work (blocked?) while a drawing a line
        pass


    def onKeyUp(self, keycode, shift):
        # This DOESN'T work (blocked?) while a drawing a line
        pass


    def deactivate(self):
        pass


    def onLine(self, line_geometry):
        # Main Logic here, not important for this example
        pass

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.