diff --git a/CHANGELOG.md b/CHANGELOG.md
index c5c5723..2b6da8c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -6,6 +6,29 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## 3.1.2 - TBD
+
+[Full Changelog](https://github.com/netzmacht/contao-leaflet-maps/compare/3.1.1...hotfix/3.1.2)
+
+### Fixed
+
+ - Fix broken MapBox integration: Access token is now required
+ - Fix broken OpenWeatherMap integration: Api key is now required
+ - Fix broken Thunderforest integration: Api key is now required
+
+### Added
+
+ - Add missing OpenPtMap of leaflet-providers
+ - Add missing OpenRailwayMap of leaflet-providers
+ - Add missing OpenFireMap of leaflet-providers
+ - Add missing SafeCast of leaflet-providers
+ - Add missing map types `normalNightTransit`, `normalNightTransitMobile`, `reducedDay`, `reducedNight`,
+ `hybridDayTransit` and `hybridDayGrey` of HERE provider
+ - Add missing map types `Voyager`, `VoyagerNoLabels`, `VoyagerOnlyLabels` and `VoyagerLabelsUnder` of CartoDB provider
+ - Add missing Wikimedia of leaflet-providers
+ - Add missing GeoportailFrance of leaflet-providers
+ - Add missing OneMapSG of leaflet-providers
+
## 3.1.1 - 2018-12-07
[Full Changelog](https://github.com/netzmacht/contao-leaflet-maps/compare/3.1.0...3.1.1)
diff --git a/composer.json b/composer.json
index 5a69266..d1c1611 100644
--- a/composer.json
+++ b/composer.json
@@ -34,10 +34,10 @@
"symfony/http-kernel": "~3.3 || ~4.0",
"symfony/translation": "~3.3 || ~4.0",
"symfony/templating": "~3.3 || ~4.0",
- "netzmacht/contao-leaflet-libraries": "^1.0",
+ "netzmacht/contao-leaflet-libraries": "^1.3.4",
"netzmacht/contao-leaflet-geocode-widget": "^1.2",
"netzmacht/php-javascript-builder": "^1.0",
- "netzmacht/php-leaflet": "^1.0.2",
+ "netzmacht/php-leaflet": "^1.1.0",
"netzmacht/contao-toolkit": "~3.0",
"netzmacht/contao-page-context": "~1.0",
"contao-community-alliance/meta-palettes": "^2.0 || ^1.5",
diff --git a/src/Bundle/Resources/config/providers.yml b/src/Bundle/Resources/config/providers.yml
index 880ddde..392b5f5 100644
--- a/src/Bundle/Resources/config/providers.yml
+++ b/src/Bundle/Resources/config/providers.yml
@@ -1,13 +1,22 @@
parameters:
netzmacht.contao_leaflet.providers:
OpenStreetMap:
- variants: ['Mapnik', 'BlackAndWhite', 'DE', 'France', 'HOT', 'BZH']
+ variants: ['Mapnik', 'BlackAndWhite', 'DE', 'CH', 'France', 'HOT', 'BZH']
OpenSeaMap: []
OpenTopoMap: []
+ OpenPtMap: []
+
+ OpenRailwayMap: []
+
+ OpenFireMap: []
+
+ SafeCast: []
+
Thunderforest:
+ class: 'Netzmacht\LeafletPHP\Plugins\LeafletProviders\ThunderforestProvider'
variants:
- 'OpenCycleMap'
- 'Transport'
@@ -16,6 +25,9 @@ parameters:
- 'Landscape'
- 'Outdoors'
- 'Pioneer'
+ options:
+ apiKey: 'tile_provider_key'
+ fields: ['tile_provider_key']
OpenMapSurfer:
variants: ['Roads', 'AdminBounds', 'Grayscale']
@@ -26,7 +38,8 @@ parameters:
MapBox:
class: 'Netzmacht\LeafletPHP\Plugins\LeafletProviders\MapBoxProvider'
options:
- key: 'tile_provider_key'
+ accessToken: 'tile_provider_key'
+ fields: ['tile_provider_key']
Stamen:
variants:
@@ -56,6 +69,7 @@ parameters:
- 'WorldGrayCanvas'
OpenWeatherMap:
+ class: 'Netzmacht\LeafletPHP\Plugins\LeafletProviders\OpenWeatherMapProvider'
variants:
- 'Clouds'
- 'CloudsClassic'
@@ -68,6 +82,9 @@ parameters:
- 'Wind'
- 'Temperature'
- 'Snow'
+ options:
+ apiKey: 'tile_provider_key'
+ fields: ['tile_provider_key']
HERE:
class: 'Netzmacht\LeafletPHP\Plugins\LeafletProviders\HereProvider'
@@ -83,12 +100,18 @@ parameters:
- 'normalNightMobile'
- 'normalNightGrey'
- 'normalNightGreyMobile'
+ - 'normalNightTransit'
+ - 'normalNightTransitMobile'
+ - 'reducedDay'
+ - 'reducedNight'
- 'basicMap'
- 'mapLabels'
- 'trafficFlow'
- 'carnavDayGrey'
- 'hybridDay'
- 'hybridDayMobile'
+ - 'hybridDayTransit'
+ - 'hybridDayGrey'
- 'pedestrianDay'
- 'pedestrianNight'
- 'satelliteDay'
@@ -123,6 +146,10 @@ parameters:
- 'DarkMatter'
- 'DarkMatterNoLabels'
- 'DarkMatterOnlyLabels'
+ - 'Voyager'
+ - 'VoyagerNoLabels'
+ - 'VoyagerOnlyLabels'
+ - 'VoyagerLabelsUnder'
HikeBike:
variants:
@@ -155,3 +182,20 @@ parameters:
- 'ModisTerraChlorophyll'
NLS: []
+
+ Wikimedia: []
+
+ GeoportailFrance:
+ variants:
+ - 'parcels'
+ - 'ignMaps'
+ - 'maps'
+ - 'orthos'
+
+ OneMapSG:
+ variants:
+ - 'Default'
+ - 'Night'
+ - 'Original'
+ - 'Grey'
+ - 'LandLot'
diff --git a/src/Bundle/Resources/contao/config/config.php b/src/Bundle/Resources/contao/config/config.php
index 9f4431c..3603cf1 100644
--- a/src/Bundle/Resources/contao/config/config.php
+++ b/src/Bundle/Resources/contao/config/config.php
@@ -44,7 +44,7 @@ array_insert(
]
);
-if (TL_MODE === 'BE') {
+if (defined('TL_MODE') && TL_MODE === 'BE') {
$GLOBALS['TL_CSS'][] = 'bundles/netzmachtcontaoleaflet/css/backend_global.css';
}
diff --git a/src/Bundle/Resources/contao/dca/tl_leaflet_layer.php b/src/Bundle/Resources/contao/dca/tl_leaflet_layer.php
index 789aa2d..2f07840 100644
--- a/src/Bundle/Resources/contao/dca/tl_leaflet_layer.php
+++ b/src/Bundle/Resources/contao/dca/tl_leaflet_layer.php
@@ -232,12 +232,14 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = [
'provider' => ['tile_provider', 'tile_provider_variant'],
],
'tile_provider' => [
- 'MapBox' => ['tile_provider_key'],
- 'HERE' => ['tile_provider_key', 'tile_provider_code'],
+ 'MapBox' => ['tile_provider_key'],
+ 'HERE' => ['tile_provider_key', 'tile_provider_code'],
+ 'OpenWeatherMap' => ['tile_provider_key'],
+ 'Thunderforest' => ['tile_provider_key'],
+ ],
+ 'fileFormat' => [
+ '!' => ['file'],
],
- 'fileFormat' => [
- '!' => ['file']
- ]
],
'metasubpalettes' => [
@@ -864,7 +866,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = [
],
'sql' => 'mediumtext NULL',
],
- 'fileFormat' => [
+ 'fileFormat' => [
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['fileFormat'],
'exclude' => true,
'inputType' => 'select',
@@ -882,19 +884,19 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = [
'sql' => "varchar(32) NOT NULL default ''",
],
'file' => [
- 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['file'],
- 'exclude' => true,
- 'inputType' => 'fileTree',
+ 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['file'],
+ 'exclude' => true,
+ 'inputType' => 'fileTree',
'load_callback' => [
['netzmacht.contao_leaflet.listeners.dca.layer', 'prepareFileWidget'],
],
- 'eval' => [
- 'filesOnly' => true,
- 'fieldType' => 'radio',
- 'mandatory' => true,
- 'tl_class' => 'clr',
+ 'eval' => [
+ 'filesOnly' => true,
+ 'fieldType' => 'radio',
+ 'mandatory' => true,
+ 'tl_class' => 'clr',
],
- 'sql' => 'binary(16) NULL',
+ 'sql' => 'binary(16) NULL',
],
],
];
diff --git a/src/Bundle/Resources/contao/languages/en/tl_leaflet_layer.php b/src/Bundle/Resources/contao/languages/en/tl_leaflet_layer.php
index 19935ee..394e4f0 100644
--- a/src/Bundle/Resources/contao/languages/en/tl_leaflet_layer.php
+++ b/src/Bundle/Resources/contao/languages/en/tl_leaflet_layer.php
@@ -149,6 +149,10 @@ $GLOBALS['TL_LANG']['tl_leaflet_layer']['fileFormat'][0] = 'File
$GLOBALS['TL_LANG']['tl_leaflet_layer']['fileFormat'][1] = 'Choose which file format is used.';
$GLOBALS['TL_LANG']['tl_leaflet_layer']['file'][0] = 'File';
$GLOBALS['TL_LANG']['tl_leaflet_layer']['file'][1] = 'Choose a file containing geodata. Supported formats are: %s.';
+$GLOBALS['TL_LANG']['tl_leaflet_layer']['tile_provider_key'][0] = 'API key / Access token';
+$GLOBALS['TL_LANG']['tl_leaflet_layer']['tile_provider_key'][1] = 'Please define the API key / access token which is required for this tile provider.';
+$GLOBALS['TL_LANG']['tl_leaflet_layer']['tile_provider_code'][0] = 'App code';
+$GLOBALS['TL_LANG']['tl_leaflet_layer']['tile_provider_code'][1] = 'Please define the required app code for this tile provider.';
$GLOBALS['TL_LANG']['tl_leaflet_layer']['groupTypes']['layer'][0] = 'Layer group';
$GLOBALS['TL_LANG']['tl_leaflet_layer']['groupTypes']['layer'][1] = 'Basic layer group.
See http://leafletjs.com/reference.html#layergroup';
diff --git a/src/Bundle/Resources/contao/public/.htaccess b/src/Bundle/Resources/contao/public/.htaccess
deleted file mode 100644
index 28cc359..0000000
--- a/src/Bundle/Resources/contao/public/.htaccess
+++ /dev/null
@@ -1,7 +0,0 @@
-
- Order allow,deny
- Allow from all
-
-
- Require all granted
-
\ No newline at end of file