1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

Leaflet stopped working suddenly without any code changes

Discussão em 'Angular' iniciado por chrislondon, Outubro 2, 2024.

  1. chrislondon

    chrislondon Guest

    We have an Angular app that has used Leaflet and Leaflet Draw. As of last week it stopped working for everyone and we haven't released any changes. The error message we get in the console is:

    LeafletMapComponent.html:1 ERROR TypeError: Cannot read properties of undefined (reading 'on')
    at NewClass.addHooks (leaflet.draw.js:9:7314)
    at NewClass.enable (leaflet-src.js:5707:1)
    at NewClass.addHandler (leaflet-src.js:3707:1)
    at NewClass.init (leaflet-src.js:380:1)
    at proto.callInitHooks (leaflet-src.js:352:1)
    at NewClass.initialize (leaflet-src.js:3119:1)
    at new NewClass (leaflet-src.js:296:1)
    at createMap (leaflet-src.js:4691:1)
    at leaflet.directive.js:52:28
    at push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invoke (zone.js:388:1)


    or sometimes the error is

    main.71a8060abeb311786191.js:1 ERROR TypeError: Cannot read properties of undefined (reading 'CircleMarker')
    at e.<anonymous> (main.71a8060abeb311786191.js:1:520762)
    at i.callInitHooks (main.71a8060abeb311786191.js:1:97164)
    at new e (main.71a8060abeb311786191.js:1:96306)
    at pointToLayer (main.71a8060abeb311786191.js:1:2251923)
    at Rt (main.71a8060abeb311786191.js:1:177702)
    at Nt (main.71a8060abeb311786191.js:1:177161)
    at e.addData (main.71a8060abeb311786191.js:1:176478)
    at main.71a8060abeb311786191.js:1:2257512
    at Array.forEach (<anonymous>)
    at main.71a8060abeb311786191.js:1:2257402

    Continue reading...

Compartilhe esta Página