I spent a few hours trying to figure out why this library wasn't working. Setting map option preferCanvas: true causes any call to map.editTools.start_SHAPE_() to throw errors on each click. Below is the stack trace from the non minified code:
Uncaught TypeError: Cannot read property 'contains' of undefined
at NewClass.L.Polygon._containsPoint (Canvas.js:485)
at NewClass._handleMouseHover (Canvas.js:366)
at NewClass._onMouseMove (Canvas.js:347)
at NewClass.wrapperFn (Util.js:89)
at HTMLCanvasElement.handler (DomEvent.js:72)
I spent a few hours trying to figure out why this library wasn't working. Setting map option
preferCanvas: true
causes any call tomap.editTools.start_SHAPE_()
to throw errors on each click. Below is the stack trace from the non minified code:Uncaught TypeError: Cannot read property 'contains' of undefined at NewClass.L.Polygon._containsPoint (Canvas.js:485) at NewClass._handleMouseHover (Canvas.js:366) at NewClass._onMouseMove (Canvas.js:347) at NewClass.wrapperFn (Util.js:89) at HTMLCanvasElement.handler (DomEvent.js:72)