public function init(tx_rnbase_configurations $conf, $confId) { $this->conf = $conf; $this->confId = $confId; $apiKey = $conf->get($confId . 'google.apikey'); $apiKey = $apiKey ? $apiKey : NULL; $width = $conf->get($confId . 'width'); $height = $conf->get($confId . 'height'); $this->map = tx_rnbase::makeInstance('tx_wecmap_map_google', $apiKey, $width, $height); // Der MapType $mapType = $conf->get($confId . 'maptype') ? constant($conf->get($confId . 'maptype')) : NULL; $types = array_flip(tx_rnbase_maps_TypeRegistry::getMapTypes()); if ($mapType && array_key_exists($mapType, $types)) { $this->setMapType(tx_rnbase_maps_TypeRegistry::getInstance()->getType($this, $mapType)); } // Controls $controls = $conf->get($confId . 'google.controls'); if ($controls) { $controls = tx_rnbase_util_Strings::trimExplode(',', $controls); foreach ($controls as $control) { $this->addControl(tx_rnbase::makeInstance('tx_rnbase_maps_google_Control', $control)); } } }
/** * Erstellt eine Map * * @param string $clazzName * @return tx_rnbase_maps_IMap */ static function createMap($clazzName, &$configurations, $confId) { $map = tx_rnbase::makeInstance($clazzName); $provId = $map->getPROVID(); if (!array_key_exists($provId, self::$typeInits)) { $map->initTypes(tx_rnbase_maps_TypeRegistry::getInstance()); self::$typeInits[$provId] = 1; } $map->init($configurations, $confId); return $map; }
/** * Set a map type */ function setMapTypeSatellite() { $type = tx_rnbase_maps_TypeRegistry::getInstance()->getType($this, RNMAP_MAPTYPE_SATELLITE); $this->setMapType($type); }