forked from Snck3rs/contao-leaflet-maps
Ongoing development.
This commit is contained in:
@@ -3,6 +3,10 @@
|
||||
background: url('./../img/fol-placeholder.gif') no-repeat 6px 1px;
|
||||
}
|
||||
|
||||
.tl_listing_container.tree_view ul > li.tl_file > div {
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.tl_listing_container.tree_view > ul > li.tl_file {
|
||||
padding-left: 26px;
|
||||
}
|
||||
|
||||
BIN
module/assets/img/group.png
Normal file
BIN
module/assets/img/group.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.5 KiB |
BIN
module/assets/img/map.png
Normal file
BIN
module/assets/img/map.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 873 B |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.5 KiB |
@@ -89,7 +89,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_control'] = array
|
||||
'default' => array(
|
||||
'name' => array('title', 'alias', 'type', 'position'),
|
||||
'config' => array(),
|
||||
'active' => array('active')
|
||||
'active' => array('active'),
|
||||
),
|
||||
'zoom extends default' => array(
|
||||
'config' => array('zoomInText', 'zoomOutText', 'zoomInTitle', 'zoomOutTitle'),
|
||||
@@ -160,7 +160,8 @@ $GLOBALS['TL_DCA']['tl_leaflet_control'] = array
|
||||
'exclude' => true,
|
||||
'inputType' => 'select',
|
||||
'options' => array('topleft', 'topright', 'bottomleft', 'bottomright'),
|
||||
'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'),
|
||||
'reference' => &$GLOBALS['TL_LANG']['tl_leaflet_control'],
|
||||
'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50', 'helpwizard' => true),
|
||||
'sql' => "varchar(255) NOT NULL default ''"
|
||||
),
|
||||
'active' => array
|
||||
@@ -189,7 +190,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_control'] = array
|
||||
),
|
||||
'zoomInTitle' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['zoomInText'],
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['zoomInTitle'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'),
|
||||
@@ -197,7 +198,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_control'] = array
|
||||
),
|
||||
'zoomOutTitle' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['zoomInText'],
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['zoomOutTitle'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'),
|
||||
@@ -245,12 +246,14 @@ $GLOBALS['TL_DCA']['tl_leaflet_control'] = array
|
||||
),
|
||||
'mode' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['layer'],
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['layerMode'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'select',
|
||||
'options' => array('base', 'overlay'),
|
||||
'reference' => &$GLOBALS['TL_LANG']['tl_leaflet_control'],
|
||||
'eval' => array(
|
||||
'style' => 'width: 200px'
|
||||
'style' => 'width: 200px',
|
||||
'helpwizard' => true,
|
||||
),
|
||||
),
|
||||
)
|
||||
|
||||
@@ -26,7 +26,8 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
|
||||
'label' => array
|
||||
(
|
||||
'fields' => array('title'),
|
||||
'format' => '%s'
|
||||
'format' => '%s',
|
||||
'label_callback' => array('Netzmacht\Contao\Leaflet\Dca\Layer', 'generateRow')
|
||||
),
|
||||
'global_operations' => array
|
||||
(
|
||||
@@ -47,6 +48,13 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
|
||||
),
|
||||
'operations' => array
|
||||
(
|
||||
'markers' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['markers'],
|
||||
'href' => 'table=tl_leaflet_marker',
|
||||
'icon' => 'edit.gif',
|
||||
'button_callback' => array('Netzmacht\Contao\Leaflet\Dca\Layer', 'generateMarkersButton'),
|
||||
),
|
||||
'edit' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['edit'],
|
||||
@@ -73,6 +81,16 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
|
||||
'icon' => 'delete.gif',
|
||||
'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm'] . '\'))return false;Backend.getScrollOffset()"'
|
||||
),
|
||||
'toggle' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['toggle'],
|
||||
'icon' => 'visible.gif',
|
||||
'attributes' => 'onclick="Backend.getScrollOffset();return AjaxRequest.toggleVisibility(this,%s)"',
|
||||
'button_callback' => \Netzmacht\Contao\DevTools\Dca::createToggleIconCallback(
|
||||
'tl_leaflet_layer',
|
||||
'active'
|
||||
)
|
||||
),
|
||||
'show' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['show'],
|
||||
@@ -82,9 +100,17 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
|
||||
)
|
||||
),
|
||||
|
||||
'palettes' => array(
|
||||
'__selector__' => array('type'),
|
||||
),
|
||||
|
||||
'metapalettes' => array(
|
||||
'default' => array(
|
||||
'title' => array('title', 'alias', 'type'),
|
||||
'title' => array('title', 'alias', 'type'),
|
||||
'active' => array('active'),
|
||||
),
|
||||
'markers extends default' => array(
|
||||
'+title' => array('markerCluster'),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -97,26 +123,25 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
|
||||
'HERE' => array('tile_provider_key', 'tile_provider_code'),
|
||||
),
|
||||
),
|
||||
|
||||
'fields' => array
|
||||
(
|
||||
'id' => array
|
||||
'id' => array
|
||||
(
|
||||
'sql' => "int(10) unsigned NOT NULL auto_increment"
|
||||
'sql' => "int(10) unsigned NOT NULL auto_increment"
|
||||
),
|
||||
'pid' => array
|
||||
'pid' => array
|
||||
(
|
||||
'sql' => "int(10) unsigned NOT NULL default '0'"
|
||||
'sql' => "int(10) unsigned NOT NULL default '0'"
|
||||
),
|
||||
'sorting' => array
|
||||
'sorting' => array
|
||||
(
|
||||
'sql' => "int(10) unsigned NOT NULL default '0'"
|
||||
'sql' => "int(10) unsigned NOT NULL default '0'"
|
||||
),
|
||||
'tstamp' => array
|
||||
'tstamp' => array
|
||||
(
|
||||
'sql' => "int(10) unsigned NOT NULL default '0'"
|
||||
'sql' => "int(10) unsigned NOT NULL default '0'"
|
||||
),
|
||||
'title' => array
|
||||
'title' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['title'],
|
||||
'exclude' => true,
|
||||
@@ -124,7 +149,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
|
||||
'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'),
|
||||
'sql' => "varchar(255) NOT NULL default ''"
|
||||
),
|
||||
'alias' => array
|
||||
'alias' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['alias'],
|
||||
'exclude' => true,
|
||||
@@ -132,7 +157,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
|
||||
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'),
|
||||
'sql' => "varchar(255) NOT NULL default ''"
|
||||
),
|
||||
'type' => array
|
||||
'type' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['type'],
|
||||
'exclude' => true,
|
||||
@@ -145,9 +170,18 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
|
||||
'chosen' => true,
|
||||
),
|
||||
'options' => array_keys($GLOBALS['LEAFLET_LAYERS']),
|
||||
'reference' => &$GLOBALS['TL_LANG']['leaflet_layer'],
|
||||
'sql' => "varchar(32) NOT NULL default ''"
|
||||
),
|
||||
'tile_provider' => array(
|
||||
'active' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['active'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'checkbox',
|
||||
'eval' => array('tl_class' => 'w50'),
|
||||
'sql' => "char(1) NOT NULL default ''"
|
||||
),
|
||||
'tile_provider' => array(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['tile_provider'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'select',
|
||||
@@ -162,19 +196,19 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
|
||||
'sql' => "varchar(32) NOT NULL default ''"
|
||||
),
|
||||
'tile_provider_variant' => array(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['tile_provider_variant'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'select',
|
||||
'eval' => array(
|
||||
'mandatory' => false,
|
||||
'tl_class' => 'w50',
|
||||
'submitOnChange' => true,
|
||||
'chosen' => false,
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['tile_provider_variant'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'select',
|
||||
'eval' => array(
|
||||
'mandatory' => false,
|
||||
'tl_class' => 'w50',
|
||||
'submitOnChange' => true,
|
||||
'chosen' => false,
|
||||
),
|
||||
'options_callback' => array('Netzmacht\Contao\Leaflet\Dca\Layer', 'getVariants'),
|
||||
'sql' => "varchar(32) NOT NULL default ''"
|
||||
'sql' => "varchar(32) NOT NULL default ''"
|
||||
),
|
||||
'tile_provider_key' => array
|
||||
'tile_provider_key' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['tile_provider_key'],
|
||||
'exclude' => true,
|
||||
@@ -182,7 +216,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
|
||||
'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'clr w50'),
|
||||
'sql' => "varchar(255) NOT NULL default ''"
|
||||
),
|
||||
'tile_provider_code' => array
|
||||
'tile_provider_code' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['tile_provider_code'],
|
||||
'exclude' => true,
|
||||
@@ -190,5 +224,21 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = array
|
||||
'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'),
|
||||
'sql' => "varchar(255) NOT NULL default ''"
|
||||
),
|
||||
'markerCluster' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_layer']['markerCluster'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'select',
|
||||
'options_callback' => array('Netzmacht\Contao\Leaflet\Dca\Layer', 'getMarkerClusterLayers'),
|
||||
'reference' => &$GLOBALS['TL_LANG']['leaflet_layer'],
|
||||
'eval' => array(
|
||||
'mandatory' => false,
|
||||
'maxlength' => 255,
|
||||
'tl_class' => 'w50',
|
||||
'chosen' => true,
|
||||
'includeBlankOption' => true
|
||||
),
|
||||
'sql' => "varchar(255) NOT NULL default ''"
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
361
module/dca/tl_leaflet_marker.php
Normal file
361
module/dca/tl_leaflet_marker.php
Normal file
@@ -0,0 +1,361 @@
|
||||
<?php
|
||||
|
||||
$GLOBALS['TL_DCA']['tl_leaflet_marker'] = array
|
||||
(
|
||||
'config' => array(
|
||||
'dataContainer' => 'Table',
|
||||
'enableVersioning' => true,
|
||||
'ptable' => 'tl_leaflet_layer',
|
||||
'sql' => array
|
||||
(
|
||||
'keys' => array
|
||||
(
|
||||
'id' => 'primary'
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
'list' => array
|
||||
(
|
||||
'sorting' => array
|
||||
(
|
||||
'mode' => 4,
|
||||
'fields' => array('title'),
|
||||
'flag' => 1,
|
||||
'headerFields' => array('title', 'type'),
|
||||
'child_record_callback' => array('Netzmacht\Contao\Leaflet\Dca\Marker', 'generateRow'),
|
||||
),
|
||||
'label' => array
|
||||
(
|
||||
'fields' => array('title'),
|
||||
'format' => '%s',
|
||||
),
|
||||
'global_operations' => array
|
||||
(
|
||||
'all' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['MSC']['all'],
|
||||
'href' => 'act=select',
|
||||
'class' => 'header_edit_all',
|
||||
'attributes' => 'onclick="Backend.getScrollOffset();" accesskey="e"'
|
||||
),
|
||||
),
|
||||
'operations' => array
|
||||
(
|
||||
'edit' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['edit'],
|
||||
'href' => 'act=edit',
|
||||
'icon' => 'edit.gif'
|
||||
),
|
||||
'copy' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['copy'],
|
||||
'href' => 'act=copy',
|
||||
'icon' => 'copy.gif'
|
||||
),
|
||||
'delete' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['delete'],
|
||||
'href' => 'act=delete',
|
||||
'icon' => 'delete.gif',
|
||||
'attributes' => 'onclick="if(!confirm(\'' . $GLOBALS['TL_LANG']['MSC']['deleteConfirm'] . '\'))return false;Backend.getScrollOffset()"'
|
||||
),
|
||||
'toggle' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['toggle'],
|
||||
'icon' => 'visible.gif',
|
||||
'attributes' => 'onclick="Backend.getScrollOffset();return AjaxRequest.toggleVisibility(this,%s)"',
|
||||
'button_callback' => \Netzmacht\Contao\DevTools\Dca::createToggleIconCallback(
|
||||
'tl_leaflet_marker',
|
||||
'active'
|
||||
)
|
||||
),
|
||||
'show' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['show'],
|
||||
'href' => 'act=show',
|
||||
'icon' => 'show.gif'
|
||||
)
|
||||
)
|
||||
),
|
||||
|
||||
'metapalettes' => array(
|
||||
'default' => array(
|
||||
'title' => array('title', 'alias', 'coordinates'),
|
||||
'content' => array('tooltip', 'alt', 'addPopup'),
|
||||
'icon' => array(':hide', 'customIcon'),
|
||||
'config' => array(
|
||||
':hide',
|
||||
'clickable',
|
||||
'draggable',
|
||||
'keyboard',
|
||||
'zIndexOffset',
|
||||
'opacity',
|
||||
'riseOnHover',
|
||||
'riseOffset'
|
||||
),
|
||||
'active' => array('active')
|
||||
),
|
||||
),
|
||||
'metasubpalettes' => array(
|
||||
'addPopup' => array('popupContent'),
|
||||
'customIcon' => array(
|
||||
'icon',
|
||||
'retinaIcon',
|
||||
'iconAnchor',
|
||||
'popupAnchor',
|
||||
'iconClassName',
|
||||
'shadowImage',
|
||||
'shadowRetinaImage',
|
||||
'shadowAnchor',
|
||||
)
|
||||
),
|
||||
|
||||
'fields' => array
|
||||
(
|
||||
'id' => array
|
||||
(
|
||||
'sql' => "int(10) unsigned NOT NULL auto_increment"
|
||||
),
|
||||
'tstamp' => array
|
||||
(
|
||||
'sql' => "int(10) unsigned NOT NULL default '0'"
|
||||
),
|
||||
'pid' => array
|
||||
(
|
||||
'sql' => "int(10) unsigned NOT NULL default '0'"
|
||||
),
|
||||
'title' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['title'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'eval' => array('mandatory' => true, 'maxlength' => 255, 'tl_class' => 'w50'),
|
||||
'sql' => "varchar(255) NOT NULL default ''"
|
||||
),
|
||||
'alias' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['alias'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'),
|
||||
'sql' => "varchar(255) NOT NULL default ''"
|
||||
),
|
||||
'coordinates' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['coordinates'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'save_callback' => array(
|
||||
array('Netzmacht\Contao\Leaflet\Dca\Leaflet', 'validateCoordinate')
|
||||
),
|
||||
'wizard' => array(
|
||||
array('Netzmacht\Contao\Leaflet\Dca\Leaflet', 'getGeocoder')
|
||||
),
|
||||
'eval' => array(
|
||||
'maxlength' => 255,
|
||||
'tl_class' => 'long clr',
|
||||
'nullIfEmpty' => true,
|
||||
),
|
||||
'sql' => "varchar(255) NULL"
|
||||
),
|
||||
'active' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['active'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'checkbox',
|
||||
'eval' => array('tl_class' => 'w50'),
|
||||
'sql' => "char(1) NOT NULL default ''"
|
||||
),
|
||||
'tooltip' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['tooltip'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'),
|
||||
'sql' => "varchar(255) NOT NULL default ''"
|
||||
),
|
||||
'alt' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['alt'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'),
|
||||
'sql' => "varchar(255) NOT NULL default ''"
|
||||
),
|
||||
'addPopup' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['addPopup'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'checkbox',
|
||||
'default' => true,
|
||||
'eval' => array('tl_class' => 'w50', 'submitOnChange' => true),
|
||||
'sql' => "char(1) NOT NULL default ''"
|
||||
),
|
||||
'popupContent' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['popupContent'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'default' => true,
|
||||
'eval' => array('mandatory' => true, 'rte' => 'tinyMCE', 'helpwizard' => true, 'tl_class' => 'clr'),
|
||||
'explanation' => 'insertTags',
|
||||
'sql' => "mediumtext NULL"
|
||||
),
|
||||
'customIcon' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['customIcon'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'checkbox',
|
||||
'default' => true,
|
||||
'eval' => array('tl_class' => 'w50', 'submitOnChange' => true),
|
||||
'sql' => "char(1) NOT NULL default ''"
|
||||
),
|
||||
'icon' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_content']['icon'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'fileTree',
|
||||
'eval' => array(
|
||||
'filesOnly' => true,
|
||||
'fieldType' => 'radio',
|
||||
'mandatory' => true,
|
||||
'tl_class' => 'clr w50',
|
||||
'extensions' => 'gif,png,svg,jpg'
|
||||
),
|
||||
'sql' => "binary(16) NULL",
|
||||
),
|
||||
'retinaIcon' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_content']['retinaIcon'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'fileTree',
|
||||
'eval' => array(
|
||||
'filesOnly' => true,
|
||||
'fieldType' => 'radio',
|
||||
'mandatory' => false,
|
||||
'tl_class' => 'w50',
|
||||
'extensions' => 'gif,png,svg,jpg'
|
||||
),
|
||||
'sql' => "binary(16) NULL",
|
||||
),
|
||||
'shadowImage' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_content']['shadowImage'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'fileTree',
|
||||
'eval' => array(
|
||||
'filesOnly' => true,
|
||||
'fieldType' => 'radio',
|
||||
'mandatory' => false,
|
||||
'tl_class' => 'clr w50',
|
||||
'extensions' => 'gif,png,svg,jpg'
|
||||
),
|
||||
'sql' => "binary(16) NULL",
|
||||
),
|
||||
'shadowRetinaImage' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_content']['shadowRetinaImage'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'fileTree',
|
||||
'eval' => array(
|
||||
'filesOnly' => true,
|
||||
'fieldType' => 'radio',
|
||||
'mandatory' => false,
|
||||
'tl_class' => 'w50',
|
||||
'extensions' => 'gif,png,svg,jpg'
|
||||
),
|
||||
'sql' => "binary(16) NULL",
|
||||
),
|
||||
'draggable' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['draggable'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'checkbox',
|
||||
'default' => true,
|
||||
'eval' => array('tl_class' => 'w50'),
|
||||
'sql' => "char(1) NOT NULL default ''"
|
||||
),
|
||||
'clickable' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['clickable'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'checkbox',
|
||||
'default' => true,
|
||||
'eval' => array('tl_class' => 'w50'),
|
||||
'sql' => "char(1) NOT NULL default ''"
|
||||
),
|
||||
'keyboard' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['keyboard'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'checkbox',
|
||||
'default' => true,
|
||||
'eval' => array('tl_class' => 'w50'),
|
||||
'sql' => "char(1) NOT NULL default ''"
|
||||
),
|
||||
'zIndexOffset' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_map']['zIndexOffset'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'default' => 0,
|
||||
'eval' => array('mandatory' => true, 'maxlength' => 4, 'rgxp' => 'digit', 'tl_class' => 'clr w50'),
|
||||
'sql' => "int(4) NOT NULL default '0'"
|
||||
),
|
||||
'iconAnchor' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['iconAnchor'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'save_callback' => array(
|
||||
array('Netzmacht\Contao\Leaflet\Dca\Leaflet', 'validateCoordinate')
|
||||
),
|
||||
'eval' => array(
|
||||
'maxlength' => 255,
|
||||
'tl_class' => 'w50',
|
||||
'nullIfEmpty' => true,
|
||||
),
|
||||
'sql' => "varchar(255) NULL"
|
||||
),
|
||||
'shadowAnchor' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['shadowAnchor'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'save_callback' => array(
|
||||
array('Netzmacht\Contao\Leaflet\Dca\Leaflet', 'validateCoordinate')
|
||||
),
|
||||
'eval' => array(
|
||||
'maxlength' => 255,
|
||||
'tl_class' => 'w50',
|
||||
'nullIfEmpty' => true,
|
||||
),
|
||||
'sql' => "varchar(255) NULL"
|
||||
),
|
||||
'popupAnchor' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['popupAnchor'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'save_callback' => array(
|
||||
array('Netzmacht\Contao\Leaflet\Dca\Leaflet', 'validateCoordinate')
|
||||
),
|
||||
'eval' => array(
|
||||
'maxlength' => 255,
|
||||
'tl_class' => 'w50',
|
||||
'nullIfEmpty' => true,
|
||||
),
|
||||
'sql' => "varchar(255) NULL"
|
||||
),
|
||||
'iconClassName' => array
|
||||
(
|
||||
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_marker']['iconClassName'],
|
||||
'exclude' => true,
|
||||
'inputType' => 'text',
|
||||
'eval' => array('mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50'),
|
||||
'sql' => "varchar(255) NOT NULL default ''"
|
||||
),
|
||||
),
|
||||
);
|
||||
0
module/dca/tl_leaflet_vector.php
Normal file
0
module/dca/tl_leaflet_vector.php
Normal file
6
module/languages/en/leaflet_layer.php
Normal file
6
module/languages/en/leaflet_layer.php
Normal file
@@ -0,0 +1,6 @@
|
||||
<?php
|
||||
|
||||
$GLOBALS['TL_LANG']['leaflet_layer']['provider'][0] = 'Leaflet provider';
|
||||
$GLOBALS['TL_LANG']['leaflet_layer']['provider'][1] = 'Leaflet tile provider';
|
||||
$GLOBALS['TL_LANG']['leaflet_layer']['group'][0] = 'Layer group';
|
||||
$GLOBALS['TL_LANG']['leaflet_layer']['group'][1] = 'Layers group';
|
||||
75
module/languages/en/tl_leaflet_control.php
Normal file
75
module/languages/en/tl_leaflet_control.php
Normal file
@@ -0,0 +1,75 @@
|
||||
<?php
|
||||
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['name_legend'] = 'Title and type';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['config_legend'] = 'Configuration';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['active_legend'] = 'Activation';
|
||||
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['new'][0] = 'Create control';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['new'][1] = 'Create new control';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['edit'][0] = 'Edit control';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['edit'][1] = 'Edit control ID %s';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['copy'][0] = 'Copy control';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['copy'][1] = 'Copy control ID %s';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['delete'][0] = 'Delete control';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['delete'][1] = 'Delete control ID %s';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['toggle'][0] = 'Toggle activation';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['toggle'][1] = 'Toggle activation of control ID %s';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['show'][0] = 'Show details';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['show'][1] = 'Show control ID %s details';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['pastenew'][0] = 'Copy control';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['pastenew'][1] = 'Create new copy of control ID %s';
|
||||
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['title'][0] = 'Title';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['title'][1] = 'Title of the control.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['alias'][0] = 'Alias';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['alias'][1] = 'Alias of the control.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['type'][0] = 'Type';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['type'][1] = 'Choose the control type.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['position'][0] = 'Position';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['position'][1] = 'Position of the control.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['zoomInText'][0] = 'Zoom in text';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['zoomInText'][1] = 'The text set on the zoom in button. By default its the "+" sign. Leave empty for the default value';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['zoomOutText'][0] = 'Zoom out text';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['zoomOutText'][1] = 'The text set on the zoom out button. By default its the "-" sign. Leave empty for the default value';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['zoomInTitle'][0] = 'Zoom in title';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['zoomInTitle'][1] = 'The title set on the zoom in button.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['zoomOutTitle'][0] = 'Zoom out title';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['zoomOutTitle'][1] = 'The title set on the zoom out button.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['active'][0] = 'Activate control';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['active'][1] = 'Activate control on the map.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['attributions'][0] = 'Attributions';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['attributions'][1] = 'Add attribution texts. HTML is allowed here.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['prefix'][0] = 'Attribution prefix';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['prefix'][1] = 'Customize the attribution prefix. By default it\'s the Leaflet link. HTML is allowed here.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['maxWidth'][0] = 'Max width';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['maxWidth'][1] = 'Maximum width of the control in pixels. The width is set dynamically to show round values (e.g. 100, 200, 500).';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['metric'][0] = 'Metric scale';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['metric'][1] = 'Whether to show the metric scale line (m/km).';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['imperial'][0] = 'Imperial scale';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['imperial'][1] = 'Whether to show the imperial scale line (mi/ft).';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['updateWhenIdle'][0] = 'Update when idle';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['updateWhenIdle'][1] = 'If true, the control is updated on moveend, otherwise it\'s always up-to-date (updated on move).';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['layers'][0] = 'Layers';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['layers'][1] = 'Add layers to the control.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['layer'][0] = 'Layer';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['layer'][1] = 'Choose a layer. Each layer can only be added once.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['layerMode'][0] = 'Mode';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['layerMode'][1] = 'Add layer as baselayer or overlay.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['collapsed'][0] = 'Collapsed';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['collapsed'][1] = 'If true, the control will be collapsed into an icon and expanded on mouse hover or touch.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['autoZIndex'][0] = 'Auto zIndex';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['autoZIndex'][1] = 'If true, the control will assign zIndexes in increasing order to all of its layers so that the order is preserved when switching them on/off.';
|
||||
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['bottomleft'][0] = 'Bottom left';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['bottomleft'][1] = 'Bottom left of the map.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['topleft'][0] = 'Top left';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['topleft'][1] = 'Top left of the map.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['bottomright'][0] = 'Bottom right';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['bottomright'][1] = 'Bottom right of the map.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['topright'][0] = 'Top right';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['topright'][1] = 'Top right of the map.';
|
||||
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['base'][0] = 'Base layer';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['base'][1] = 'Base layers will be switched with radio buttons. Note that all base layers should be passed in the base layers object, but only one should be added to the map during map instantiation';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['overlay'][0] = 'Overlay';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_control']['overlay'][1] = 'Overlays will be switched with checkboxes.';
|
||||
36
module/languages/en/tl_leaflet_layer.php
Normal file
36
module/languages/en/tl_leaflet_layer.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['title_legend'] = 'Layer';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['active_legend'] = 'Activation';
|
||||
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['map'][0] = 'Manage maps';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['map'][1] = 'Manage leaflet maps';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['new'][0] = 'Create layer';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['new'][1] = 'Create new layer';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['edit'][0] = 'Edit layer';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['edit'][1] = 'Edit layer ID %s';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['copy'][0] = 'Copy layer';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['copy'][1] = 'Copy layer ID %s';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['delete'][0] = 'Delete layer';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['delete'][1] = 'Delete layer ID %s';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['toggle'][0] = 'Toggle activation';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['toggle'][1] = 'Toggle activation of layer ID %s';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['show'][0] = 'Show details';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['show'][1] = 'Show layer ID %s details';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['cut'][0] = 'Move layer';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['cut'][1] = 'Move layer ID %s';
|
||||
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['title'][0] = 'Title';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['title'][1] = 'Title of the layer.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['alias'][0] = 'Alias';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['alias'][1] = 'Alias of the layer.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['type'][0] = 'Type';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['type'][1] = 'Choose the layer type.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['tile_provider'][0] = 'Tile provider';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['tile_provider'][1] = 'Choose the layer type.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['tile_provider_variant'][0] = 'Tile variant';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['tile_provider_variant'][1] = 'Tile variant style.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['active'][0] = 'Activate layer';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['active'][1] = 'Activate layer on the map.';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['markerCluster'][0] = 'Marker cluster';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_layer']['markerCluster'][1] = 'Choose a marker cluster layer so that markers get clustered.';
|
||||
@@ -5,6 +5,7 @@ $GLOBALS['TL_LANG']['tl_leaflet_map']['interaction_legend'] = 'Interaction contr
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['zoom_legend'] = 'Center and zoom';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['controls_legend'] = 'Control widgets';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['expert_legend'] = 'Expert settings';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['behaviour_legend'] = 'Behaviour';
|
||||
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['layersBtn'][0] = 'Manage layers';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['layersBtn'][1] = 'Manage leaflet layers';
|
||||
@@ -14,6 +15,8 @@ $GLOBALS['TL_LANG']['tl_leaflet_map']['edit'][0] = 'Edit map';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['edit'][1] = 'Edit map ID %s';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['copy'][0] = 'Copy map';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['copy'][1] = 'Copy map ID %s';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['controls'][0] = 'Manage controls';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['controls'][1] = 'Manage controls of map ID %s';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['delete'][0] = 'Delete map';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['delete'][1] = 'Delete map ID %s';
|
||||
$GLOBALS['TL_LANG']['tl_leaflet_map']['show'][0] = 'Show details';
|
||||
|
||||
7
module/public/.htaccess
Normal file
7
module/public/.htaccess
Normal file
@@ -0,0 +1,7 @@
|
||||
<IfModule !mod_authz_core.c>
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
</IfModule>
|
||||
<IfModule mod_authz_core.c>
|
||||
Require all granted
|
||||
</IfModule>
|
||||
11
module/public/geojson.php
Normal file
11
module/public/geojson.php
Normal file
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
use Netzmacht\Contao\Leaflet\Controller\GeoJsonController;
|
||||
|
||||
define('TL_MODE', 'FE');
|
||||
require(dirname(dirname(dirname(dirname($_SERVER['SCRIPT_FILENAME'])))) . '/initialize.php');
|
||||
|
||||
$container = $GLOBALS['container'];
|
||||
$controller = new GeoJsonController($container['leaflet.map.service'], $container['input']);
|
||||
|
||||
echo $controller->execute();
|
||||
Reference in New Issue
Block a user