We are no longer offering accounts on this server. Consider https://gitlab.freedesktop.org/ as a place to host projects.

Commit 75975455 authored by Evan Prodromou's avatar Evan Prodromou

Change geopoint to location

parent a2dd5dfe
......@@ -778,12 +778,29 @@ class ActivityObject
if (!empty($this->geopoint)) {
list($lat, $long) = explode(' ', $this->geopoint);
list($lat, $lon) = explode(' ', $this->geopoint);
$object['geopoint'] = array(
'type' => 'Point',
'coordinates' => array($lat, $long)
$object['location'] = array(
'objectType' => 'place',
'position' => sprintf("%+02.5F%+03.5F/", $lat, $lon),
'lat' => $lat,
'lon' => $lon
);
$loc = Location::fromLatLon($lat, $lon);
if ($loc) {
$name = $loc->getName();
if ($name) {
$object['location']['displayName'] = $name;
}
$url = $loc->getURL();
if ($url) {
$object['location']['url'] = $url;
}
}
}
if (!empty($this->poco)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment