protected function GeoRSS::parsePoints in geoPHP 7
Same name and namespace in other branches
- 8 geoPHP/lib/adapters/GeoRSS.class.php \GeoRSS::parsePoints()
1 call to GeoRSS::parsePoints()
- GeoRSS::geomFromXML in geoPHP/
lib/ adapters/ GeoRSS.class.php
File
- geoPHP/
lib/ adapters/ GeoRSS.class.php, line 105
Class
- GeoRSS
- PHP Geometry/GeoRSS encoder/decoder
Code
protected function parsePoints() {
$points = array();
$pt_elements = $this->xmlobj
->getElementsByTagName('point');
foreach ($pt_elements as $pt) {
if ($pt
->hasChildNodes()) {
$point_array = $this
->getPointsFromCoords(trim($pt->firstChild->nodeValue));
}
if (!empty($point_array)) {
$points[] = $point_array[0];
}
else {
$points[] = new Point();
}
}
return $points;
}