can not read properties
-
So since my url for the gpx was messed up i have uploaded the file to my server directly.
When i now change the url to /plan.gpx it get a status 200 and with application in the header.However i get tnhis errer:
construct-leaflet-map.min.js?ver=3.0.4:1 TypeError: Cannot read properties of undefined (reading ‘addLayer’)
at i.addTo (Layer.js:52:7)
at Object.getGroup (construct-leaflet-map.min.js?ver=3.0.4:1:1215)
at Object.newMarkerGroup (construct-leaflet-map.min.js?ver=3.0.4:1:1268)
at Object.getCurrentGroup (construct-leaflet-map.min.js?ver=3.0.4:1:1060)
at WPLeafletkmlShortcode ((index):232:39)
at t (construct-leaflet-map.min.js?ver=3.0.4:1:107)
at init (construct-leaflet-map.min.js?ver=3.0.4:1:355)I have no clue to what that means, but some googling seems to suggest that the add layer thingie is to soon, before the DCOM (whatever that means) is loaded.
The suggestion was to move the script to the end of the body of the page, probably to make sure all else is loaded first.
B ut how do i do that if its true?
- The topic ‘can not read properties’ is closed to new replies.