From: Michael Vogel Date: Tue, 23 Jun 2015 05:32:14 +0000 (+0200) Subject: API: Return the geo coordinates X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7e4fc930b4435fcc54838e1e42898493e3734769;p=friendica.git API: Return the geo coordinates --- diff --git a/include/api.php b/include/api.php index d1132635d3..b5d8f9cf3d 100644 --- a/include/api.php +++ b/include/api.php @@ -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; };