Hi everybody,
I hope to be in the right section, and eventually apologize in advance.
I cannot get away from this error whenever I try to draw anything on my map, in particular during the initialization of the Marker object.
Some code:
new L.Marker(latlng,options);
where
latlng:lat:1.3486810687613844 lng: 103.96888822317123
options:icon:{ _initHooksCalled:true, options:Object, __proto__:NewClass }
innerIcon:undefined
states:Array[0]
style:null
The stack error is the following:
TypeError: Cannot read property 'Marker' of undefined
at MetagisMarker. (leaflet.draw.js:9)
at UserProfileOutputController.addProfile (UserProfileOutputController.js:112) "Possibly unhandled rejection: {}"
MetagisMarker is just a class which extends the Leaflet marker class.
Similar behaviour I get when I try to draw a Polygon or Polilyne:
TypeError: Cannot read property 'draw' of undefined
at DrawPolylineHandler.initialize (leaflet.draw.js:9)
at DrawPolylineHandler.NewClass [as constructor] (leaflet-src.js:229)
at DrawPolylineHandler (DrawPolylineHandler.js:12)
at DrawControl.drawGeometry (DrawControl.js:99)
at DrawControl.create (DrawControl.js:44)
at OntowizardMap.createObject (OntowizardMap.js:64)
I am using:
Thanks in advance for your help...anything is appreciated