From 69cbaf628f5576754d4553c021315188e22d24af Mon Sep 17 00:00:00 2001 From: arno Date: Thu, 17 Mar 2011 22:37:44 +0100 Subject: [PATCH] fixes: geojson output was not correct --- application/controllers/GeomController.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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); -- 2.39.2