You are here

private function KML::pointToKML in geoPHP 7

Same name and namespace in other branches
  1. 8 geoPHP/lib/adapters/KML.class.php \KML::pointToKML()
1 call to KML::pointToKML()
KML::geometryToKML in geoPHP/lib/adapters/KML.class.php

File

geoPHP/lib/adapters/KML.class.php, line 215

Class

KML
PHP Geometry/KML encoder/decoder

Code

private function pointToKML($geom) {
  $out = '<' . $this->nss . 'Point>';
  if (!$geom
    ->isEmpty()) {
    $out .= '<' . $this->nss . 'coordinates>' . $geom
      ->getX() . "," . $geom
      ->getY() . '</' . $this->nss . 'coordinates>';
  }
  $out .= '</' . $this->nss . 'Point>';
  return $out;
}