X-Git-Url: https://dev.renevier.net/?p=syj.git;a=blobdiff_plain;f=application%2Fcontrollers%2FGeomController.php;h=bb56a97bafa3b2728be1407626934fec4b8eb732;hp=3f14df907137d7cbab2ec8a83f695ba3d140b653;hb=69cbaf628f5576754d4553c021315188e22d24af;hpb=c091d2057c28c6df46e08e7a08681ef47ac292bf diff --git a/application/controllers/GeomController.php b/application/controllers/GeomController.php index 3f14df9..bb56a97 100644 --- a/application/controllers/GeomController.php +++ b/application/controllers/GeomController.php @@ -84,10 +84,10 @@ class GeomController extends Zend_Controller_Action } protected function json(Syj_Model_Path $path) { - $data = array('geom' => (string)$path->geom, - 'title' => (string)$path->displayTitle); + $data = json_decode($path->geom->toGeoJSON()); + $data->title = (string)$path->displayTitle; if ($path->creator) { - $data['creator'] = (string)$path->creator->pseudo; + $data->creator = (string)$path->creator->pseudo; } $api = $this->_helper->SyjApi; $api->setCheckIfNoneMatch(true)->setBodyJson($data);