vendor/con4gis/maps/Resources/contao/dca/tl_c4g_map_profiles.php line 167

Open in your IDE?
  1. <?php if (!defined('TL_ROOT')) die('You cannot access this file directly!');
  2. /**
  3.  * con4gis - the gis-kit
  4.  *
  5.  * @version   php 7
  6.  * @package   con4gis
  7.  * @author    con4gis contributors (see "authors.txt")
  8.  * @license   GNU/LGPL http://opensource.org/licenses/lgpl-3.0.html
  9.  * @copyright Küstenschmiede GmbH Software & Design 2011 - 2018
  10.  * @link      https://www.kuestenschmiede.de
  11.  */
  12. /**
  13.  * Table tl_c4g_stuffprofiles
  14.  */
  15. $GLOBALS['TL_DCA']['tl_c4g_map_profiles'] = array
  16. (
  17.     // Config
  18.     'config' => array
  19.     (
  20.         'dataContainer'               => 'Table',
  21.         'enableVersioning'            => true,
  22.         'onload_callback'             => array(array('tl_c4g_map_profiles''updateDCA')),
  23.         'onsubmit_callback'             => array(
  24.             array('\con4gis\CoreBundle\Resources\contao\classes\C4GAutomator''purgeApiCache')
  25.         ),
  26.         'sql'                         => array
  27.         (
  28.             'keys' => array
  29.             (
  30.                 'id' => 'primary'
  31.             )
  32.         )
  33.     ),
  34.     // List
  35.     'list' => array
  36.     (
  37.         'sorting' => array
  38.         (
  39.             'mode'                    => 1,
  40.             'fields'                  => array('name'),
  41.             'flag'                    => 1
  42.         ),
  43.         'label' => array
  44.         (
  45.             'fields'                  => array('name'),
  46.             'format'                  => '%s'
  47.         ),
  48.         'global_operations' => array
  49.         (
  50.             'all' => array
  51.             (
  52.                 'label'               => &$GLOBALS['TL_LANG']['MSC']['all'],
  53.                 'href'                => 'act=select',
  54.                 'class'               => 'header_edit_all',
  55.                 'attributes'          => 'onclick="Backend.getScrollOffset();" accesskey="e"'
  56.             )
  57.         ),
  58.         'operations' => array
  59.         (
  60.             'edit' => array
  61.             (
  62.                 'label'               => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['edit'],
  63.                 'href'                => 'act=edit',
  64.                 'icon'                => 'edit.gif'
  65.             ),
  66.             'copy' => array
  67.             (
  68.                 'label'               => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['copy'],
  69.                 'href'                => 'act=copy',
  70.                 'icon'                => 'copy.gif'
  71.             ),
  72.             'delete' => array
  73.             (
  74.                 'label'               => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['delete'],
  75.                 'href'                => 'act=delete',
  76.                 'icon'                => 'delete.gif',
  77.                 'attributes'          => 'onclick="if (!confirm(\'' $GLOBALS['TL_LANG']['MSC']['deleteConfirm'] . '\')) return false; Backend.getScrollOffset();"'
  78.             ),
  79.             'show' => array
  80.             (
  81.                 'label'               => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['show'],
  82.                 'href'                => 'act=show',
  83.                 'icon'                => 'show.gif'
  84.             )
  85.         )
  86.     ),
  87.     // Palettes
  88.     'palettes' => array
  89.     (
  90.         '__selector__'                => array('mouse_nav','starboard','cluster_all','baselayerswitcher','layerswitcher','attribution','hover_popups','permalink','geosearch','geopicker','router''cesium'),
  91.         'default'                     => '{general_legend},name,is_default,theme;'.
  92.                                          '{baselayer_legend:hide},baselayers, default_baselayer;'.
  93.                                          '{locstyle_legend:hide},locstyles;'.
  94.                                          '{navigation_legend},zoom_panel,zoom_panel_button,zoom_panel_slider,mouse_nav,touch_nav,keyboard_nav,fullscreen;'.
  95.                                          '{starboard_legend:hide},starboard;'.
  96.                                          '{information_legend},attribution,overviewmap,measuretool,graticule,scaleline,mouseposition,permalink,zoomlevel;'.
  97.                                          '{geosearch_legend:hide},geosearch,router;'.
  98.                                          '{info_legend:hide},infopage;'.
  99.                                          '{click_legend:hide},link_newwindow,link_open_on,hover_popups;'.
  100.                                          '{geopicker_legend:hide},is_backend_geopicker_default,geopicker;'.
  101.                                          '{editor_legend:hide},editor,editor_styles_point,editor_styles_line,editor_styles_polygon,editor_styles_circle,editor_styles_freehand,editor_vars,editor_show_items,editor_helpurl,is_backend_editor_default;'.
  102.                                          '{cesium_legend:hide},cesium;'.
  103.                                          '{expert_legend:hide},script,overpass_url,custom_div;'.
  104.                                          '{backend_legend:hide},be_optimize_checkboxes_limit;'
  105.     ),
  106.     // Subpalettes
  107.     'subpalettes' => array
  108.     (
  109.         'mouse_nav'                   => 'mouse_nav_wheel,mouse_nav_doubleclick_zoom,mouse_nav_zoombox,mouse_nav_dragmode,mouse_nav_kinetic',
  110.         'starboard'                   => 'starboard_open,starboard_div,starboard_label,baselayerswitcher,layerswitcher,starboard_filter,starboard_button,cluster_all,async_content',
  111.         'cluster_all'                 => 'cluster_distance,cluster_fillcolor,cluster_fontcolor,cluster_zoom',
  112.         'baselayerswitcher'           => 'baselayerswitcher_label',
  113.         'layerswitcher'               => 'layerswitcher_label',
  114.         'attribution'                 => 'collapsed_attribution,cfg_logo_attribution,div_attribution,add_attribution',
  115.         'hover_popups'                => 'hover_popups_stay',
  116.         'permalink'                   => 'permalink_get_param',
  117.         'geosearch'                   => 'geosearch_engine,geosearch_results,geosearch_show,geosearch_div,geosearch_zoomto,geosearch_zoombounds,geosearch_animate,geosearch_markresult,geosearch_popup,geosearch_attribution,geosearch_collapsed',
  118.         'geopicker'                   => 'geopicker_fieldx,geopicker_fieldy,geopicker_searchdiv,geopicker_attribution,geopicker_disabled,geopicker_anonymous',
  119.         'router'                      => 'router_api_selection,router_alternative,router_viaroute_url,router_attribution,router_from_locstyle,router_to_locstyle,router_point_locstyle,router_interim_locstyle',
  120.         'cesium'                      => 'cesium_always',
  121.     ),
  122.     // Fields
  123.     'fields' => array
  124.     (
  125.         'id' => array
  126.         (
  127.             'sql'                     => "int(10) unsigned NOT NULL auto_increment"
  128.         ),
  129.         'tstamp' => array
  130.         (
  131.             'sql'                     => "int(10) unsigned NOT NULL default '0'"
  132.         ),
  133.         'name' => array
  134.         (
  135.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['name'],
  136.             'exclude'                 => true,
  137.             'inputType'               => 'text',
  138.             'eval'                    => array('mandatory'=>true'maxlength'=>30'tl_class'=>'w50'),
  139.             'sql'                     => "varchar(255) NOT NULL default ''"
  140.         ),
  141.         'is_default' => array
  142.         (
  143.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['is_default'],
  144.             'exclude'                 => true,
  145.             'default'                 => false,
  146.             'inputType'               => 'checkbox',
  147.             'eval'                    => array('tl_class'=>'w50''maxlength'=>30),
  148.             'save_callback'           => array(array('tl_c4g_map_profiles','set_default')),
  149.             'sql'                     => "char(1) NOT NULL default ''"
  150.         ),
  151.         'theme' => array
  152.         (
  153.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['theme'],
  154.             'exclude'                 => true,
  155.             'inputType'               => 'select',
  156.             'options_callback'        => array('tl_c4g_map_profiles''getAllThemes'),
  157.             'eval'                    => array('tl_class'=>'clr''includeBlankOption' => true'blankOptionLabel' => $GLOBALS['TL_LANG']['tl_c4g_map_profiles']['references']['default_theme']),
  158.             'reference'               => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['references'],
  159.             'sql'                     => "char(10) NOT NULL default ''"
  160.         ),
  161.         'is_backend_editor_default' => array
  162.         (
  163.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['is_backend_editor_default'],
  164.             'exclude'                 => true,
  165.             'default'                 => false,
  166.             'inputType'               => 'checkbox',
  167.             'eval'                    => array('tl_class'=>'long'),
  168. //            'save_callback'           => array(array('tl_c4g_map_profiles','set_backend_default')),
  169.             'sql'                     => "char(1) NULL"
  170.         ),
  171.         'is_backend_geopicker_default' => array
  172.         (
  173.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['is_backend_geopicker_default'],
  174.             'exclude'                 => true,
  175.             'default'                 => false,
  176.             'inputType'               => 'checkbox',
  177.             'eval'                    => array('tl_class'=>'long'),
  178. //            'save_callback'           => array(array('tl_c4g_map_profiles','set_backend_default')),
  179.             'sql'                     => "char(1) NULL"
  180.         ),
  181.         'baselayers' => array
  182.         (
  183.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['baselayers'],
  184.             'exclude'                 => true,
  185.             'inputType'               => 'checkbox',
  186.             'options_callback'        => array('tl_c4g_map_profiles','getAllBaseLayers'),
  187.             'eval'                    => array('mandatory'=>false'multiple'=>true),
  188.             'sql'                     => "blob NULL"
  189.         ),
  190.         'default_baselayer' => array
  191.         (
  192.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['default_baselayer'],
  193.             'exclude'                 => true,
  194.             'inputType'               => 'select',
  195.             'options_callback'        => array('tl_c4g_map_profiles','getAllBaseLayers'),
  196.             'eval'                    => array('mandatory'=>false'multiple'=>false),
  197.             'sql'                     => "blob NULL"
  198.         ),
  199.         'locstyles' => array
  200.         (
  201.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['locstyles'],
  202.             'exclude'                 => true,
  203.             'inputType'               => 'checkbox',
  204.             'options_callback'        => array('tl_c4g_map_profiles','getAllLocStyles'),
  205.             'eval'                    => array('mandatory'=>false'multiple'=>true),
  206.             'sql'                     => "blob NULL"
  207.         ),
  208.         'zoom_panel' => array
  209.         (
  210.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['zoom_panel'],
  211.             'exclude'                 => true,
  212.             'default'                 => true,
  213.             'inputType'               => 'checkbox',
  214.             'sql'                     => "char(1) NOT NULL default '1'"
  215.         ),
  216.         'zoom_panel_button' => array
  217.         (
  218.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['zoom_panel_button'],
  219.             'exclude'                 => true,
  220.             'default'                 => true,
  221.             'default'                 => '',
  222.             'inputType'               => 'radio',
  223.             'options'                 => array('0','1','2','3'),
  224.             //'eval'                    => array('submitOnChange' => true),
  225.             'reference'               => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['references_zoom_panel_button'],
  226.             'sql'                     => "char(1) NOT NULL default '0'"
  227.         ),
  228.         'zoom_panel_slider' => array
  229.         (
  230.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['zoom_panel_slider'],
  231.             'exclude'                 => true,
  232.             'default'                 => false,
  233.             'inputType'               => 'checkbox',
  234.             'sql'                     => "char(1) NOT NULL default '0'"
  235.         ),
  236.         'mouse_nav' => array
  237.         (
  238.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['mouse_nav'],
  239.             'exclude'                 => true,
  240.             'default'                 => true,
  241.             'inputType'               => 'checkbox',
  242.             'eval'                    => array('submitOnChange' => true),
  243.             'sql'                     => "char(1) NOT NULL default '1'"
  244.         ),
  245.         'mouse_nav_wheel' => array
  246.         (
  247.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['mouse_nav_wheel'],
  248.             'exclude'                 => true,
  249.             'default'                 => true,
  250.             'inputType'               => 'checkbox',
  251.             'sql'                     => "char(1) NOT NULL default '1'"
  252.         ),
  253.         'mouse_nav_doubleclick_zoom' => array
  254.         (
  255.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['mouse_nav_doubleclick_zoom'],
  256.             'exclude'                 => true,
  257.             'default'                 => true,
  258.             'inputType'               => 'checkbox',
  259.             'sql'                     => "char(1) NOT NULL default '1'"
  260.         ),
  261.         'mouse_nav_zoombox' => array
  262.         (
  263.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['mouse_nav_zoombox'],
  264.             'exclude'                 => true,
  265.             'default'                 => true,
  266.             'inputType'               => 'checkbox',
  267.             'sql'                     => "char(1) NOT NULL default '1'"
  268.         ),
  269.         'mouse_nav_kinetic' => array
  270.         (
  271.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['mouse_nav_kinetic'],
  272.             'exclude'                 => true,
  273.             'default'                 => true,
  274.             'inputType'               => 'checkbox',
  275.             'sql'                     => "char(1) NOT NULL default '1'"
  276.         ),
  277.         'mouse_nav_dragmode' => array
  278.         (
  279.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['mouse_nav_dragmode'],
  280.             'exclude'                 => true,
  281.             'default'                 => '',
  282.             'inputType'               => 'radio',
  283.             'options'                 => array('0','1','2'),
  284.             //'eval'                    => array('submitOnChange' => true),
  285.             'reference'               => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['references_mouse_nav_dragmode'],
  286.             'sql'                     => "char(1) NOT NULL default '0'"
  287.         ),
  288.         'keyboard_nav' => array
  289.         (
  290.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['keyboard_nav'],
  291.             'exclude'                 => true,
  292.             'default'                 => true,
  293.             'inputType'               => 'checkbox',
  294.             'sql'                     => "char(1) NOT NULL default '1'"
  295.         ),
  296.         'touch_nav' => array
  297.         (
  298.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['touch_nav'],
  299.             'exclude'                 => true,
  300.             'default'                 => true,
  301.             'inputType'               => 'checkbox',
  302.             'sql'                     => "char(1) NOT NULL default '1'"
  303.         ),
  304.         'nav_history' => array
  305.         (
  306.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['nav_history'],
  307.             'exclude'                 => true,
  308.             'default'                 => false,
  309.             'inputType'               => 'checkbox',
  310.             'sql'                     => "char(1) NOT NULL default ''"
  311.         ),
  312.         'fullscreen' => array
  313.         (
  314.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['fullscreen'],
  315.             'exclude'                 => true,
  316.             'default'                 => false,
  317.             'inputType'               => 'checkbox',
  318.             'sql'                     => "char(1) NOT NULL default ''"
  319.         ),
  320.         'starboard' => array
  321.         (
  322.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['starboard'],
  323.             'exclude'                 => true,
  324.             'default'                 => true,
  325.             'inputType'               => 'checkbox',
  326.             'eval'                    => array('submitOnChange' => true),
  327.             'sql'                     => "char(1) NOT NULL default '1'"
  328.         ),
  329.         'starboard_open' => array
  330.         (
  331.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['starboard_open'],
  332.             'exclude'                 => true,
  333.             'default'                 => false,
  334.             'inputType'               => 'checkbox',
  335.             'sql'                     => "char(1) NOT NULL default ''"
  336.         ),
  337.         'starboard_label' => array
  338.         (
  339.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['starboard_label'],
  340.             'exclude'                 => true,
  341.             'inputType'               => 'text',
  342.             'eval'                    => array('maxlength'=>254),
  343.             'sql'                     => "varchar(254) NOT NULL default ''"
  344.         ),
  345.         'starboard_div' => array
  346.         (
  347.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['starboard_div'],
  348.             'exclude'                 => true,
  349.             'inputType'               => 'text',
  350.             'eval'                    => array('maxlength'=>254),
  351.             'sql'                     => "varchar(254) NOT NULL default ''"
  352.         ),
  353.         'starboard_filter' => array
  354.         (
  355.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['starboard_filter'],
  356.             'exclude'                 => true,
  357.             'default'                 => false,
  358.             'inputType'               => 'checkbox',
  359.             'sql'                     => "char(1) NOT NULL default '0'"
  360.         ),
  361.         'starboard_button' => array
  362.         (
  363.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['starboard_button'],
  364.             'exclude'                 => true,
  365.             'default'                 => false,
  366.             'inputType'               => 'checkbox',
  367.             'sql'                     => "char(1) NOT NULL default '0'"
  368.         ),
  369.         'cluster_all' => array
  370.         (
  371.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['cluster_all'],
  372.             'exclude'                 => true,
  373.             'default'                 => false,
  374.             'inputType'               => 'checkbox',
  375.             'eval'                    => array('submitOnChange' => true),
  376.             'sql'                     => "char(1) NOT NULL default ''"
  377.         ),
  378.         'cluster_distance' => array
  379.         (
  380.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['cluster_distance'],
  381.             'exclude'                 => true,
  382.             'inputType'               => 'text',
  383.             'eval'                    => array('maxlength'=>100),
  384.             'sql'                     => "varchar(100) NOT NULL default ''"
  385.         ),
  386.         'cluster_fillcolor' => array
  387.         (
  388.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['cluster_fillcolor'],
  389.             'inputType'               => 'text',
  390.             'default'                 => '4975A8',
  391.             'eval'                    => array('maxlength'=>6'isHexColor'=>true'colorpicker'=>true'decodeEntities'=>true'tl_class'=>'w50 wizard''mandatory'=>true),
  392.             'sql'                     => "varchar(6) NOT NULL default '4975A8'"
  393.         ),
  394.         'cluster_fontcolor' => array
  395.         (
  396.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['cluster_fontcolor'],
  397.             'default'                 => 'ffffff',
  398.             'inputType'               => 'text',
  399.             'eval'                    => array('maxlength'=>6'isHexColor'=>true'colorpicker'=>true'decodeEntities'=>true'tl_class'=>'w50 wizard'),
  400.             'sql'                     => "varchar(6) NOT NULL default 'ffffff'"
  401.         ),
  402.         'cluster_zoom' => array
  403.         (
  404.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['cluster_zoom'],
  405.             'default'                 => '17',
  406.             'exclude'                 => true,
  407.             'inputType'               => 'c4g_text',
  408.             'eval'                    => array('rgxp'=>'digit''tl_class'=>'clr'),
  409.             'sql'                     => "int(10) unsigned NOT NULL default '17'"
  410.         ),
  411.         'baselayerswitcher' => array
  412.         (
  413.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['baselayerswitcher'],
  414.             'exclude'                 => true,
  415.             'default'                 => true,
  416.             'inputType'               => 'checkbox',
  417.             'eval'                    => array('submitOnChange' => true),
  418.             'sql'                     => "char(1) NOT NULL default '1'"
  419.         ),
  420.         'baselayerswitcher_label' => array
  421.         (
  422.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['baselayerswitcher_label'],
  423.             'exclude'                 => true,
  424.             'inputType'               => 'text',
  425.             'eval'                    => array('maxlength'=>254),
  426.             'sql'                     => "varchar(254) NOT NULL default ''"
  427.         ),
  428.         'layerswitcher' => array
  429.         (
  430.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['layerswitcher'],
  431.             'exclude'                 => true,
  432.             'default'                 => true,
  433.             'inputType'               => 'checkbox',
  434.             'eval'                    => array('submitOnChange' => true),
  435.             'sql'                     => "char(1) NOT NULL default '1'"
  436.         ),
  437.         'layerswitcher_label' => array
  438.         (
  439.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['layerswitcher_label'],
  440.             'exclude'                 => true,
  441.             'inputType'               => 'text',
  442.             'eval'                    => array('maxlength'=>254),
  443.             'sql'                     => "varchar(254) NOT NULL default ''"
  444.         ),
  445.         'measuretool' => array
  446.         (
  447.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['measuretool'],
  448.             'exclude'                 => true,
  449.             'default'                 => false,
  450.             'inputType'               => 'checkbox',
  451.             'sql'                     => "char(1) NOT NULL default '0'"
  452.         ),
  453.         'graticule' => array
  454.         (
  455.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['graticule'],
  456.             'exclude'                 => true,
  457.             'default'                 => false,
  458.             'inputType'               => 'checkbox',
  459.             'sql'                     => "char(1) NOT NULL default ''"
  460.         ),
  461.         'editor' => array
  462.         (
  463.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['editor'],
  464.             'exclude'                 => true,
  465.             'inputType'               => 'checkbox',
  466.             'eval'                    => array('mandatory'=>false),
  467.             'sql'                     => "char(1) NOT NULL default ''"
  468.         ),
  469.         'attribution' => array
  470.         (
  471.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['attribution'],
  472.             'exclude'                 => true,
  473.             'default'                 => true,
  474.             'inputType'               => 'checkbox',
  475.             'eval'                    => array('submitOnChange' => true),
  476.             'sql'                     => "char(1) NOT NULL default '1'"
  477.         ),
  478.         'collapsed_attribution' => array
  479.         (
  480.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['collapsed_attribution'],
  481.             'exclude'                 => true,
  482.             'default'                 => false,
  483.             'inputType'               => 'checkbox',
  484.             'sql'                     => "char(1) NOT NULL default '0'"
  485.         ),
  486.         'cfg_logo_attribution' => array
  487.         (
  488.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['cfg_logo_attribution'],
  489.             'exclude'                 => true,
  490.             'default'                 => true,
  491.             'inputType'               => 'checkbox',
  492.             'sql'                     => "char(1) NOT NULL default '1'"
  493.         ),
  494.         'div_attribution' => array
  495.         (
  496.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['div_attribution'],
  497.             'exclude'                 => true,
  498.             'inputType'               => 'text',
  499.             'eval'                    => array('maxlength'=>30),
  500.             'sql'                     => "varchar(30) NOT NULL default ''"
  501.         ),
  502.         'add_attribution' => array
  503.         (
  504.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['add_attribution'],
  505.             'filter'                  => false,
  506.             'inputType'               => 'text',
  507.             'eval'                    => array('maxlength'=>255'tl_class'=>'long''allowHtml' => true),
  508.             'sql'                     => "varchar(255) NOT NULL default ''"
  509.         ),
  510.         'overviewmap' => array
  511.         (
  512.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['overviewmap'],
  513.             'exclude'                 => true,
  514.             'default'                 => false,
  515.             'inputType'               => 'checkbox',
  516.             'sql'                     => "char(1) NOT NULL default ''"
  517.         ),
  518.         'scaleline' => array
  519.         (
  520.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['scaleline'],
  521.             'exclude'                 => true,
  522.             'default'                 => false,
  523.             'inputType'               => 'checkbox',
  524.             'sql'                     => "char(1) NOT NULL default ''"
  525.         ),
  526.         'mouseposition' => array
  527.         (
  528.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['mouseposition'],
  529.             'exclude'                 => true,
  530.             'default'                 => false,
  531.             'inputType'               => 'checkbox',
  532.             'sql'                     => "char(1) NOT NULL default ''"
  533.         ),
  534.         'permalink' => array
  535.         (
  536.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['permalink'],
  537.             'exclude'                 => true,
  538.             'default'                 => false,
  539.             'inputType'               => 'checkbox',
  540.             'eval'                    => array('submitOnChange' => true),
  541.             'sql'                     => "char(1) NOT NULL default ''"
  542.         ),
  543.         'permalink_get_param' => array
  544.         (
  545.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['permalink_get_param'],
  546.             'exclude'                 => true,
  547.             'inputType'               => 'text',
  548.             'eval'                    => array('maxlength'=>50),
  549.             'sql'                     => "varchar(50) NOT NULL default ''"
  550.         ),
  551.         'zoomlevel' => array
  552.         (
  553.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['zoomlevel'],
  554.             'exclude'                 => true,
  555.             'default'                 => false,
  556.             'inputType'               => 'checkbox',
  557.             'sql'                     => "char(1) NOT NULL default ''"
  558.         ),
  559.         'geosearch' => array
  560.         (
  561.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['geosearch'],
  562.             'exclude'                 => true,
  563.             'default'                 => '',
  564.             'inputType'               => 'checkbox',
  565.             'eval'                    => array('submitOnChange' => true),
  566.             'sql'                     => "char(1) NOT NULL default ''"
  567.         ),
  568.         'geosearch_engine' => array
  569.         (
  570.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['geosearch_engine'],
  571.             'exclude'                 => true,
  572.             'default'                 => '1',
  573.             'inputType'               => 'radio',
  574.             'options'                 => array('4','1','2','3'),
  575.             'eval'                    => array('submitOnChange' => true,'includeBlankOption' => false ),
  576.             'reference'               => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['references_geosearch_engine'],
  577.             'sql'                     => "char(1) NOT NULL default '1'"
  578.         ),
  579.         'geosearch_show' => array
  580.         (
  581.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['geosearch_show'],
  582.             'exclude'                 => true,
  583.             'default'                 => true,
  584.             'inputType'               => 'checkbox',
  585.             'sql'                     => "char(1) NOT NULL default '1'"
  586.         ),
  587.         'geosearch_results' => array
  588.         (
  589.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['geosearch_results'],
  590.             'exclude'                 => true,
  591.             'default'                 => false,
  592.             'inputType'               => 'checkbox',
  593.             'sql'                     => "char(1) NOT NULL default '0'"
  594.         ),
  595.         'geosearch_customengine_url' => array
  596.         (
  597.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['geosearch_customengine_url'],
  598.             'exclude'                 => true,
  599.             'inputType'               => 'text',
  600.             'sql'                     => "varchar(255) NOT NULL default ''"
  601.         ),
  602.         'geosearch_customengine_attribution' => array
  603.         (
  604.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['geosearch_customengine_attribution'],
  605.             'exclude'                 => true,
  606.             'inputType'               => 'text',
  607.             'sql'                     => "varchar(255) NOT NULL default ''"
  608.         ),
  609.         'geosearch_key' => array
  610.         (
  611.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['geosearch_key'],
  612.             'exclude'                 => true,
  613.             'inputType'               => 'text',
  614.             'eval'                    => array('maxlength'=>254),
  615.             'sql'                     => "varchar(255) NOT NULL default ''"
  616.         ),
  617.         'geosearch_div' => array
  618.         (
  619.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['geosearch_div'],
  620.             'exclude'                 => true,
  621.             'inputType'               => 'text',
  622.             'eval'                    => array('maxlength'=>30),
  623.             'sql'                     => "varchar(30) NOT NULL default ''"
  624.         ),
  625.         'geosearch_zoomto' => array
  626.         (
  627.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['geosearch_zoomto'],
  628.             'exclude'                 => true,
  629.             'inputType'               => 'text',
  630.             'default'                 => '18',
  631.             'eval'                    => array('rgxp'=>'digit'),
  632.             'sql'                     => "int(10) unsigned NOT NULL default '18'"
  633.         ),
  634.         'geosearch_zoombounds' => array
  635.         (
  636.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['geosearch_zoombounds'],
  637.             'exclude'                 => true,
  638.             'default'                 => true,
  639.             'inputType'               => 'checkbox',
  640.             'sql'                     => "char(1) NOT NULL default '1'"
  641.         ),
  642.         'geosearch_animate' => array
  643.         (
  644.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['geosearch_animate'],
  645.             'exclude'                 => true,
  646.             'default'                 => true,
  647.             'inputType'               => 'checkbox',
  648.             'sql'                     => "char(1) NOT NULL default '1'"
  649.         ),
  650.         'geosearch_markresult' => array
  651.         (
  652.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['geosearch_markresult'],
  653.             'exclude'                 => true,
  654.             'default'                 => true,
  655.             'inputType'               => 'checkbox',
  656.             'sql'                     => "char(1) NOT NULL default '1'"
  657.         ),
  658.         'geosearch_popup' => array
  659.         (
  660.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['geosearch_popup'],
  661.             'exclude'                 => true,
  662.             'default'                 => false,
  663.             'inputType'               => 'checkbox',
  664.             'sql'                     => "char(1) NOT NULL default '0'"
  665.         ),
  666.         'geosearch_attribution' => array
  667.         (
  668.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['geosearch_attribution'],
  669.             'exclude'                 => true,
  670.             'default'                 => true,
  671.             'inputType'               => 'checkbox',
  672.             'sql'                     => "char(1) NOT NULL default '1'"
  673.         ),
  674.         'geosearch_collapsed' => array
  675.         (
  676.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['geosearch_collapsed'],
  677.             'exclude'                 => true,
  678.             'default'                 => true,
  679.             'inputType'               => 'checkbox',
  680.             'sql'                     => "char(1) NOT NULL default '1'"
  681.         ),
  682.         'geopicker' => array
  683.         (
  684.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['geopicker'],
  685.             'exclude'                 => true,
  686.             'default'                 => '',
  687.             'inputType'               => 'checkbox',
  688.             'eval'                    => array('submitOnChange' => true),
  689.             'sql'                     => "char(1) NOT NULL default ''"
  690.         ),
  691.         'geopicker_fieldx' => array
  692.         (
  693.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['geopicker_fieldx'],
  694.             'default'                 => 'c4g_brick_geopicker_geox',
  695.             'exclude'                 => true,
  696.             'inputType'               => 'text',
  697.             'eval'                    => array('maxlength'=>30'mandatory'=>false),
  698.             'sql'                     => "varchar(30) NOT NULL default 'c4g_brick_geopicker_geoy'"
  699.         ),
  700.         'geopicker_fieldy' => array
  701.         (
  702.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['geopicker_fieldy'],
  703.             'default'                 => 'c4g_brick_geopicker_geoy',
  704.             'exclude'                 => true,
  705.             'inputType'               => 'text',
  706.             'eval'                    => array('maxlength'=>30'mandatory'=>false),
  707.             'sql'                     => "varchar(30) NOT NULL default 'c4g_brick_geopicker_geoy'"
  708.         ),
  709.         'geopicker_searchdiv' => array
  710.         (
  711.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['geopicker_searchdiv'],
  712.             'default'                 => 'c4g_brick_geopicker',
  713.             'exclude'                 => true,
  714.             'inputType'               => 'text',
  715.             'eval'                    => array('maxlength'=>30'mandatory'=>false),
  716.             'sql'                     => "varchar(30) NOT NULL default 'c4g_brick_geopicker'"
  717.         ),
  718.         'geopicker_attribution' => array
  719.         (
  720.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['geopicker_attribution'],
  721.             'exclude'                 => true,
  722.             'default'                 => true,
  723.             'inputType'               => 'checkbox',
  724.             'sql'                     => "char(1) NOT NULL default '1'"
  725.         ),
  726.         'geopicker_disabled' => array
  727.         (
  728.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['geopicker_disabled'],
  729.             'exclude'                 => true,
  730.             'default'                 => '',
  731.             'inputType'               => 'checkbox',
  732.             'eval'                    => array('submitOnChange' => false),
  733.             'sql'                     => "char(1) NOT NULL default ''"
  734.         ),
  735.         'geopicker_anonymous' => array
  736.         (
  737.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['geopicker_anonymous'],
  738.             'exclude'                 => true,
  739.             'default'                 => '',
  740.             'inputType'               => 'checkbox',
  741.             'eval'                    => array('submitOnChange' => false),
  742.             'sql'                     => "char(1) NOT NULL default ''"
  743.         ),
  744.         'router' => array
  745.         (
  746.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['router'],
  747.             'exclude'                 => true,
  748.             'default'                 => '',
  749.             'inputType'               => 'checkbox',
  750.             'eval'                    => array('submitOnChange' => true'tl_class'=>'clr'),
  751.             'sql'                     => "char(1) NOT NULL default ''"
  752.         ),
  753.         'router_viaroute_url' => array
  754.         (
  755.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['router_viaroute_url'],
  756.             'exclude'                 => true,
  757.             'inputType'               => 'text',
  758.             'eval'                    => array('rgxp'=>'url''decodeEntities'=>true'maxlength'=>255'tl_class'=>'long'),
  759.             'sql'                     => "varchar(255) NOT NULL default ''"
  760.         ),
  761.         'router_attribution' => array
  762.         (
  763.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['router_attribution'],
  764.             'filter'                  => false,
  765.             'inputType'               => 'text',
  766.             'eval'                    => array('maxlength'=>255'tl_class'=>'long''allowHtml' => true),
  767.             'sql'                     => "varchar(255) NOT NULL default ''"
  768.         ),
  769.         'libsource' => array
  770.         (
  771.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['libsource'],
  772.             'exclude'                 => true,
  773.             'inputType'               => 'select',
  774.             'default'                 => 'DEFAULT',
  775.             'options_callback'        => array('tl_c4g_map_profiles','getOlSources'),
  776.             'eval'                    => array('submitOnChange' => true'tl_class' => 'long'),
  777.             'sql'                     => "varchar(10) NOT NULL default 'DEFAULT'"
  778.         ),
  779.         'overpass_url' => array
  780.         (
  781.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['overpass_url'],
  782.             'exclude'                 => true,
  783.             'inputType'               => 'text',
  784.             'eval'                    => array('rgxp'=>'url''decodeEntities'=>true'maxlength'=>255'tl_class'=>'long'),
  785.             'sql'                     => "varchar(255) NOT NULL default ''"
  786.         ),
  787.         'custom_div' => array
  788.         (
  789.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['custom_div'],
  790.             'default'                 => 'c4g_brick_map',
  791.             'exclude'                 => true,
  792.             'inputType'               => 'text',
  793.             'eval'                    => array('maxlength'=>30),
  794.             'sql'                     => "varchar(30) NOT NULL default 'c4g_brick_map'"
  795.         ),
  796.         'infopage' => array
  797.         (
  798.             'label'                    => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['infopage'],
  799.             'search'                => true,
  800.             'inputType'                => 'textarea',
  801.             'eval'                  => array('mandatory'=>false'rte'=>'tinyMCE''helpwizard'=>true),
  802.             'explanation'           => 'insertTags',
  803.             'sql'                   => "text NULL"
  804.         ),
  805.         'link_newwindow' => array
  806.         (
  807.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['link_newwindow'],
  808.             'exclude'                 => true,
  809.             'default'                 => '',
  810.             'inputType'               => 'checkbox',
  811.             'sql'                     => "char(1) NOT NULL default ''"
  812.         ),
  813.         'link_open_on' => array
  814.         (
  815.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['link_open_on'],
  816.             'exclude'                 => true,
  817.             'default'                 => 'CLICK',
  818.             'inputType'               => 'radio',
  819.             'options'                 => array('CLICK','DBLCL'),
  820.             'reference'               => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['references'],
  821.             'sql'                     => "char(5) NOT NULL default 'CLICK'"
  822.         ),
  823.         'hover_popups' => array
  824.         (
  825.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['hover_popups'],
  826.             'exclude'                 => true,
  827.             'default'                 => '',
  828.             'inputType'               => 'checkbox',
  829.             'eval'                    => array('submitOnChange' => true),
  830.             'sql'                     => "char(1) NOT NULL default ''"
  831.         ),
  832.         'hover_popups_stay' => array
  833.         (
  834.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['hover_popups_stay'],
  835.             'exclude'                 => true,
  836.             'default'                 => false,
  837.             'inputType'               => 'checkbox',
  838.             'sql'                     => "char(1) NOT NULL default ''"
  839.         ),
  840.         'editor_styles_point' => array
  841.         (
  842.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['editor_styles_point'],
  843.             'exclude'                 => true,
  844.             'inputType'               => 'checkbox',
  845.             'options_callback'        => array('tl_c4g_map_profiles','getAllLocStyles'),
  846.             'eval'                    => array('mandatory'=>false'multiple'=>true),
  847.             'sql'                     => "blob NULL"
  848.         ),
  849.         'editor_styles_line' => array
  850.         (
  851.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['editor_styles_line'],
  852.             'exclude'                 => true,
  853.             'inputType'               => 'checkbox',
  854.             'options_callback'        => array('tl_c4g_map_profiles','getAllLocStyles'),
  855.             'eval'                    => array('mandatory'=>false'multiple'=>true),
  856.             'sql'                     => "blob NULL"
  857.         ),
  858.         'editor_styles_polygon' => array
  859.         (
  860.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['editor_styles_polygon'],
  861.             'exclude'                 => true,
  862.             'inputType'               => 'checkbox',
  863.             'options_callback'        => array('tl_c4g_map_profiles','getAllLocStyles'),
  864.             'eval'                    => array('mandatory'=>false'multiple'=>true),
  865.             'sql'                     => "blob NULL"
  866.         ),
  867.         'editor_styles_circle' => array
  868.         (
  869.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['editor_styles_circle'],
  870.             'exclude'                 => true,
  871.             'inputType'               => 'checkbox',
  872.             'options_callback'        => array('tl_c4g_map_profiles','getAllLocStyles'),
  873.             'eval'                    => array('mandatory'=>false'multiple'=>true),
  874.             'sql'                     => "blob NULL"
  875.         ),
  876.         'editor_styles_freehand' => array
  877.         (
  878.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['editor_styles_freehand'],
  879.             'exclude'                 => true,
  880.             'inputType'               => 'checkbox',
  881.             'options_callback'        => array('tl_c4g_map_profiles','getAllLocStyles'),
  882.             'eval'                    => array('mandatory'=>false'multiple'=>true),
  883.             'sql'                     => "blob NULL"
  884.         ),
  885.         'editor_vars' => array
  886.         (
  887.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['editor_vars'],
  888.             'inputType'               => 'keyValueWizard',
  889.             'exclude'                 => true,
  890.             'sql'                     => "text NULL"
  891.         ),
  892.         'editor_show_items' => array
  893.         (
  894.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['editor_show_items'],
  895.             'exclude'                 => true,
  896.             'default'                 => false,
  897.             'inputType'               => 'checkbox',
  898.             'sql'                     => "char(1) NOT NULL default ''"
  899.         ),
  900.         'editor_helpurl' => array
  901.         (
  902.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['editor_helpurl'],
  903.             'exclude'                 => true,
  904.             'inputType'               => 'text',
  905.             'eval'                    => array('rgxp'=>'url''decodeEntities'=>true'maxlength'=>255'tl_class'=>'wizard'),
  906.             'wizard'                  => array(array('tl_c4g_map_profiles''pickUrl')),
  907.             'sql'                     => "varchar(255) NOT NULL default ''"
  908.         ),
  909.         'be_optimize_checkboxes_limit' => array
  910.         (
  911.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['be_optimize_checkboxes_limit'],
  912.             'exclude'                 => true,
  913.             'inputType'               => 'text',
  914.             'default'                 => '10',
  915.             'eval'                    => array('rgxp'=>'digit''submitOnChange' => true),
  916.             'sql'                     => "int(10) unsigned NOT NULL default '10'"
  917.         ),
  918.         'router_api_selection' => array
  919.         (
  920.             'label'                   => $GLOBALS['TL_LANG']['tl_c4g_map_profiles']['router_api_selection'],
  921.             'exclude'                 => true,
  922.             'inputType'               => 'select',
  923.             'default'                 => '1',
  924.             'options'                 => array('0','1'),
  925.             'reference'               => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['references_router_api_selection'],
  926.             'eval'                    => array('tl_class'=>'clr long'),
  927.             'sql'                     => "char(1) NOT NULL default '1'"
  928.         ),
  929.         'router_alternative'=> array
  930.         (
  931.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['router_alternative'],
  932.             'exclude'                 => true,
  933.             'default'                 => '',
  934.             'inputType'               => 'checkbox',
  935.             'eval'                    => array('submitOnChange' => true),
  936.             'sql'                     => "char(1) NOT NULL default ''"
  937.         ),
  938.         'router_from_locstyle' => array
  939.         (
  940.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['router_from_locstyle'],
  941.             'exclude'                 => true,
  942.             'inputType'               => 'select',
  943.             'options_callback'        => array('tl_c4g_map_profiles','getAllLocStyles'),
  944.             'eval'                    => array('tl_class'=>'clr w50'),
  945.             'wizard' => array
  946.             (
  947.                 array('tl_c4g_map_profiles''editLocationStyle')
  948.             ),
  949.             'sql'                     => "int(10) unsigned NOT NULL default '0'"
  950.         ),
  951.         'router_to_locstyle' => array
  952.         (
  953.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['router_to_locstyle'],
  954.             'exclude'                 => true,
  955.             'inputType'               => 'select',
  956.             'options_callback'        => array('tl_c4g_map_profiles','getAllLocStyles'),
  957.             'eval'                    => array('tl_class'=>'w50'),
  958.             'wizard' => array
  959.             (
  960.                 array('tl_c4g_map_profiles''editLocationStyle')
  961.             ),
  962.             'sql'                     => "int(10) unsigned NOT NULL default '0'"
  963.         ),
  964.         'router_point_locstyle' => array
  965.         (
  966.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['router_point_locstyle'],
  967.             'exclude'                 => true,
  968.             'inputType'               => 'select',
  969.             'options_callback'        => array('tl_c4g_map_profiles','getAllLocStyles'),
  970.             'eval'                    => array('tl_class'=>'w50'),
  971.             'wizard' => array
  972.             (
  973.                 array('tl_c4g_map_profiles''editLocationStyle')
  974.             ),
  975.             'sql'                     => "int(10) unsigned NOT NULL default '0'"
  976.         ),
  977.         'router_interim_locstyle' => array
  978.         (
  979.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['router_interim_locstyle'],
  980.             'exclude'                 => true,
  981.             'inputType'               => 'select',
  982.             'options_callback'        => array('tl_c4g_map_profiles','getAllLocStyles'),
  983.             'eval'                    => array('tl_class'=>'w50'),
  984.             'wizard' => array
  985.             (
  986.                 array('tl_c4g_map_profiles''editLocationStyle')
  987.             ),
  988.             'sql'                     => "int(10) unsigned NOT NULL default '0'"
  989.         ),
  990.         'cesium' => array
  991.         (
  992.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['cesium'],
  993.             'exclude'                 => true,
  994.             'default'                 => '',
  995.             'inputType'               => 'checkbox',
  996.             'eval'                    => array('submitOnChange' => true),
  997.             'sql'                     => "char(1) NOT NULL default ''"
  998.         ),
  999.         'cesium_always' => array
  1000.         (
  1001.             'label'                   => &$GLOBALS['TL_LANG']['tl_c4g_map_profiles']['cesium_always'],
  1002.             'exclude'                 => true,
  1003.             'default'                 => '',
  1004.             'inputType'               => 'checkbox',
  1005.             'eval'                    => array(),
  1006.             'sql'                     => "char(1) NOT NULL default ''"
  1007.         ),
  1008.     )
  1009. );
  1010. /**
  1011.  * Class tl_c4g_map_profiles
  1012.  */
  1013. class tl_c4g_map_profiles extends Backend
  1014. {
  1015.     public function set_default($varValueDataContainer $dc)
  1016.     {
  1017.         if ($varValue) {
  1018.             $this->Database->query('UPDATE tl_c4g_map_profiles SET is_default="" WHERE id <> '.$dc->id);
  1019.         }
  1020.         return $varValue;
  1021.     }
  1022. //
  1023. //    public function set_backend_default($varValue, DataContainer $dc)
  1024. //    {
  1025. //        if ($varValue) {
  1026. //            $this->Database->query('UPDATE tl_c4g_map_profiles SET is_backend_editor_default="" WHERE id <> '.$dc->id);
  1027. //        }
  1028. //        return $varValue;
  1029. //    }
  1030.     /**
  1031.      * Return all available OpenLayers Libraries
  1032.      * @param object
  1033.      * @return array
  1034.      */
  1035.     public function getOlSources(DataContainer $dc)
  1036.     {
  1037.         $return = array();
  1038.         foreach ($GLOBALS['con4gis']['maps']['js_openlayers'] as $key=>$lib) {
  1039.             $return[$key] = $lib;
  1040.         }
  1041.         return $return;
  1042.     }
  1043.     /**
  1044.      * Return all Location Styles as array
  1045.      * @param object
  1046.      * @return array
  1047.      */
  1048.     public function getAllLocStyles(DataContainer $dc)
  1049.     {
  1050.         $locStyles $this->Database->prepare("SELECT id,name FROM tl_c4g_map_locstyles ORDER BY name")
  1051.             ->execute();
  1052.         while ($locStyles->next()) {
  1053.             $return[$locStyles->id] = $locStyles->name;
  1054.         }
  1055.         return $return;
  1056.     }
  1057.     /**
  1058.      * Return all Base Layers as array
  1059.      * @param object
  1060.      * @return array
  1061.      */
  1062.     public function getAllBaseLayers(DataContainer $dc)
  1063.     {
  1064.         $baseLayers $this->Database->prepare("SELECT id,name FROM tl_c4g_map_baselayers ORDER BY name")
  1065.             ->execute();
  1066.         while ($baseLayers->next()) {
  1067.             $return[$baseLayers->id] = $baseLayers->name;
  1068.         }
  1069.         return $return;
  1070.     }
  1071.     /**
  1072.      * Update the palette information that depend on other values
  1073.      */
  1074.     public function updateDCA(DataContainer $dc)
  1075.     {
  1076.         if (!$dc->id) {
  1077.             return;
  1078.         }
  1079.         $objProfile $this->Database->prepare("SELECT zoom_panel, geosearch_engine, be_optimize_checkboxes_limit FROM tl_c4g_map_profiles WHERE id=?")
  1080.         ->limit(1)
  1081.         ->execute($dc->id);
  1082.         if ($objProfile->numRows 0) {
  1083.             // if ($objProfile->zoom_panel == '1') {
  1084.             //     $GLOBALS['TL_DCA']['tl_c4g_map_profiles']['palettes']['default'] =
  1085.             //         str_replace(',zoom_panel,',',zoom_panel,zoom_panel_world,',
  1086.             //             $GLOBALS['TL_DCA']['tl_c4g_map_profiles']['palettes']['default']);
  1087.             // }
  1088.             if ($objProfile->geosearch_engine == '2') {
  1089.                 $GLOBALS['TL_DCA']['tl_c4g_map_profiles']['subpalettes']['geosearch'] =
  1090.                     str_replace(',geosearch_div,',',geosearch_key,geosearch_div,',
  1091.                         $GLOBALS['TL_DCA']['tl_c4g_map_profiles']['subpalettes']['geosearch']);
  1092.                 // make key-field mandatory
  1093.                 $GLOBALS['TL_DCA']['tl_c4g_map_profiles']['fields']['geosearch_key']['eval']['mandatory'] = true;
  1094.             } elseif ($objProfile->geosearch_engine == '3') {
  1095.                 $GLOBALS['TL_DCA']['tl_c4g_map_profiles']['subpalettes']['geosearch'] =
  1096.                     str_replace(',geosearch_div,',',geosearch_customengine_url,geosearch_customengine_attribution,geosearch_key,geosearch_div,',
  1097.                         $GLOBALS['TL_DCA']['tl_c4g_map_profiles']['subpalettes']['geosearch']);
  1098.             } elseif ($objProfile->geosearch_engine == '4') {
  1099.                 $GLOBALS['TL_DCA']['tl_c4g_map_profiles']['subpalettes']['geosearch'] =
  1100.                     str_replace(',geosearch_div,',',geosearch_key,geosearch_div,',
  1101.                         $GLOBALS['TL_DCA']['tl_c4g_map_profiles']['subpalettes']['geosearch']);
  1102.             }
  1103.             // convert checkboxes to chosenfields, if there are to many locationstyles
  1104.             if (intval($objProfile->be_optimize_checkboxes_limit) > 0) {
  1105.                 // basemap-options
  1106.                 $objLocCount $this->Database->prepare("SELECT COUNT(id) AS entry_count FROM tl_c4g_map_baselayers")->execute();
  1107.                 if ($objLocCount->numRows 0) {
  1108.                     if (intval($objLocCount->entry_count) >= intval($objProfile->be_optimize_checkboxes_limit)) {
  1109.                         $GLOBALS['TL_DCA']['tl_c4g_map_profiles']['fields']['baselayers']['inputType'] = 'select';
  1110.                         $GLOBALS['TL_DCA']['tl_c4g_map_profiles']['fields']['baselayers']['eval']['chosen'] = true;
  1111.                     }
  1112.                 }
  1113.                 // locationstyle-options
  1114.                 $objLocCount $this->Database->prepare("SELECT COUNT(id) AS entry_count FROM tl_c4g_map_locstyles")->execute();
  1115.                 if ($objLocCount->numRows 0) {
  1116.                     if (intval($objLocCount->entry_count) >= intval($objProfile->be_optimize_checkboxes_limit)) {
  1117.                         $GLOBALS['TL_DCA']['tl_c4g_map_profiles']['fields']['locstyles']['inputType'] = 'select';
  1118.                         $GLOBALS['TL_DCA']['tl_c4g_map_profiles']['fields']['locstyles']['eval']['chosen'] = true;
  1119.                         $GLOBALS['TL_DCA']['tl_c4g_map_profiles']['fields']['editor_styles_point']['inputType'] = 'select';
  1120.                         $GLOBALS['TL_DCA']['tl_c4g_map_profiles']['fields']['editor_styles_point']['eval']['chosen'] = true;
  1121.                         $GLOBALS['TL_DCA']['tl_c4g_map_profiles']['fields']['editor_styles_line']['inputType'] = 'select';
  1122.                         $GLOBALS['TL_DCA']['tl_c4g_map_profiles']['fields']['editor_styles_line']['eval']['chosen'] = true;
  1123.                         $GLOBALS['TL_DCA']['tl_c4g_map_profiles']['fields']['editor_styles_polygon']['inputType'] = 'select';
  1124.                         $GLOBALS['TL_DCA']['tl_c4g_map_profiles']['fields']['editor_styles_polygon']['eval']['chosen'] = true;
  1125.                         $GLOBALS['TL_DCA']['tl_c4g_map_profiles']['fields']['editor_styles_circle']['inputType'] = 'select';
  1126.                         $GLOBALS['TL_DCA']['tl_c4g_map_profiles']['fields']['editor_styles_circle']['eval']['chosen'] = true;
  1127.                         $GLOBALS['TL_DCA']['tl_c4g_map_profiles']['fields']['editor_styles_freehand']['inputType'] = 'select';
  1128.                         $GLOBALS['TL_DCA']['tl_c4g_map_profiles']['fields']['editor_styles_freehand']['eval']['chosen'] = true;
  1129.                     }
  1130.                 }
  1131.             }
  1132.         }
  1133.     }
  1134.     /**
  1135.      * Return the page pick wizard for the editor_helpurl
  1136.      * @param DataContainer $dc
  1137.      */
  1138.     public function pickUrl(DataContainer $dc)
  1139.     {
  1140.         return ' <a href="contao/page.php?do='.Input::get('do').'&amp;table='.$dc->table.'&amp;field='.$dc->field.'&amp;value='.str_replace(array('{{link_url::''}}'), ''$dc->value).'" title="'.specialchars($GLOBALS['TL_LANG']['MSC']['pagepicker']).'" onclick="Backend.getScrollOffset();Backend.openModalSelector({\'width\':765,\'title\':\''.specialchars(str_replace("'""\\'"$GLOBALS['TL_LANG']['MOD']['page'][0])).'\',\'url\':this.href,\'id\':\''.$dc->field.'\',\'tag\':\'ctrl_'.$dc->field . ((Input::get('act') == 'editAll') ? '_' $dc->id '').'\',\'self\':this});return false">' $this->generateImage('pickpage.gif'$GLOBALS['TL_LANG']['MSC']['pagepicker'], 'style="vertical-align:top;cursor:pointer"') . '</a>';
  1141.     }
  1142.     /**
  1143.         * Return the edit location style wizard
  1144.         * @param \DataContainer
  1145.         * @return string
  1146.         */
  1147.        public function editLocationStyle(DataContainer $dc)
  1148.        {
  1149.            return ($dc->value 1) ? '' ' <a href="contao/main.php?do=c4g_map_locstyles&amp;act=edit&amp;id=' $dc->value '&amp;popup=1&amp;nb=1&amp;rt=' REQUEST_TOKEN '" title="' sprintf(specialchars($GLOBALS['TL_LANG']['tl_c4g_maps']['editalias'][1]), $dc->value) . '" style="padding-left:3px" onclick="Backend.openModalIframe({\'width\':768,\'title\':\'' specialchars(str_replace("'""\\'"sprintf($GLOBALS['TL_LANG']['tl_c4g_maps']['editalias'][1], $dc->value))) . '\',\'url\':this.href});return false">' Image::getHtml('alias.gif'$GLOBALS['TL_LANG']['tl_c4g_maps']['editalias'][0], 'style="vertical-align:top"') . '</a>';
  1150.        }
  1151.     /**
  1152.      * Return all themes as array
  1153.      * @return array
  1154.      */
  1155.     public function getAllThemes()
  1156.     {
  1157.         $return = array();
  1158.         $themes $this->Database->prepare("SELECT id,name FROM tl_c4g_map_themes ORDER BY name")
  1159.             ->execute();
  1160.         while ($themes->next()) {
  1161.             $return[$themes->id] = $themes->name;
  1162.         }
  1163.         return $return;
  1164.     }
  1165. }