You are here

public function GPX::collectionToGPX in geoPHP 7

Same name and namespace in other branches
  1. 8 geoPHP/lib/adapters/GPX.class.php \GPX::collectionToGPX()
1 call to GPX::collectionToGPX()
GPX::geometryToGPX in geoPHP/lib/adapters/GPX.class.php

File

geoPHP/lib/adapters/GPX.class.php, line 170

Class

GPX
PHP Geometry/GPX encoder/decoder

Code

public function collectionToGPX($geom) {
  $gpx = '';
  $components = $geom
    ->getComponents();
  foreach ($geom
    ->getComponents() as $comp) {
    $gpx .= $this
      ->geometryToGPX($comp);
  }
  return $gpx;
}