2 /* This file is part of Syj, Copyright (c) 2010 Arnaud Renevier,
3 and is published under the AGPL license. */
5 class GeomController extends Zend_Controller_Action
8 public function indexAction() {
9 $request = $this->getRequest();
10 $response = $this->getResponse();
13 $pathMapper = new Syj_Model_PathMapper();
14 $path = new Syj_Model_Path();
16 $api = $this->_helper->SyjApi;
18 if (!$pathMapper->find($idx, $path)) {
19 if ($pathMapper->hasexisted($idx)) {
27 $data = array('geom' => (string)$path->geom,
28 'title' => (string)$path->displayTitle);
30 $data['creator'] = (string)$path->creator->pseudo;
33 $api->setCheckIfNoneMatch(true)->setBodyJson($data);