Skip to content
New issue

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

Fix/gpx export chrome #131

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

tofublock
Copy link

This fixes a trail export problem with Chrome-based browsers.

The export function used to add a duplicate "xmlns" attribute to the tag in Chrome and Edge, which led to a malformed GPX file (see #128). Additionally, GeoJSONs were produced as empty lists, like {"type":"FeatureCollection","features":[]}.

I fixed the malformed XML issue by declaring the default namespace and adding it back in for Firefox (which seems to swallow it), instead of the other way around. By doing that, the second problem resolved itself as well and GeoJSONs are now produced as expected.

Tested in Edge and Firefox. All outputs tested to be valid JSON and XML files.

@tofublock tofublock marked this pull request as ready for review November 23, 2024 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant