We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Options:
kml
The text was updated successfully, but these errors were encountered:
Here are a few lines useful to achieve this:
if (data.indexOf("<") != 0) { throw 'Invalid XML'; } let xml = (new DOMParser()).parseFromString(data, "text/xml"); let type = xml.documentElement.tagName.toLowerCase(); // "kml" or "gpx" if (xml.getElementsByTagName('parsererror').length) { throw 'Invalid XML'; }
Source: leaflet-elevation/src/control.js#L956-L975
👋 Raruto
Sorry, something went wrong.
No branches or pull requests
Options:
kml
tag, if it is not found, return an error.The text was updated successfully, but these errors were encountered: