mirror of
https://github.com/friendica/friendica
synced 2024-12-23 06:40:15 +00:00
API: Return the geo coordinates
This commit is contained in:
parent
a58596e00a
commit
7e4fc930b4
1 changed files with 8 additions and 3 deletions
|
@ -2236,9 +2236,14 @@
|
|||
unset($status["user"]["uid"]);
|
||||
unset($status["user"]["self"]);
|
||||
|
||||
// 'geo' => array('type' => 'Point',
|
||||
// 'coordinates' => array((float) $notice->lat,
|
||||
// (float) $notice->lon));
|
||||
if ($item["coord"] != "") {
|
||||
$coords = explode(' ',$item["coord"]);
|
||||
if (count($coords) == 2) {
|
||||
$status["geo"] = array('type' => 'Point',
|
||||
'coordinates' => array((float) $coords[0],
|
||||
(float) $coords[1]));
|
||||
}
|
||||
}
|
||||
|
||||
$ret[] = $status;
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue