mpetazzoni / leaflet-gpx

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

loaded event not firing #66

Closed quilkin closed 6 years ago

quilkin commented 6 years ago

I tried running the simple example in the readme, and also tried copying your demo file to my system (and to my remote site). In all cases the 'loaded' event of new 'L.GPX' doesn't get fired (I debugged with Chrome, and Firefox). Tried with my own gpx file and your demo one, all in same folder as index.html - same result each time. Yet it clearly does get fired when I run the demo on your own site. Clearly I'm doing something fundamentally wrong but I can't see what!

mpetazzoni commented 6 years ago

Can you share your code? What's serving your GPX file?

quilkin commented 6 years ago

Code is exactly as your demo. I just copied index.html and the gpx file. BUT - now found that if i just run the html direct from a Windows folder (or from my remote site) it works fine. The code only stops before the 'loaded' event when running in the IDE/debugger (VS2015). Strange.

mpetazzoni commented 6 years ago

Is it actually making the request for the GPX file correctly in that situation, and loading the file? As in, is it a load issue, or an event issue?

florentsorel commented 4 years ago

I think it's a duplicate https://github.com/mpetazzoni/leaflet-gpx/issues/24

I have the same issue. The event is never fired.