1
0
Fork 0

Merge pull request #1687 from annando/1506-location-api

API: Return the geo coordinates
This commit is contained in:
Tobias Diekershoff 2015-06-25 00:00:01 +02:00
commit 64655ee546

View file

@ -2236,9 +2236,14 @@
unset($status["user"]["uid"]); unset($status["user"]["uid"]);
unset($status["user"]["self"]); unset($status["user"]["self"]);
// 'geo' => array('type' => 'Point', if ($item["coord"] != "") {
// 'coordinates' => array((float) $notice->lat, $coords = explode(' ',$item["coord"]);
// (float) $notice->lon)); if (count($coords) == 2) {
$status["geo"] = array('type' => 'Point',
'coordinates' => array((float) $coords[0],
(float) $coords[1]));
}
}
$ret[] = $status; $ret[] = $status;
}; };