/**
  * Initializes Controls based on config
  */
 function initControls()
 {
     $this->map->getControls()->getMaptype()->setDisplay((bool) $this->showMapType);
     $this->map->getControls()->getMaptype()->setPosition($this->mapTypePosition);
     $this->map->getControls()->getMaptype()->setType($this->mapTypeType);
     $this->map->getControls()->getScale()->setDisplay((bool) $this->showScale);
     $this->map->getControls()->getScale()->setPosition($this->scalePosition);
     $this->map->getControls()->getNavigation()->setDisplay((bool) $this->showNavigation);
     $this->map->getControls()->getNavigation()->setPosition($this->navigationPosition);
     $this->map->getControls()->getNavigation()->setType($this->navigationType);
     $this->map->getControls()->getZoom()->setDisplay((bool) $this->showZoom);
     $this->map->getControls()->getZoom()->setPosition($this->zoomPosition);
     $this->map->getControls()->getZoom()->setType($this->zoomType);
     $this->map->getControls()->getPan()->setDisplay((bool) $this->showPan);
     $this->map->getControls()->getPan()->setPosition($this->panPosition);
     if ($this->initialMapType) {
         $this->map->setMaptype(new Tx_Listfeusers_Gmap_Maptype($this->initialMapType));
     }
 }
Exemple #2
0
 /**
  * Returns the script line for including Map::api
  *
  * this method is called on first render of any script.
  * If once enabled you can get the string by setting $force_enable param to true
  *
  * @uses self::$sensor For setting the sensor in link
  * @param boolean $force_enable get the string despite the enabled static flag
  * @return string
  */
 public static function enable($force_enable = false)
 {
     if (!self::$enabled || $force_enable) {
         self::$enabled = true;
         //set the enabled flag
         $GLOBALS['TSFE']->additionalHeaderData['google-map'] = '<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=' . (Tx_Listfeusers_Gmap::getSensor() ? 'true' : 'false') . '"></script>';
         $GLOBALS['TSFE']->additionalHeaderData['listfeusers-map'] = '<script src="' . t3lib_extMgm::siteRelPath('listfeusers') . 'js/gmap.js" type="text/javascript"></script>';
     } else {
         return '';
     }
 }