$activity[$objectName] = $props;
}
}
+
+ /* more extensions */
+
+ if (!empty($this->context)) {
+
+ if (!empty($this->context->location)) {
+ $loc = $this->context->location;
+
+ // GeoJSON
+
+ $activity['geopoint'] = array(
+ 'type' => 'Point',
+ 'coordinates' => array($loc->lat, $loc->lon)
+ );
+ }
+
+ }
+
return array_filter($activity);
}
$object[$objectName] = $props;
}
+ // GeoJSON
+
+ if (!empty($this->geopoint)) {
+
+ list($lat, $long) = explode(' ', $this->geopoint);
+
+ $object['geopoint'] = array(
+ 'type' => 'Point',
+ 'coordinates' => array($lat, $long)
+ );
+ }
+
return array_filter($object);
}
}