a2g_travel_blog/Classes/Utility/MapConfigUtility.php

238 lines
5.9 KiB
PHP
Raw Normal View History

2023-12-04 16:40:27 +01:00
<?php
declare(strict_types=1);
namespace A2G\A2gTravelBlog\Utility;
use TYPO3\CMS\Extbase\Annotation as Extbase;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Mvc\Web\Routing\UriBuilder;
use TYPO3\CMS\Extbase\Object\ObjectManager;
use TYPO3\CMS\Extbase\Configuration\ConfigurationManager;
use TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface;
/**
* Description of Canonical
*
* @author Raphael Martin raphael@web-crossing.com
*/
class MapConfigUtility {
/**
* uidParamName
*
* @var string
*/
static private $mapLayerConfigs = [
1 => [
"layer" => "osm",
"config" => [
],
"label"=>"osm_map_layer"
],
10 => [
"layer" => "stamen",
"config" => [
"layer" => "terrain"
],
"label" => "stamen_map_terrain"
],
11 => [
"layer" => "stamen",
"config" => [
"layer" => "watercolor"
],
"label" => "stamen_map_watercolor"
],
12 => [
"layer" => "stamen",
"config" => [
"layer" => "toner"
],
"label" => "stamen_map_toner"
],
100 => [
"layer" => "thunderforest",
"config" => [
"layer" => "cycle"
],
"label" => "thunderforest_map_cycle"
],
101 => [
"layer" => "thunderforest",
"config" => [
"layer" => "transport"
],
"label" => "thunderforest_map_transport"
],
102 => [
"layer" => "thunderforest",
"config" => [
"layer" => "landscape"
],
"label" => "thunderforest_map_landscape"
],
103 => [
"layer" => "thunderforest",
"config" => [
"layer" => "outdoors"
],
"label" => "thunderforest_map_outdoors"
],
104 => [
"layer" => "thunderforest",
"config" => [
"layer" => "atlas"
],
"label" => "thunderforest_map_atlas"
],
105 => [
"layer" => "thunderforest",
"config" => [
"layer" => "transport-dark"
],
"label" => "thunderforest_map_transport-dark"
],
106 => [
"layer" => "thunderforest",
"config" => [
"layer" => "spinal-map"
],
"label" => "thunderforest_map_spinal"
],
107 => [
"layer" => "thunderforest",
"config" => [
"layer" => "pioneer"
],
"label" => "thunderforest_map_pioneer"
],
108 => [
"layer" => "thunderforest",
"config" => [
"layer" => "neighbourhood"
],
"label" => "thunderforest_map_neighbourhood"
],
109 => [
"layer" => "thunderforest",
"config" => [
"layer" => "mobile-atlas"
],
"label" => "thunderforest_map_mobile-atlas"
],
200 => [
"layer" => "maptiler",
"config" => [
"layer" => "basic"
],
"label" => "maptiler_map_basic"
],
201 => [
"layer" => "maptiler",
"config" => [
"layer" => "basic-4326"
],
"label" => "maptiler_map_basic-4326"
],
202 => [
"layer" => "maptiler",
"config" => [
"layer" => "bright"
],
"label" => "maptiler_map_bright"
],
203 => [
"layer" => "maptiler",
"config" => [
"layer" => "openstreetmap"
],
"label" => "maptiler_map_openstreetmap"
],
204 => [
"layer" => "maptiler",
"config" => [
"layer" => "outdoor"
],
"label" => "maptiler_map_outdoor"
],
205 => [
"layer" => "maptiler",
"config" => [
"layer" => "pastel"
],
"label" => "maptiler_map_pastel"
],
206 => [
"layer" => "maptiler",
"config" => [
"layer" => "hybrid"
],
"label" => "maptiler_map_hybrid"
],
207 => [
"layer" => "maptiler",
"config" => [
"layer" => "streets"
],
"label" => "maptiler_map_streets"
],
208 => [
"layer" => "maptiler",
"config" => [
"layer" => "toner"
],
"label" => "maptiler_map_toner"
],
209 => [
"layer" => "maptiler",
"config" => [
"layer" => "topo"
],
"label" => "maptiler_map_topo"
],
210 => [
"layer" => "maptiler",
"config" => [
"layer" => "topographique"
],
"label" => "maptiler_map_topographique"
],
211 => [
"layer" => "maptiler",
"config" => [
"layer" => "voyager"
],
"label" => "maptiler_map_voyager"
],
212 => [
"layer" => "maptiler",
"config" => [
"layer" => "winter"
],
"label" => "maptiler_map_winter"
],
];
/**
* setCanonical
*
* @param type $href
*/
public static function getMapLayerConfig(array $mapLayerConfigIds) {
$out = [];
foreach($mapLayerConfigIds as $id){
$out[]=self::$mapLayerConfigs[$id];
}
return $out;
}
}