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

Waypoints at the root of the gpx tag #66

Closed
nshontz opened this issue Jul 21, 2023 · 5 comments
Closed

Waypoints at the root of the gpx tag #66

nshontz opened this issue Jul 21, 2023 · 5 comments

Comments

@nshontz
Copy link

nshontz commented Jul 21, 2023

Problem description

  1. Library version or last commit you have: 1.2.1
  2. PHP version you use: 8.2.1
  3. Detailed problem description

I need to generate a GPX file with waypoints at the root of the gpx tag. If I were to create a PR for this and the extensions (#41) would you consider it?

Code snippet you use

<gpx ...

  <metadata>
 <link href="https://www.adventurecycling.org">
      <text>Copyright 2021 Adventure Cycling Association</text>
    </link>
    <time>2021-08-31T19:10:51Z</time>
    <bounds maxlat="46.896566022187471" maxlon="-111.09867101535201" minlat="44.65610601939261" minlon="-114.17844995856285" />

 </metadata>
 
<wpt lat="45.293238032609224" lon="-111.9429490249604">
    <ele>0</ele>
    <time>2020-07-17T20:15:01Z</time>
    <name>?B&amp;B-Bennett House Country Inn B&amp;B</name>
    <cmt>tel://406-843-5220, tel://877-843-5220, 115 E. Idaho St., Virginia City, MT</cmt>
    <desc>tel://406-843-5220, tel://877-843-5220, 115 E. Idaho St., Virginia City, MT</desc>
    <sym>Lodging</sym>
    <type>user</type>
    <extensions>
      <gpxx:WaypointExtension>
        <gpxx:DisplayMode>SymbolAndName</gpxx:DisplayMode>
      </gpxx:WaypointExtension>
      <wptx1:WaypointExtension>
        <wptx1:DisplayMode>SymbolAndName</wptx1:DisplayMode>
      </wptx1:WaypointExtension>
      <ctx:CreationTimeExtension>
        <ctx:CreationTime>2020-07-17T20:15:01Z</ctx:CreationTime>
      </ctx:CreationTimeExtension>
    </extensions>
  </wpt>

Possible solution

Allow points at the root of the GPX File

Something interesting or funny

Where do bad rainbows go?

  • Prism. It's a light sentence and gives them time to reflect.

Checklist

Put x into brackets if true.

[ ] PHP version I use
[ ] Package version I use

@Sibyx
Copy link
Owner

Sibyx commented Jul 21, 2023

Hello @nshontz, you can create waypoints directly in gpx root. Check the example waypoints_create.php. If you want to help with extensions I will gladly accept your PR (but would like to have a discussion about it first).

@Sibyx
Copy link
Owner

Sibyx commented Jul 25, 2023

@nshontz let me know if you are satisfied with the provided example.

@nshontz
Copy link
Author

nshontz commented Jul 25, 2023

Thank you! that worked beautifully. I'm waiting to see if the extensions are necessary from my employer and will check in about that when I hear. Hopefully it won't be another four years...

@Sibyx
Copy link
Owner

Sibyx commented Jul 25, 2023

Glad to hear that. Time flies 😂 I'm encouraging myself for many years to create a second major release (both the codebase and the documentation need it).

@Sibyx
Copy link
Owner

Sibyx commented Jul 25, 2023

@nshontz Anyway. I am closing the issue (because there is no real problem with waypoints). Let me know if you want to help with GPX extensions by opening new issue.

@Sibyx Sibyx closed this as completed Jul 25, 2023
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

No branches or pull requests

2 participants