-
Notifications
You must be signed in to change notification settings - Fork 67
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
Look for opencpn extensions to GPX #129
base: main
Are you sure you want to change the base?
Conversation
It seems wrong that every additional private extension namespace requires an update to this library. I'm planning to add yet another namespace since I don't control opencpn. Wouldn't it be possible to just automatically add every |
Yeah, good point. Latest changes look for all possible xmlns: extensions, which picks up a lot more. We've got one example in test data of usage of <extensions>
<gpxx:TrackExtension xmlns:gpxx="http://www.garmin.com/xmlschemas/GpxExtensions/v3">
<gpxx:DisplayColor>Transparent</gpxx:DisplayColor>
</gpxx:TrackExtension>
</extensions> So I'm adding the gpxx URL by default to the list of detected namespaces. Thoughts - this seems more comprehensive? |
Can you have multiple namespaces simultaneously active? Like:
|
Yes, this should handle as many namespaces as are defined in the gpx root tag. |
Does this seem doable for your usecase? I could merge, or release a prerelease tag if you want to try it out. |
Looks perfect. I was just trying to figure out how to build it for testing, but if you could either merge or pre-release, that would be great. A mention in the readme about supporting arbitrary namespaces might be a good idea too. Thanks for moving on this quickly! |
Great, pushed 6.0.0-0 to npm, try it out! |
I tried it with a bunch of .gpx files and it solves all of my main issues. Thanks! The one remaining point is that I have a GPX file which has properties attached to route waypoints.
I don't know if this is legal or common, but would it be possible to add |
The GPX extensions support is based on a known list of extensions, and it wasn't including this opencpn extension. This adds the OpenCPN extension namespace, which adds support for those rte extensions.
cc @jaybo