mpetazzoni / leaflet-gpx

A GPX track plugin for Leaflet.js
http://mpetazzoni.github.io/leaflet-gpx
BSD 2-Clause "Simplified" License
550 stars 119 forks source link

leaflet__WEBPACK_IMPORTED_MODULE_1__.GPX is not a constructor #97

Closed davidof1977 closed 4 years ago

davidof1977 commented 4 years ago

Hi,

I am trying to show a gpx in the map. And i am getting the following error, i am developing a angular 9 web app.

ERROR TypeError: leaflet__WEBPACK_IMPORTED_MODULE_1__.GPX is not a constructor

I am using "leaflet": "1.6.0", "leaflet-gpx": "^1.5.0",

My index.html page is like this

<!doctype html>

OrganizadorRutas

Can you help me?

Thx

davidof1977 commented 4 years ago

Finally i solve my problem.

mpetazzoni commented 4 years ago

This seems like an issue with integrating Leaflet into an Angular app that's packaged by webpack. Not something I'm testing for, but I'm also not doing anything specific that would prevent it from working. Glad you figured it out.