예제 #1
0
 public function init($args)
 {
     parent::init($args);
     if (isset($args['SEARCH_LAYERS'])) {
         $layers = explode(',', $args['SEARCH_LAYERS']);
         $this->searchLayers = array();
         foreach ($layers as $aLayer) {
             $this->searchLayers[] = trim($aLayer);
         }
     }
 }
 public function init($args)
 {
     // alter args for initializing retriever
     if (isset($args['title'])) {
         $args['TITLE'] = $args['title'];
     }
     $this->isPlaces = Kurogo::getOptionalSiteVar('USE_GOOGLE_PLACES', false, 'maps');
     if ($this->isPlaces) {
         $args['BASE_URL'] = self::PLACES_BASE_URL;
         $this->apiKey = Kurogo::getSiteVar('GOOGLE_PLACES_API_KEY', 'maps');
     } else {
         $args['BASE_URL'] = self::GEOCODE_BASE_URL;
         // the Google Maps license requires that geocode results
         // be displayed with a Google Map
         $this->staticMapClass = 'GoogleStaticMap';
         $this->dynamicMapClass = 'GoogleJSMap';
     }
     $this->defaultCenter = $args['center'];
     if (isset($args['NEARBY_THRESHOLD'])) {
         $this->defaultRadius = $args['NEARBY_THRESHOLD'];
     }
     parent::init($args);
     $this->retriever->setCacheLifetime(1);
 }