justinmanley / leaflet-draw-toolbar

Leaflet.toolbar for Leaflet.draw. Example: https://justinmanley.github.io/leaflet-draw-toolbar/examples/popup.html.
66 stars 24 forks source link

Trouble Implementing Example #13

Closed tinjaw closed 5 years ago

tinjaw commented 5 years ago

I am trying to implement https://justinmanley.github.io/leaflet-draw-toolbar/examples/control.html on my own server. I have it hosted at https://Leaflet-Sandbox--tinjaw.repl.co. I can draw shapes fine, but when I click on the edit button I get an error.

leaflet.js:formatted:3391 Uncaught TypeError: Cannot read property 'hasOwnProperty' of undefined
    at i.setStyle (leaflet.js:formatted:3391)
    at i.addHooks (leaflet.draw.js:9)
    at i.enable (leaflet.js:formatted:2546)
    at i._enableLayerEdit (leaflet.draw.js:9)
    at i.eachLayer (leaflet.js:formatted:2997)
    at i.addHooks (leaflet.draw.js:9)
    at i.enable (leaflet.js:formatted:2546)
    at i.enable (leaflet.draw.js:9)
    at i.enable (leaflet.draw-toolbar.js:168)
    at i.enable (leaflet.toolbar.js:1)

I tried looking for other options to request help (like forums or Gitter), but submitting an issue is the only option I see available to me.

tinjaw commented 5 years ago

Found issue. Breaking change from Leaflet 1.4.0 to 1.5.0. Issue surfaces in leaflet-draw, not leaflet-draw-toolbar.