private function getFeatureForMap($dataController, $categoryPath=array()) { if (isset($this->args['featureindex'])) { // this is a regular place $index = $this->args['featureindex']; $feature = $dataController->getFeature($index, $categoryPath); } elseif (isset($this->args['group'])) { // this is a campus $campusData = $this->getDataForGroup($this->args['group']); $coordParts = explode(',', $campusData['center']); $center = array('lat' => $coordParts[0], 'lon' => $coordParts[1]); $feature = new EmptyMapFeature($center); // may get rid of these setters and only allow setting in the constructor $feature->setTitle($campusData['title']); $feature->setField('address', $campusData['address']); $feature->setDescription($campusData['description']); $feature->setIndex($this->args['campus']); } else { $center = array('lat' => 0, 'lon' => 0); $feature = new EmptyMapFeature($center); } return $feature; }