You are here

function getlocations_leaflet_defaults in Get Locations 7

Same name and namespace in other branches
  1. 7.2 modules/getlocations_leaflet/getlocations_leaflet.module \getlocations_leaflet_defaults()

Function

Return value

Returns

6 calls to getlocations_leaflet_defaults()
getlocations_leaflet_entity_type_map in modules/getlocations_leaflet/getlocations_leaflet.module
Function
getlocations_leaflet_map_formatter_defaults in modules/getlocations_leaflet/getlocations_leaflet.module
Function
getlocations_leaflet_plugin_style::option_definition in modules/getlocations_leaflet/views/getlocations_leaflet_plugin_style.inc
Information about options for all kinds of purposes will be held here.
getlocations_leaflet_settings_form in modules/getlocations_leaflet/getlocations_leaflet.module
Function
getlocations_tools_export_form in modules/getlocations_tools/getlocations_tools.module

... See full list

1 string reference to 'getlocations_leaflet_defaults'
getlocations_tools_import_form_submit in modules/getlocations_tools/getlocations_tools.module

File

modules/getlocations_leaflet/getlocations_leaflet.module, line 2124
getlocations_leaflet.module @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL

Code

function getlocations_leaflet_defaults() {
  $getlocations_defaults = getlocations_defaults();
  $newdefaults = array(
    'width' => $getlocations_defaults['width'],
    'height' => $getlocations_defaults['height'],
    'zoom' => $getlocations_defaults['zoom'],
    'minzoom_map' => $getlocations_defaults['minzoom_map'],
    'maxzoom_map' => $getlocations_defaults['maxzoom_map'],
    'latlong' => $getlocations_defaults['latlong'],
    'nodezoom' => $getlocations_defaults['nodezoom'],
    'polygons_enable' => $getlocations_defaults['polygons_enable'],
    'polygons_strokecolor' => $getlocations_defaults['polygons_strokecolor'],
    'polygons_strokeopacity' => $getlocations_defaults['polygons_strokeopacity'],
    'polygons_strokeweight' => $getlocations_defaults['polygons_strokeweight'],
    'polygons_fillcolor' => $getlocations_defaults['polygons_fillcolor'],
    'polygons_fillopacity' => $getlocations_defaults['polygons_fillopacity'],
    'polygons_coords' => $getlocations_defaults['polygons_coords'],
    'polygons_clickable' => $getlocations_defaults['polygons_clickable'],
    'polygons_message' => $getlocations_defaults['polygons_message'],
    'rectangles_enable' => $getlocations_defaults['rectangles_enable'],
    'rectangles_strokecolor' => $getlocations_defaults['rectangles_strokecolor'],
    'rectangles_strokeopacity' => $getlocations_defaults['rectangles_strokeopacity'],
    'rectangles_strokeweight' => $getlocations_defaults['rectangles_strokeweight'],
    'rectangles_fillcolor' => $getlocations_defaults['rectangles_fillcolor'],
    'rectangles_fillopacity' => $getlocations_defaults['rectangles_fillopacity'],
    'rectangles_coords' => $getlocations_defaults['rectangles_coords'],
    'rectangles_clickable' => $getlocations_defaults['rectangles_clickable'],
    'rectangles_message' => $getlocations_defaults['rectangles_message'],
    'rectangles_apply' => $getlocations_defaults['rectangles_apply'],
    'rectangles_dist' => $getlocations_defaults['rectangles_dist'],
    'circles_enable' => $getlocations_defaults['circles_enable'],
    'circles_strokecolor' => $getlocations_defaults['circles_strokecolor'],
    'circles_strokeopacity' => $getlocations_defaults['circles_strokeopacity'],
    'circles_strokeweight' => $getlocations_defaults['circles_strokeweight'],
    'circles_fillcolor' => $getlocations_defaults['circles_fillcolor'],
    'circles_fillopacity' => $getlocations_defaults['circles_fillopacity'],
    'circles_coords' => $getlocations_defaults['circles_coords'],
    'circles_clickable' => $getlocations_defaults['circles_clickable'],
    'circles_message' => $getlocations_defaults['circles_message'],
    'circles_radius' => $getlocations_defaults['circles_radius'],
    'circles_apply' => $getlocations_defaults['circles_apply'],
    'polylines_enable' => $getlocations_defaults['polylines_enable'],
    'polylines_strokecolor' => $getlocations_defaults['polylines_strokecolor'],
    'polylines_strokeopacity' => $getlocations_defaults['polylines_strokeopacity'],
    'polylines_strokeweight' => $getlocations_defaults['polylines_strokeweight'],
    'polylines_coords' => $getlocations_defaults['polylines_coords'],
    'polylines_clickable' => $getlocations_defaults['polylines_clickable'],
    'polylines_message' => $getlocations_defaults['polylines_message'],
    // categories
    'category_method' => $getlocations_defaults['category_method'],
    'category_term_reference_field' => $getlocations_defaults['category_term_reference_field'],
    'category_showhide_buttons' => $getlocations_defaults['category_showhide_buttons'],
    'categories' => $getlocations_defaults['categories'],
    'returnlink_page_enable' => $getlocations_defaults['returnlink_page_enable'],
    'returnlink_page_link' => $getlocations_defaults['returnlink_page_link'],
    'returnlink_user_enable' => $getlocations_defaults['returnlink_user_enable'],
    'returnlink_user_link' => $getlocations_defaults['returnlink_user_link'],
    'returnlink_term_enable' => $getlocations_defaults['returnlink_term_enable'],
    'returnlink_term_link' => $getlocations_defaults['returnlink_term_link'],
    'returnlink_comment_enable' => $getlocations_defaults['returnlink_comment_enable'],
    'returnlink_comment_link' => $getlocations_defaults['returnlink_comment_link'],
    'geojson_enable' => $getlocations_defaults['geojson_enable'],
    'geojson_data' => $getlocations_defaults['geojson_data'],
    'geojson_options' => $getlocations_defaults['geojson_options'],
    'fullscreen' => $getlocations_defaults['fullscreen'],
    'node_map_marker' => $getlocations_defaults['node_map_marker'],
    'user_map_marker' => $getlocations_defaults['user_map_marker'],
    'vocabulary_map_marker' => $getlocations_defaults['vocabulary_map_marker'],
    'term_map_marker' => $getlocations_defaults['term_map_marker'],
    'comment_map_marker' => $getlocations_defaults['comment_map_marker'],
    'dragging' => $getlocations_defaults['draggable'],
    'scrollWheelZoom' => $getlocations_defaults['scrollwheel'],
    'doubleClickZoom' => $getlocations_defaults['nodoubleclickzoom'] ? 0 : 1,
    'zoomControl' => $getlocations_defaults['controltype'] == 'none' ? 0 : 1,
    'scaleControl' => $getlocations_defaults['scale'],
    'jquery_colorpicker_enabled' => $getlocations_defaults['jquery_colorpicker_enabled'],
    'getdirections_link' => $getlocations_defaults['getdirections_link'],
    'show_maplinks' => $getlocations_defaults['show_maplinks'],
    'show_maplinks_viewport' => $getlocations_defaults['show_maplinks_viewport'],
    'show_search_distance' => $getlocations_defaults['show_search_distance'],
    'views_search_marker_enable' => $getlocations_defaults['views_search_marker_enable'],
    'views_search_marker' => $getlocations_defaults['views_search_marker'],
    'views_search_marker_toggle' => $getlocations_defaults['views_search_marker_toggle'],
    'views_search_marker_toggle_active' => $getlocations_defaults['views_search_marker_toggle_active'],
    'views_search_radshape_enable' => $getlocations_defaults['views_search_radshape_enable'],
    'views_search_radshape_strokecolor' => $getlocations_defaults['views_search_radshape_strokecolor'],
    'views_search_radshape_strokeopacity' => $getlocations_defaults['views_search_radshape_strokeopacity'],
    'views_search_radshape_strokeweight' => $getlocations_defaults['views_search_radshape_strokeweight'],
    'views_search_radshape_fillcolor' => $getlocations_defaults['views_search_radshape_fillcolor'],
    'views_search_radshape_fillopacity' => $getlocations_defaults['views_search_radshape_fillopacity'],
    'views_search_radshape_toggle' => $getlocations_defaults['views_search_radshape_toggle'],
    'views_search_radshape_toggle_active' => $getlocations_defaults['views_search_radshape_toggle_active'],
    'views_search_center' => $getlocations_defaults['views_search_center'],
    'geolocation_mobile_check' => $getlocations_defaults['geolocation_mobile_check'],
    'what3words_enable' => $getlocations_defaults['what3words_enable'],
    'what3words_search' => $getlocations_defaults['what3words_search'],
    'what3words_size' => $getlocations_defaults['what3words_size'],
    'what3words_map_marker' => $getlocations_defaults['what3words_map_marker'],
    'what3words_marker_show' => $getlocations_defaults['what3words_marker_show'],
    'what3words_center' => $getlocations_defaults['what3words_center'],
    'what3words_zoom' => $getlocations_defaults['what3words_zoom'],
    'what3words_show' => $getlocations_defaults['what3words_show'],
    'what3words_click' => $getlocations_defaults['what3words_click'],
    'what3words_path' => $getlocations_defaults['what3words_path'],
  );
  $newdefaults['touchZoom'] = 1;
  $newdefaults['boxZoom'] = 1;
  $newdefaults['tap'] = 1;
  $newdefaults['tapTolerance'] = 15;
  $newdefaults['bounceAtZoomLimits'] = 1;
  $newdefaults['attributionControl'] = 1;
  $newdefaults['trackResize'] = 1;
  $newdefaults['fadeAnimation'] = 1;
  $newdefaults['zoomAnimation'] = 1;
  $newdefaults['closePopupOnClick'] = 1;
  $newdefaults['layerControl'] = 0;
  $newdefaults['scalecontrolposition'] = '';
  $newdefaults['scalecontrolunits'] = '';
  $newdefaults['zoomcontrolposition'] = '';
  $newdefaults['attributioncontrolposition'] = '';
  $newdefaults['layercontrolposition'] = '';
  $newdefaults['layercontrol_mark_ov'] = 9;
  $newdefaults['layercontrol_mark_ov_label'] = t('Locations');
  $newdefaults['layercontrol_circ_ov'] = 9;
  $newdefaults['layercontrol_circ_ov_label'] = t('Circles');
  $newdefaults['layercontrol_polyl_ov'] = 9;
  $newdefaults['layercontrol_polyl_ov_label'] = t('Lines');
  $newdefaults['layercontrol_polyg_ov'] = 9;
  $newdefaults['layercontrol_polyg_ov_label'] = t('Polygons');
  $newdefaults['layercontrol_rect_ov'] = 9;
  $newdefaults['layercontrol_rect_ov_label'] = t('Rectangles');
  $newdefaults['fullscreenposition'] = '';
  $newdefaults['markeraction'] = '';
  $newdefaults['markercluster'] = 0;
  $newdefaults['graticule'] = 0;
  $newdefaults['graticule_color'] = '#333';
  $newdefaults['graticule_opacity'] = 1;
  $newdefaults['graticule_weight'] = 1;
  $newdefaults['graticule_interval'] = 20;
  $newdefaults['graticule_ov_label'] = t('Graticule');
  $newdefaults['graticule_show'] = 0;
  $newdefaults['graticule_position'] = '';
  $newdefaults['graticule_state'] = 1;
  $newdefaults['pancontrol'] = 0;
  $newdefaults['pancontrolposition'] = '';
  $newdefaults['zoomslider'] = 0;
  $newdefaults['zoomsliderposition'] = '';
  $newdefaults['mouseposition'] = 0;
  $newdefaults['mouseposition_position'] = '';
  $newdefaults['mouseposition_display_dms'] = 0;
  $newdefaults['minimap'] = 0;
  $newdefaults['geocoder'] = 0;
  $newdefaults['geocoderposition'] = '';
  $newdefaults['geocodersrc'] = 'n';

  // n = nominatim, b = bing, m = mapquest, x = mapbox, g = google
  $newdefaults['geocodercollapsed'] = 1;
  $newdefaults['geocoder_bing_key'] = '';

  // required for bing
  $newdefaults['geocoder_mapquest_key'] = '';

  // required for mapquest
  $newdefaults['geocoder_mapbox_key'] = '';

  // required for mapbox
  $apikey = variable_get('getlocations_api3_key', '');
  $newdefaults['geocoder_google_key'] = $apikey;

  // required for google
  $newdefaults['geocoder_errormessage'] = t("Nothing found.");
  $newdefaults['geocoder_placeholder'] = t("Search...");
  $newdefaults['awesome'] = 0;
  $newdefaults['awesome_icon'] = 'fa-home';
  $newdefaults['awesome_icon_color_selector'] = 'white';
  $newdefaults['awesome_icon_color'] = '';
  $newdefaults['awesome_icon_spin'] = '';
  $newdefaults['awesome_icon_pulse'] = '';
  $newdefaults['awesome_marker_color'] = 'blue';
  $newdefaults['awesome_icon_type'] = 'b';
  $newdefaults['awesome_icon_size'] = '';
  $newdefaults['awesome_icon_flip'] = '';
  $newdefaults['awesome_icon_html'] = '';
  $newdefaults['awesome_icon_class'] = 'getlocations-leaflet-div-icon';
  $newdefaults['node_marker_awesome_icon'] = '';
  $newdefaults['node_marker_awesome_icon_color_selector'] = '';
  $newdefaults['node_marker_awesome_icon_color'] = '';
  $newdefaults['node_marker_awesome_icon_spin'] = '';
  $newdefaults['node_marker_awesome_icon_pulse'] = '';
  $newdefaults['node_marker_awesome_marker_color'] = '';
  $newdefaults['node_marker_awesome_icon_type'] = 'b';
  $newdefaults['node_marker_awesome_icon_size'] = '';
  $newdefaults['node_marker_awesome_icon_flip'] = '';
  $newdefaults['node_marker_awesome_icon_html'] = '';
  $newdefaults['node_marker_awesome_icon_class'] = 'getlocations-leaflet-div-icon';
  $newdefaults['user_marker_awesome_icon'] = '';
  $newdefaults['user_marker_awesome_icon_color_selector'] = '';
  $newdefaults['user_marker_awesome_icon_color'] = '';
  $newdefaults['user_marker_awesome_icon_spin'] = '';
  $newdefaults['user_marker_awesome_icon_pulse'] = '';
  $newdefaults['user_marker_awesome_marker_color'] = '';
  $newdefaults['user_marker_awesome_icon_type'] = 'b';
  $newdefaults['user_marker_awesome_icon_size'] = '';
  $newdefaults['user_marker_awesome_icon_flip'] = '';
  $newdefaults['user_marker_awesome_icon_html'] = '';
  $newdefaults['user_marker_awesome_icon_class'] = 'getlocations-leaflet-div-icon';
  $newdefaults['term_marker_awesome_icon'] = '';
  $newdefaults['term_marker_awesome_icon_color_selector'] = '';
  $newdefaults['term_marker_awesome_icon_color'] = '';
  $newdefaults['term_marker_awesome_icon_spin'] = '';
  $newdefaults['term_marker_awesome_icon_pulse'] = '';
  $newdefaults['term_marker_awesome_marker_color'] = '';
  $newdefaults['term_marker_awesome_icon_type'] = 'b';
  $newdefaults['term_marker_awesome_icon_size'] = '';
  $newdefaults['term_marker_awesome_icon_flip'] = '';
  $newdefaults['term_marker_awesome_icon_html'] = '';
  $newdefaults['term_marker_awesome_icon_class'] = 'getlocations-leaflet-div-icon';
  $newdefaults['vocabulary_marker_awesome_icon'] = '';
  $newdefaults['vocabulary_marker_awesome_icon_color_selector'] = '';
  $newdefaults['vocabulary_marker_awesome_icon_color'] = '';
  $newdefaults['vocabulary_marker_awesome_icon_spin'] = '';
  $newdefaults['vocabulary_marker_awesome_icon_pulse'] = '';
  $newdefaults['vocabulary_marker_awesome_marker_color'] = '';
  $newdefaults['vocabulary_marker_awesome_icon_type'] = 'b';
  $newdefaults['vocabulary_marker_awesome_icon_size'] = '';
  $newdefaults['vocabulary_marker_awesome_icon_flip'] = '';
  $newdefaults['vocabulary_marker_awesome_icon_html'] = '';
  $newdefaults['vocabulary_marker_awesome_icon_class'] = 'getlocations-leaflet-div-icon';
  $newdefaults['comment_marker_awesome_icon'] = '';
  $newdefaults['comment_marker_awesome_icon_color_selector'] = '';
  $newdefaults['comment_marker_awesome_icon_color'] = '';
  $newdefaults['comment_marker_awesome_icon_spin'] = '';
  $newdefaults['comment_marker_awesome_icon_pulse'] = '';
  $newdefaults['comment_marker_awesome_marker_color'] = '';
  $newdefaults['comment_marker_awesome_icon_type'] = 'b';
  $newdefaults['comment_marker_awesome_icon_size'] = '';
  $newdefaults['comment_marker_awesome_icon_flip'] = '';
  $newdefaults['comment_marker_awesome_icon_html'] = '';
  $newdefaults['comment_marker_awesome_icon_class'] = 'getlocations-leaflet-div-icon';
  $newdefaults['marker_type'] = 'gg';

  // or 'fa'
  $newdefaults['default_baselayer'] = 'OpenStreetMap.Mapnik';
  $newdefaults['map_resize'] = 0;
  $newdefaults['fullscreen_disable'] = 0;
  $newdefaults['styles'] = '';

  // usermarker
  $newdefaults['usermarker'] = 0;
  $newdefaults['usermarker_pulsing'] = 0;
  $newdefaults['usermarker_smallicon'] = 0;
  $newdefaults['usermarker_accuracy'] = 0;
  $newdefaults['usermarker_circle_stroke'] = 1;
  $newdefaults['usermarker_circle_strokecolor'] = $getlocations_defaults['circles_strokecolor'];
  $newdefaults['usermarker_circle_strokeopacity'] = $getlocations_defaults['circles_strokeopacity'];
  $newdefaults['usermarker_circle_strokeweight'] = $getlocations_defaults['circles_strokeweight'];
  $newdefaults['usermarker_circle_fillcolor'] = $getlocations_defaults['circles_fillcolor'];
  $newdefaults['usermarker_circle_fillopacity'] = $getlocations_defaults['circles_fillopacity'];
  $newdefaults['usermarker_button_label'] = t('Show current position');

  // bouncemarker
  $newdefaults['bouncemarker'] = 0;
  $newdefaults['bouncemarker_duration'] = 1000;
  $newdefaults['bouncemarker_height'] = '';

  // magnifyingglass
  $newdefaults['magnifyingglass'] = 0;
  $newdefaults['magnifyingglasscontrolposition'] = '';
  $newdefaults['magnifyingglassradius'] = 100;
  $newdefaults['magnifyingglasszoomoffset'] = 3;
  $newdefaults['terminator'] = 0;
  $newdefaults['terminator_strokecolor'] = '#000000';
  $newdefaults['terminator_strokeopacity'] = '0.5';
  $newdefaults['terminator_strokeweight'] = '1';
  $newdefaults['terminator_fillcolor'] = '#000000';
  $newdefaults['terminator_fillopacity'] = '0.5';
  $newdefaults['terminator_position'] = '';
  $newdefaults['terminator_show'] = 0;
  $newdefaults['terminator_state'] = 1;
  $newdefaults['terminator_label'] = t('Day/Night');

  // custom content
  $newdefaults['custom_content_enable'] = 0;
  $newdefaults['custom_content_source'] = '';

  // mapquest
  $newdefaults['mapquest_traffic_flow'] = 1;
  $newdefaults['mapquest_traffic_flow_on'] = 0;
  $newdefaults['mapquest_traffic_incident'] = 1;
  $newdefaults['mapquest_traffic_incident_on'] = 0;
  $newdefaults['mapquest_maps_default'] = 'm';
  $newdefaults['mapquest_maps_maplayer'] = 1;
  $newdefaults['mapquest_maps_satellitelayer'] = 1;
  $newdefaults['mapquest_maps_hybridlayer'] = 1;
  $newdefaults['mapquest_maps_use'] = 1;

  // leaflet hash
  $newdefaults['hashurl'] = 0;
  $settings = variable_get('getlocations_leaflet_defaults', '');

  // mapquest
  if (isset($settings['geocoder_mapquest_key'])) {
    if (!empty($settings['geocoder_mapquest_key'])) {
      $mapquest_lic = variable_get('getlocations_mapquest_lic', array(
        'key' => '',
        'type' => 'l',
      ));
      if (empty($mapquest_lic['key'])) {
        $mapquest_lic['key'] = $settings['geocoder_mapquest_key'];
        variable_set('getlocations_mapquest_lic', $mapquest_lic);
      }
    }
    unset($settings['geocoder_mapquest_key']);
  }
  $newdefaults['baselayers'] = isset($settings['baselayers']) && !empty($settings['baselayers']) ? $settings['baselayers'] : array(
    'OpenStreetMap.Mapnik',
  );
  $settings = getlocations_adjust_vars($newdefaults, $settings);
  return $settings;
}