forked from Snck3rs/contao-leaflet-maps
Complete implementation of tile providers.
This commit is contained in:
@@ -83,7 +83,7 @@ parameters:
|
|||||||
- 'Temperature'
|
- 'Temperature'
|
||||||
- 'Snow'
|
- 'Snow'
|
||||||
options:
|
options:
|
||||||
accessToken: 'tile_provider_key'
|
apiKey: 'tile_provider_key'
|
||||||
fields: ['tile_provider_key']
|
fields: ['tile_provider_key']
|
||||||
|
|
||||||
HERE:
|
HERE:
|
||||||
|
|||||||
@@ -232,12 +232,14 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = [
|
|||||||
'provider' => ['tile_provider', 'tile_provider_variant'],
|
'provider' => ['tile_provider', 'tile_provider_variant'],
|
||||||
],
|
],
|
||||||
'tile_provider' => [
|
'tile_provider' => [
|
||||||
'MapBox' => ['tile_provider_key'],
|
'MapBox' => ['tile_provider_key'],
|
||||||
'HERE' => ['tile_provider_key', 'tile_provider_code'],
|
'HERE' => ['tile_provider_key', 'tile_provider_code'],
|
||||||
|
'OpenWeatherMap' => ['tile_provider_key'],
|
||||||
|
'Thunderforest' => ['tile_provider_key'],
|
||||||
|
],
|
||||||
|
'fileFormat' => [
|
||||||
|
'!' => ['file'],
|
||||||
],
|
],
|
||||||
'fileFormat' => [
|
|
||||||
'!' => ['file']
|
|
||||||
]
|
|
||||||
],
|
],
|
||||||
|
|
||||||
'metasubpalettes' => [
|
'metasubpalettes' => [
|
||||||
@@ -864,7 +866,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = [
|
|||||||
],
|
],
|
||||||
'sql' => 'mediumtext NULL',
|
'sql' => 'mediumtext NULL',
|
||||||
],
|
],
|
||||||
'fileFormat' => [
|
'fileFormat' => [
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['fileFormat'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['fileFormat'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'select',
|
'inputType' => 'select',
|
||||||
@@ -882,19 +884,19 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = [
|
|||||||
'sql' => "varchar(32) NOT NULL default ''",
|
'sql' => "varchar(32) NOT NULL default ''",
|
||||||
],
|
],
|
||||||
'file' => [
|
'file' => [
|
||||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['file'],
|
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['file'],
|
||||||
'exclude' => true,
|
'exclude' => true,
|
||||||
'inputType' => 'fileTree',
|
'inputType' => 'fileTree',
|
||||||
'load_callback' => [
|
'load_callback' => [
|
||||||
['netzmacht.contao_leaflet.listeners.dca.layer', 'prepareFileWidget'],
|
['netzmacht.contao_leaflet.listeners.dca.layer', 'prepareFileWidget'],
|
||||||
],
|
],
|
||||||
'eval' => [
|
'eval' => [
|
||||||
'filesOnly' => true,
|
'filesOnly' => true,
|
||||||
'fieldType' => 'radio',
|
'fieldType' => 'radio',
|
||||||
'mandatory' => true,
|
'mandatory' => true,
|
||||||
'tl_class' => 'clr',
|
'tl_class' => 'clr',
|
||||||
],
|
],
|
||||||
'sql' => 'binary(16) NULL',
|
'sql' => 'binary(16) NULL',
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -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']['fileFormat'][1] = 'Choose which file format is used.';
|
||||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['file'][0] = 'File';
|
$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']['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'][0] = 'Layer group';
|
||||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['groupTypes']['layer'][1] = 'Basic layer group. <br> See <a href="http://leafletjs.com/reference.html#layergroup" target="_blank">http://leafletjs.com/reference.html#layergroup</a>';
|
$GLOBALS['TL_LANG']['tl_leaflet_layer']['groupTypes']['layer'][1] = 'Basic layer group. <br> See <a href="http://leafletjs.com/reference.html#layergroup" target="_blank">http://leafletjs.com/reference.html#layergroup</a>';
|
||||||
|
|||||||
Reference in New Issue
Block a user