protected function urlForPlacemark(Placemark $placemark)
 {
     $urlArgs = $placemark->getURLParams();
     // mimic getMergedConfigData in MapWebModule
     if (isset($urlArgs['feed'])) {
         $category = $urlArgs['feed'];
     } else {
         $categoryArg = isset($urlArgs['category']) ? $urlArgs['category'] : null;
         $categories = explode(MAP_CATEGORY_DELIMITER, $categoryArg);
         $category = current($categories);
         if (strlen($category)) {
             $urlArgs['feed'] = $category;
         }
     }
     $configData = $this->getDataForGroup($this->feedGroup);
     // allow individual feeds to override group value
     $feedData = $this->getCurrentFeed($category);
     if ($feedData) {
         foreach ($feedData as $key => $value) {
             $configData[$key] = $value;
         }
     }
     // the device needs to be compliant to use the APIModule
     list($class, $static) = MapImageController::basemapClassForDevice(new MapDevice('compliant', 'computer'), $configData);
     if ($static) {
         $page = $this->numGroups > 1 ? 'campus' : 'index';
     } else {
         $page = 'detail';
     }
     return rtrim(FULL_URL_PREFIX, '/') . '/' . $this->configModule . '/' . $page . '?' . http_build_query($urlArgs);
 }
Beispiel #2
0
 protected function isMapDrivenUI($category = null)
 {
     list($class, $static) = MapImageController::basemapClassForDevice($this->getMapDevice(), $this->getMergedConfigData($category));
     return !$static;
 }