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 not loaded correctly - they are ignored #6

Closed
robertblackwell opened this issue Mar 7, 2017 · 4 comments
Closed

waypoints not loaded correctly - they are ignored #6

robertblackwell opened this issue Mar 7, 2017 · 4 comments
Assignees
Labels

Comments

@robertblackwell
Copy link
Contributor

robertblackwell commented Mar 7, 2017

The following simple gpx file of 4 waypoints and nothing else does not load correctly.

<?xml version="1.0" encoding="UTF-8"?>
<gpx xmlns="http://www.topografix.com/GPX/1/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1" creator="phpGPX/1.0-RC1" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd">
  <metadata>
    <desc>My pretty awesome GPX file, created using phpGPX library!</desc>
    <link href="https://sibyx.github.io/phpgpx">
      <text>phpGPX Docs</text>
    </link>
    <time>2017-03-07T19:24:13+00:00</time>
  </metadata>
  <wpt lat="54.932862108889" lon="9.8606242161401">
    <ele>0</ele>
    <time>2017-03-07T19:25:13+00:00</time>
  </wpt>
  <wpt lat="54.832932373209" lon="9.7609220868149">
    <ele>10</ele>
    <time>2017-03-07T19:26:13+00:00</time>
  </wpt>
  <wpt lat="54.733277435212" lon="9.6618781654375">
    <ele>42.42</ele>
    <time>2017-03-07T19:27:13+00:00</time>
  </wpt>
  <wpt lat="54.633423261679" lon="9.5624398496799">
    <ele>12</ele>
    <time>2017-03-07T19:28:13+00:00</time>
  </wpt>
</gpx>

The following simple script

$of = dirname(__FILE__)."/test.gpx";
$gpx = new \phpGPX\phpGPX();
$file = $gpx->load($of);

produces a $gpx object with an empty waypoint array.

@Sibyx Sibyx self-assigned this Mar 7, 2017
@Sibyx Sibyx added the bug label Mar 7, 2017
@Sibyx Sibyx assigned robertblackwell and unassigned Sibyx Mar 8, 2017
@Sibyx
Copy link
Owner

Sibyx commented Mar 8, 2017

Hi, I am sorry for the bug. I have noticed that you resolved the issue in your fork, can you please create a pull request?

@robertblackwell
Copy link
Contributor Author

robertblackwell commented Mar 8, 2017 via email

@robertblackwell
Copy link
Contributor Author

robertblackwell commented Mar 8, 2017 via email

@Sibyx
Copy link
Owner

Sibyx commented Mar 8, 2017

Resolved with #7

@Sibyx Sibyx closed this as completed Mar 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants