From 909288d4fc728981256432c6a509799de43dd414 Mon Sep 17 00:00:00 2001 From: David Molineus Date: Thu, 5 Oct 2017 17:02:15 +0200 Subject: [PATCH] Move providers to yml file. --- .../amenities.yml} | 0 src/Resources/config/parameters/providers.yml | 156 +++++++++++++++ .../contao/config/leaflet_providers.php | 182 ------------------ 3 files changed, 156 insertions(+), 182 deletions(-) rename src/Resources/config/{parameters.yml => parameters/amenities.yml} (100%) create mode 100644 src/Resources/config/parameters/providers.yml delete mode 100644 src/Resources/contao/config/leaflet_providers.php diff --git a/src/Resources/config/parameters.yml b/src/Resources/config/parameters/amenities.yml similarity index 100% rename from src/Resources/config/parameters.yml rename to src/Resources/config/parameters/amenities.yml diff --git a/src/Resources/config/parameters/providers.yml b/src/Resources/config/parameters/providers.yml new file mode 100644 index 0000000..8329dd0 --- /dev/null +++ b/src/Resources/config/parameters/providers.yml @@ -0,0 +1,156 @@ +netzmacht.contao_leaflet_maps.providers: + OpenStreetMap: + variants: ['Mapnik', 'BlackAndWhite', 'DE', 'France', 'HOT', 'BZH'] + + OpenSeaMap: [] + + OpenTopoMap: [] + + Thunderforest: + variants: + - 'OpenCycleMap' + - 'Transport' + - 'TransportDark' + - 'SpinalMap' + - 'Landscape' + - 'Outdoors' + - 'Pioneer' + + OpenMapSurfer: + variants: ['Roads', 'AdminBounds', 'Grayscale'] + + Hydda: + variants: ['Full', 'Base', 'RoadsAndLabels'] + + MapBox: + class: 'Netzmacht\LeafletPHP\Plugins\LeafletProviders\MapBoxProvider' + options: + key: 'tile_provider_key' + + Stamen: + variants: + - 'Toner' + - 'TonerBackground' + - 'TonerHybrid' + - 'TonerLines' + - 'TonerLabels' + - 'TonerLite' + - 'Terrain' + - 'TerrainBackground' + - 'TopOSMRelief' + - 'TopOSMFeatures' + - 'Watercolor' + + Esri: + variants: + - 'WorldStreetMap' + - 'DeLorme' + - 'WorldTopoMap' + - 'WorldImagery' + - 'WorldTerrain' + - 'WorldShadedRelief' + - 'WorldPhysical' + - 'OceanBasemap' + - 'NatGeoWorldMap' + - 'WorldGrayCanvas' + + OpenWeatherMap: + variants: + - 'Clouds' + - 'CloudsClassic' + - 'Precipitation' + - 'PrecipitationClassic' + - 'Rain' + - 'RainClassic' + - 'Pressure' + - 'PressureContour' + - 'Wind' + - 'Temperature' + - 'Snow' + + HERE: + class: 'Netzmacht\LeafletPHP\Plugins\LeafletProviders\HereProvider' + variants: + - 'normalDay' + - 'normalDayCustom' + - 'normalDayGrey' + - 'normalDayMobile' + - 'normalDayGreyMobile' + - 'normalDayTransit' + - 'normalDayTransitMobile' + - 'normalNight' + - 'normalNightMobile' + - 'normalNightGrey' + - 'normalNightGreyMobile' + - 'basicMap' + - 'mapLabels' + - 'trafficFlow' + - 'carnavDayGrey' + - 'hybridDay' + - 'hybridDayMobile' + - 'pedestrianDay' + - 'pedestrianNight' + - 'satelliteDay' + - 'terrainDay' + - 'terrainDayMobile' + options: + appId: 'tile_provider_key' + appCode: 'tile_provider_code' + fields: ['tile_provider_key', 'tile_provider_code'] + + JusticeMap: + variants: + - 'income' + - 'americanIndian' + - 'asian' + - 'black' + - 'hispanic' + - 'multi' + - 'nonWhite' + - 'white' + - 'plurality' + + FreeMapSK: [] + + MtbMap: [] + + CartoDB: + variants: + - 'Positron' + - 'PositronNoLabels' + - 'PositronOnlyLabels' + - 'DarkMatter' + - 'DarkMatterNoLabels' + - 'DarkMatterOnlyLabels' + + HikeBike: + variants: + - 'HikeBike' + - 'HillShading' + + BasemapAT: + variants: + - 'basemap' + - 'grau' + - 'overlay' + - 'highdpi' + - 'orthofoto' + + nlmaps: + variants: + - 'standaard' + - 'pastel' + - 'grijs' + - 'luchtfoto' + + NASAGIBS: + variants: + - 'ModisTerraTrueColorCR' + - 'ModisTerraBands367CR' + - 'ViirsEarthAtNight2012' + - 'ModisTerraLSTDay' + - 'ModisTerraSnowCover' + - 'ModisTerraAOD' + - 'ModisTerraChlorophyll' + + NLS: [] diff --git a/src/Resources/contao/config/leaflet_providers.php b/src/Resources/contao/config/leaflet_providers.php deleted file mode 100644 index 0e29dd4..0000000 --- a/src/Resources/contao/config/leaflet_providers.php +++ /dev/null @@ -1,182 +0,0 @@ - - * @copyright 2016-2017 netzmacht David Molineus. All rights reserved. - * @license LGPL-3.0 https://github.com/netzmacht/contao-leaflet-maps/blob/master/LICENSE - * @filesource - */ - -/* - * Support all providers and variants which are supported by leaflet-providers. - * See https://github.com/leaflet-extras/leaflet-providers/blob/master/leaflet-providers.js - */ - -$GLOBALS['LEAFLET_TILE_PROVIDERS'] = array -( - 'OpenStreetMap' => array - ( - 'variants' => array('Mapnik', 'BlackAndWhite', 'DE', 'France', 'HOT', 'BZH'), - ), - 'OpenSeaMap' => array(), - 'OpenTopoMap' => array(), - 'Thunderforest' => array - ( - 'variants' => array( - 'OpenCycleMap', - 'Transport', - 'TransportDark', - 'SpinalMap', - 'Landscape', - 'Outdoors', - 'Pioneer' - ) - ), - 'OpenMapSurfer' => array - ( - 'variants' => array('Roads', 'AdminBounds', 'Grayscale') - ), - 'Hydda' => array( - 'variants' => array('Full', 'Base', 'RoadsAndLabels') - ), - 'MapBox' => array( - 'class' => 'Netzmacht\LeafletPHP\Plugins\LeafletProviders\MapBoxProvider', - 'options' => array( - 'key' => 'tile_provider_key' - ), - ), - 'Stamen' => array( - 'variants' => array( - 'Toner', - 'TonerBackground', - 'TonerHybrid', - 'TonerLines', - 'TonerLabels', - 'TonerLite', - 'Terrain', - 'TerrainBackground', - 'TopOSMRelief', - 'TopOSMFeatures', - 'Watercolor' - ) - ), - 'Esri' => array( - 'variants' => array( - 'WorldStreetMap', - 'DeLorme', - 'WorldTopoMap', - 'WorldImagery', - 'WorldTerrain', - 'WorldShadedRelief', - 'WorldPhysical', - 'OceanBasemap', - 'NatGeoWorldMap', - 'WorldGrayCanvas' - ) - ), - 'OpenWeatherMap' => array( - 'variants' => array( - 'Clouds', - 'CloudsClassic', - 'Precipitation', - 'PrecipitationClassic', - 'Rain', - 'RainClassic', - 'Pressure', - 'PressureContour', - 'Wind', - 'Temperature', - 'Snow' - ) - ), - 'HERE' => array( - 'variants' => array( - 'normalDay', - 'normalDayCustom', - 'normalDayGrey', - 'normalDayMobile', - 'normalDayGreyMobile', - 'normalDayTransit', - 'normalDayTransitMobile', - 'normalNight', - 'normalNightMobile', - 'normalNightGrey', - 'normalNightGreyMobile', - 'basicMap', - 'mapLabels', - 'trafficFlow', - 'carnavDayGrey', - 'hybridDay', - 'hybridDayMobile', - 'pedestrianDay', - 'pedestrianNight', - 'satelliteDay', - 'terrainDay', - 'terrainDayMobile', - ), - 'options' => array( - 'appId' => 'tile_provider_key', - 'appCode' => 'tile_provider_code', - ), - 'fields' => array('tile_provider_key', 'tile_provider_code'), - 'class' => 'Netzmacht\LeafletPHP\Plugins\LeafletProviders\HereProvider', - ), - 'JusticeMap' => array( - 'variants' => array( - 'income', - 'americanIndian', - 'asian', - 'black', - 'hispanic', - 'multi', - 'nonWhite', - 'white', - 'plurality' - ) - ), - 'FreeMapSK' => array(), - 'MtbMap' => array(), - 'CartoDB' => array( - 'variants' => array( - 'Positron', - 'PositronNoLabels', - 'PositronOnlyLabels', - 'DarkMatter', - 'DarkMatterNoLabels', - 'DarkMatterOnlyLabels', - ) - ), - 'HikeBike' => array( - 'variants' => array( - 'HikeBike', - 'HillShading', - ) - ), - 'BasemapAT' => array( - 'variants' => array( - 'basemap', - 'grau', - 'overlay', - 'highdpi', - 'orthofoto', - ) - ), - 'nlmaps' => array( - 'variants' => array('standaard', 'pastel', 'grijs', 'luchtfoto') - ), - 'NASAGIBS' => array( - 'variants' => array( - 'ModisTerraTrueColorCR', - 'ModisTerraBands367CR', - 'ViirsEarthAtNight2012', - 'ModisTerraLSTDay', - 'ModisTerraSnowCover', - 'ModisTerraAOD', - 'ModisTerraChlorophyll', - ) - ), - 'NLS' => array() -);