Closed sigg3 closed 2 years ago
Reading the togeojson FAQ it seems like some GPX and KML features are unsupported:
KML is a very complex format with many features. Some of these features, like NetworkLinks, folders, and GroundOverlays, don't have a GeoJSON equivalent. In these cases, toGeoJSON doesn't convert the features. It also doesn't crash on these constructs: toGeoJSON should be able to run on all valid KML and GPX files without crashing: but for some files it may have no output.
This might be what I'm seeing, according to this issue @ mapbox/togeojson.
I'll try to remove some layers before pushing it to leaflet.
Turns out the file was not the issue.
Removing zoom="15"
and instead using fitbounds
solved the issue for me (DOH).
Anyway, before I got there, I did convert my files to GeoJSON using these instructions. I believe on-the-fly conversion from gpx or kml to geojson (leaflet native format) is brittle.
Getting an error message when trying to use leaflet-gpx (see below).
Could be because the file is huge (even pruned it has some 400 points). What do you think?