Compare commits

...

4 Commits

Author SHA1 Message Date
David Molineus
8c03b4913e Merge branch 'support/2.x' of github.com:netzmacht/contao-leaflet-maps into support/2.x 2018-12-18 09:45:33 +01:00
David Molineus
cd5c6942e5 Support all available leaflet providers. 2018-12-18 09:43:31 +01:00
David Molineus
e66ee88745 Ignore editor files. 2018-01-12 22:24:13 +01:00
David Molineus
7420c6e4c0 Fix: Support collapsed setting. 2018-01-12 22:23:29 +01:00
5 changed files with 63 additions and 11 deletions

1
.gitignore vendored
View File

@@ -4,6 +4,7 @@
/assets/js/*.js /assets/js/*.js
/node_modules/ /node_modules/
/.tx/ /.tx/
/.idea/
coverage.xml coverage.xml
composer.lock composer.lock

View File

@@ -22,9 +22,9 @@
"contao/core":"^3.5", "contao/core":"^3.5",
"contao-community-alliance/dependency-container":"^1.0", "contao-community-alliance/dependency-container":"^1.0",
"contao-community-alliance/event-dispatcher":"^1.0", "contao-community-alliance/event-dispatcher":"^1.0",
"netzmacht/contao-leaflet-libraries": "^1.0", "netzmacht/contao-leaflet-libraries": "^1.3.4",
"netzmacht/php-javascript-builder": "^1.0", "netzmacht/php-javascript-builder": "^1.0",
"netzmacht/php-leaflet": "^1.0", "netzmacht/php-leaflet": "^1.1.0",
"netzmacht/contao-toolkit":"^2.0", "netzmacht/contao-toolkit":"^2.0",
"contao-community-alliance/meta-palettes": "^1.5", "contao-community-alliance/meta-palettes": "^1.5",
"menatwork/contao-multicolumnwizard": "^3.2", "menatwork/contao-multicolumnwizard": "^3.2",

View File

@@ -18,12 +18,17 @@ $GLOBALS['LEAFLET_TILE_PROVIDERS'] = array
( (
'OpenStreetMap' => array 'OpenStreetMap' => array
( (
'variants' => array('Mapnik', 'BlackAndWhite', 'DE', 'France', 'HOT', 'BZH'), 'variants' => array('Mapnik', 'BlackAndWhite', 'DE', 'CH', 'France', 'HOT', 'BZH'),
), ),
'OpenSeaMap' => array(), 'OpenSeaMap' => array(),
'OpenTopoMap' => array(), 'OpenTopoMap' => array(),
'OpenPtMap' => array(),
'OpenRailwayMap' => array(),
'OpenFireMap' => array(),
'SafeCast' => array(),
'Thunderforest' => array 'Thunderforest' => array
( (
'class' => 'Netzmacht\LeafletPHP\Plugins\LeafletProviders\ThunderforestProvider',
'variants' => array( 'variants' => array(
'OpenCycleMap', 'OpenCycleMap',
'Transport', 'Transport',
@@ -32,7 +37,10 @@ $GLOBALS['LEAFLET_TILE_PROVIDERS'] = array
'Landscape', 'Landscape',
'Outdoors', 'Outdoors',
'Pioneer' 'Pioneer'
) ),
'options' => array(
'apyKey' => 'tile_provider_key'
),
), ),
'OpenMapSurfer' => array 'OpenMapSurfer' => array
( (
@@ -44,7 +52,7 @@ $GLOBALS['LEAFLET_TILE_PROVIDERS'] = array
'MapBox' => array( 'MapBox' => array(
'class' => 'Netzmacht\LeafletPHP\Plugins\LeafletProviders\MapBoxProvider', 'class' => 'Netzmacht\LeafletPHP\Plugins\LeafletProviders\MapBoxProvider',
'options' => array( 'options' => array(
'key' => 'tile_provider_key' 'accessToken' => 'tile_provider_key'
), ),
), ),
'Stamen' => array( 'Stamen' => array(
@@ -77,6 +85,7 @@ $GLOBALS['LEAFLET_TILE_PROVIDERS'] = array
) )
), ),
'OpenWeatherMap' => array( 'OpenWeatherMap' => array(
'class' => 'Netzmacht\LeafletPHP\Plugins\LeafletProviders\OpenWeatherMapProvider',
'variants' => array( 'variants' => array(
'Clouds', 'Clouds',
'CloudsClassic', 'CloudsClassic',
@@ -89,9 +98,13 @@ $GLOBALS['LEAFLET_TILE_PROVIDERS'] = array
'Wind', 'Wind',
'Temperature', 'Temperature',
'Snow' 'Snow'
) ),
'options' => array(
'apiKey' => 'tile_provider_key'
),
), ),
'HERE' => array( 'HERE' => array(
'class' => 'Netzmacht\LeafletPHP\Plugins\LeafletProviders\HereProvider',
'variants' => array( 'variants' => array(
'normalDay', 'normalDay',
'normalDayCustom', 'normalDayCustom',
@@ -104,12 +117,17 @@ $GLOBALS['LEAFLET_TILE_PROVIDERS'] = array
'normalNightMobile', 'normalNightMobile',
'normalNightGrey', 'normalNightGrey',
'normalNightGreyMobile', 'normalNightGreyMobile',
'normalNightTransit',
'reducedDay',
'reducedNight',
'basicMap', 'basicMap',
'mapLabels', 'mapLabels',
'trafficFlow', 'trafficFlow',
'carnavDayGrey', 'carnavDayGrey',
'hybridDay', 'hybridDay',
'hybridDayMobile', 'hybridDayMobile',
'hybridDayTransit',
'hybridDayGrey',
'pedestrianDay', 'pedestrianDay',
'pedestrianNight', 'pedestrianNight',
'satelliteDay', 'satelliteDay',
@@ -121,7 +139,6 @@ $GLOBALS['LEAFLET_TILE_PROVIDERS'] = array
'appCode' => 'tile_provider_code', 'appCode' => 'tile_provider_code',
), ),
'fields' => array('tile_provider_key', 'tile_provider_code'), 'fields' => array('tile_provider_key', 'tile_provider_code'),
'class' => 'Netzmacht\LeafletPHP\Plugins\LeafletProviders\HereProvider',
), ),
'JusticeMap' => array( 'JusticeMap' => array(
'variants' => array( 'variants' => array(
@@ -133,7 +150,7 @@ $GLOBALS['LEAFLET_TILE_PROVIDERS'] = array
'multi', 'multi',
'nonWhite', 'nonWhite',
'white', 'white',
'plurality' 'plurality',
) )
), ),
'FreeMapSK' => array(), 'FreeMapSK' => array(),
@@ -146,6 +163,10 @@ $GLOBALS['LEAFLET_TILE_PROVIDERS'] = array
'DarkMatter', 'DarkMatter',
'DarkMatterNoLabels', 'DarkMatterNoLabels',
'DarkMatterOnlyLabels', 'DarkMatterOnlyLabels',
'Voyager',
'VoyagerNoLabels',
'VoyagerOnlyLabels',
'VoyagerLabelsUnder',
) )
), ),
'HikeBike' => array( 'HikeBike' => array(
@@ -177,5 +198,23 @@ $GLOBALS['LEAFLET_TILE_PROVIDERS'] = array
'ModisTerraChlorophyll', 'ModisTerraChlorophyll',
) )
), ),
'NLS' => array() 'NLS' => array(),
'Wikimedia' => array(),
'GeoportailFrance' => array(
'variants' => array(
'parcels',
'ignMaps',
'maps',
'orthos'
),
),
'OneMapSG' => array(
'variants' => array(
'Default',
'Night',
'Original',
'Grey',
'LandLot'
),
)
); );

View File

@@ -238,8 +238,10 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
'provider' => array('tile_provider', 'tile_provider_variant') 'provider' => array('tile_provider', 'tile_provider_variant')
), ),
'tile_provider' => array( 'tile_provider' => array(
'MapBox' => array('tile_provider_key'), 'MapBox' => array('tile_provider_key'),
'HERE' => array('tile_provider_key', 'tile_provider_code'), 'HERE' => array('tile_provider_key', 'tile_provider_code'),
'OpenWeatherMap' => array('tile_provider_key'),
'Thunderforest' => array('tile_provider_key'),
), ),
), ),

View File

@@ -62,4 +62,14 @@ class LayersControlMapper extends AbstractControlMapper
return $arguments; return $arguments;
} }
/**
* {@inheritDoc}
*/
protected function initialize()
{
parent::initialize();
$this->optionsBuilder->addOption('collapsed');
}
} }