forked from Snck3rs/contao-leaflet-maps
Implement a file layer for gpx,kml,wkt support.
This commit is contained in:
@@ -217,6 +217,14 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = [
|
||||
'pointToLayer',
|
||||
],
|
||||
],
|
||||
|
||||
'file extends default' => [
|
||||
'+config' => ['file'],
|
||||
'+expert' => [
|
||||
'onEachFeature',
|
||||
'pointToLayer',
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
'metasubselectpalettes' => [
|
||||
@@ -853,5 +861,18 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = [
|
||||
],
|
||||
'sql' => 'mediumtext NULL',
|
||||
],
|
||||
'file' => [
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['file'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'fileTree',
|
||||
'eval' => [
|
||||
'filesOnly' => true,
|
||||
'fieldType' => 'radio',
|
||||
'mandatory' => true,
|
||||
'extensions' => 'gpx,kml,wkt',
|
||||
'tl_class' => 'clr',
|
||||
],
|
||||
'sql' => 'binary(16) NULL',
|
||||
],
|
||||
],
|
||||
];
|
||||
|
||||
@@ -39,6 +39,8 @@ $GLOBALS['TL_LANG']['leaflet_layer']['tile'][0] = 'Tile layer';
|
||||
$GLOBALS['TL_LANG']['leaflet_layer']['tile'][1] = 'Tile layer with full config options.';
|
||||
$GLOBALS['TL_LANG']['leaflet_layer']['overpass'][0] = 'Overpass API';
|
||||
$GLOBALS['TL_LANG']['leaflet_layer']['overpass'][1] = 'Overpass API data layer.';
|
||||
$GLOBALS['TL_LANG']['leaflet_layer']['file'][0] = 'File';
|
||||
$GLOBALS['TL_LANG']['leaflet_layer']['file'][1] = 'Geo data from a file (gpx,kml,wkt).';
|
||||
|
||||
$GLOBALS['TL_LANG']['leaflet_vector']['polyline'][0] = 'Polyline';
|
||||
$GLOBALS['TL_LANG']['leaflet_vector']['polyline'][1] = 'Polyline overlay. For more details read the <a href="http://leafletjs.com/reference.html#polyline" target="_blank">Leaflet documentation</a>.';
|
||||
|
||||
@@ -145,6 +145,8 @@ $GLOBALS['TL_LANG']['tl_leaflet_layer']['amenity'][0] = 'Amen
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['amenity'][1] = 'OSM amenity.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['amenityIcon'][1] = 'Icon';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['amenityIcon'][0] = 'Icon style';
|
||||
$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 gpx,kml and wkt.';
|
||||
|
||||
$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>';
|
||||
|
||||
Reference in New Issue
Block a user