protected function GPX::parseWaypoints in geoPHP 7        
                          
                  
                        Same name and namespace in other branches
- 8 geoPHP/lib/adapters/GPX.class.php \GPX::parseWaypoints()
1 call to GPX::parseWaypoints()
  - GPX::geomFromXML in geoPHP/lib/adapters/GPX.class.php
File
 
   - geoPHP/lib/adapters/GPX.class.php, line 92
Class
  
  - GPX 
- PHP Geometry/GPX encoder/decoder
Code
protected function parseWaypoints() {
  $points = array();
  $wpt_elements = $this->xmlobj
    ->getElementsByTagName('wpt');
  foreach ($wpt_elements as $wpt) {
    $lat = $wpt->attributes
      ->getNamedItem("lat")->nodeValue;
    $lon = $wpt->attributes
      ->getNamedItem("lon")->nodeValue;
    $points[] = new Point($lon, $lat);
  }
  return $points;
}