mpetazzoni / leaflet-gpx

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

Added error event when no layers can be parsed from file #79

Closed jlevers closed 5 years ago

jlevers commented 5 years ago

I spent a while trying to figure out why a page I'd built wouldn't load with this plugin using certain GPX files. I discovered that it was because I was trying to get waypoint data only, and sometimes the files didn't have any waypoints.

I figured that issue would be a lot easier to debug if an error event fired when no layers of the specified type could be parsed out of the file.

Thanks!

mpetazzoni commented 5 years ago

Awesome; thanks!