Skip to content

Commit

Permalink
KML no longer needs to cast to floatval
Browse files Browse the repository at this point in the history
  • Loading branch information
phayes committed Apr 13, 2011
1 parent 4e3c6a2 commit 7e0da7a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/adapters/KML.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,14 +98,14 @@ protected function childElements($xml, $nodename = '') {

protected function parsePoint($xml) {
$coordinates = $this->_extractCoordinates($xml);
return new Point(floatval($coordinates[0][0]),floatval($coordinates[0][1]));
return new Point($coordinates[0][0],$coordinates[0][1]);
}

protected function parseLineString($xml) {
$coordinates = $this->_extractCoordinates($xml);
$point_array = array();
foreach ($coordinates as $set) {
$point_array[] = new Point(floatval($set[0]),floatval($set[1]));
$point_array[] = new Point($set[0],$set[1]);
}
return new LineString($point_array);
}
Expand Down

0 comments on commit 7e0da7a

Please sign in to comment.