From: arno Date: Thu, 17 Mar 2011 21:37:44 +0000 (+0100) Subject: fixes: geojson output was not correct X-Git-Tag: v0.3~21 X-Git-Url: https://dev.renevier.net/?p=syj.git;a=commitdiff_plain;h=69cbaf628f5576754d4553c021315188e22d24af fixes: geojson output was not correct --- 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);