AnsweredAssumed Answered

onMouseDownMap event with Line shape - Addin Tool

Question asked by yoavabadi4 on Sep 7, 2018
Latest reply on Sep 9, 2018 by yoavabadi4

Hi,

I'm having issuses 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 need to ignore certain points on the polyline, indicated by ctrl+left mouse click.

 

Does anybody knows how can I get thouse events while drawing a line?

 

Thanks,

Yoav.

 

P.S: There's a code example:

 

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

Outcomes