function initTypes(tx_rnbase_maps_TypeRegistry $registry) { $registry->addType($this, RNMAP_MAPTYPE_STREET, 'G_NORMAL_MAP'); $registry->addType($this, RNMAP_MAPTYPE_SATELLITE, 'G_SATELLITE_MAP'); $registry->addType($this, RNMAP_MAPTYPE_HYBRID, 'G_HYBRID_MAP'); $registry->addType($this, RNMAP_MAPTYPE_PHYSICAL, 'G_PHYSICAL_MAP'); }
/** * Returns the singleton instance * * @return tx_rnbase_maps_TypeRegistry */ static function getInstance() { if (!is_object(self::$instance)) { self::$instance = new tx_rnbase_maps_TypeRegistry(); } return self::$instance; }
/** * 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); }