You are here

function getlocations_defaults in Get Locations 7

Same name and namespace in other branches
  1. 6.2 getlocations.module \getlocations_defaults()
  2. 6 getlocations.module \getlocations_defaults()
  3. 7.2 getlocations.module \getlocations_defaults()

Some defaults.

Return value

Returns the current settings

39 calls to getlocations_defaults()
getlocations_commentmap in ./getlocations.module
Page callback: Displays a map.
getlocations_fields_defaults in modules/getlocations_fields/getlocations_fields.module
getlocations_fields_field_formatter_info_defaults in modules/getlocations_fields/getlocations_fields.module
getlocations_fields_field_formatter_view in modules/getlocations_fields/getlocations_fields.module
Implements hook_field_formatter_view(). Build a renderable array for a field value.
getlocations_fields_field_info_defaults in modules/getlocations_fields/getlocations_fields.module

... See full list

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

File

./getlocations.module, line 1399
getlocations.module @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL

Code

function getlocations_defaults($reset = FALSE) {
  global $is_https;
  $module = getlocations_get_current_supported_module();
  $defaults = array(
    'api_version' => 3,
    'map_version' => '',
    'width' => '300px',
    'height' => '200px',
    'zoom' => 3,
    'minzoom_map' => -1,
    'maxzoom_map' => -1,
    'controltype' => 'small',
    'zoomcontrolposition' => '',
    'pancontrol' => 1,
    'pancontrolposition' => '',
    'mapcontrolposition' => '',
    'latlong' => '40,0',
    'maptype' => 'Map',
    'mtc' => 'standard',
    'scale' => 0,
    'overview' => 0,
    'overview_opened' => 0,
    'scrollwheel' => 0,
    'scalecontrolposition' => '',
    'sv_show' => 0,
    // Pegman
    'svcontrolposition' => '',
    'sv_showfirst' => 0,
    // Overlay
    'sv_heading' => 0,
    'sv_zoom' => 1,
    'sv_pitch' => 0,
    'sv_enable' => 0,
    // switch set in getlocations_fields, applies to Views
    'sv_addresscontrol' => 1,
    // sv overlay controls
    'sv_addresscontrolposition' => '',
    'sv_pancontrol' => 1,
    'sv_pancontrolposition' => '',
    'sv_zoomcontrol' => 'default',
    'sv_zoomcontrolposition' => '',
    'sv_linkscontrol' => 1,
    'sv_imagedatecontrol' => 0,
    'sv_scrollwheel' => 1,
    'sv_clicktogo' => 1,
    'trafficinfo' => 0,
    'trafficinfo_state' => 0,
    'bicycleinfo' => 0,
    'bicycleinfo_state' => 0,
    'transitinfo' => 0,
    'transitinfo_state' => 0,
    'places' => 0,
    'poi_show' => 1,
    'transit_show' => 1,
    'node_map_marker' => 'drupal',
    'user_map_marker' => 'drupal',
    'vocabulary_map_marker' => 'drupal',
    'term_map_marker' => 'drupal',
    'comment_map_marker' => 'drupal',
    'input_map_marker' => 'drupal',
    'markeraction' => 0,
    'markeractiontype' => 1,
    'markeraction_click_zoom' => -1,
    'markeraction_click_center' => 0,
    'minzoom' => 6,
    'maxzoom' => 16,
    'nodezoom' => 12,
    'markermanagertype' => 0,
    'usemarkermanager' => 0,
    'useclustermanager' => 0,
    'markerclusterer_style' => -1,
    'markerclusterer_zoom' => -1,
    'markerclusterer_size' => -1,
    'markerclusterer_minsize' => -1,
    'markerclusterer_title' => t('Click here to see more'),
    'markerclusterer_imgpath' => base_path() . GETLOCATIONS_PATH . '/js/images',
    'pansetting' => 2,
    'draggable' => 1,
    'styles' => '',
    'returnlink_page_enable' => 0,
    'returnlink_page_link' => t('Return to Page'),
    'returnlink_user_enable' => 0,
    'returnlink_user_link' => t('Return to User'),
    'returnlink_term_enable' => 0,
    'returnlink_term_link' => t('Return to Term'),
    'returnlink_comment_enable' => 0,
    'returnlink_comment_link' => t('Return to Comment'),
    'getlocations_js_weight' => 0,
    'custom_content_enable' => 0,
    'custom_content_source' => '',
    'use_jsapi' => 0,
    'preload_data' => 0,
    'is_mobile' => getlocations_is_mobile() ? 1 : 0,
    'geometry' => 0,
    'visualization' => 0,
    'drawing' => 0,
    'adsense' => 0,
    'map_backgroundcolor' => '',
    'show_maplinks' => 0,
    'show_maplinks_viewport' => 0,
    'fullscreen' => 0,
    'show_bubble_on_one_marker' => 0,
    'polygons_enable' => 0,
    'polygons_strokecolor' => "#FF0000",
    'polygons_strokeopacity' => "0.8",
    'polygons_strokeweight' => "3",
    'polygons_fillcolor' => "#FF0000",
    'polygons_fillopacity' => "0.35",
    'polygons_coords' => "",
    'polygons_clickable' => 0,
    'polygons_message' => "",
    'rectangles_enable' => 0,
    'rectangles_strokecolor' => "#FF0000",
    'rectangles_strokeopacity' => "0.8",
    'rectangles_strokeweight' => "3",
    'rectangles_fillcolor' => "#FF0000",
    'rectangles_fillopacity' => "0.35",
    'rectangles_coords' => "",
    'rectangles_clickable' => 0,
    'rectangles_message' => "",
    'rectangles_apply' => 0,
    'rectangles_dist' => 0,
    'circles_enable' => 0,
    'circles_strokecolor' => "#FF0000",
    'circles_strokeopacity' => "0.8",
    'circles_strokeweight' => "3",
    'circles_fillcolor' => "#FF0000",
    'circles_fillopacity' => "0.35",
    'circles_coords' => "",
    'circles_clickable' => 0,
    'circles_message' => "",
    'circles_radius' => 0,
    'circles_apply' => 0,
    'polylines_enable' => 0,
    'polylines_strokecolor' => "#FF0000",
    'polylines_strokeopacity' => "0.8",
    'polylines_strokeweight' => "3",
    'polylines_coords' => "",
    'polylines_clickable' => 0,
    'polylines_message' => "",
    'category_method' => 0,
    'category_term_reference_field' => '',
    'category_showhide_buttons' => 0,
    'categories' => '',
    'kml_group' => array(
      'kml_url' => '',
      'kml_url_click' => 1,
      'kml_url_infowindow' => 0,
      'kml_url_viewport' => 1,
      'kml_url_button' => 0,
      'kml_url_button_label' => 'Kml Layer',
      'kml_url_button_state' => 0,
    ),
    'map_resize' => 0,
    'region_bias' => variable_get('site_default_country', ''),
    'fullscreen_disable' => 0,
    'fullscreen_controlposition' => '',
    'search_places' => 0,
    'search_places_size' => 40,
    'search_places_position' => 'outside_above',
    'search_places_label' => t('Google Places Search'),
    'search_places_placeholder' => '',
    'search_places_dd' => 0,
    'search_places_list' => 0,
    'getdirections_enabled' => module_exists('getdirections') ? 1 : 0,
    'jquery_colorpicker_enabled' => module_exists('jquery_colorpicker') ? 1 : 0,
    'geo_enable' => 0,
    'extcontrol' => '',
    'geojson_enable' => 0,
    'geojson_data' => '',
    'geojson_options' => '',
    'nokeyboard' => 0,
    'nodoubleclickzoom' => 0,
    'input_map_show' => 1,
    'highlight_enable' => 0,
    'highlight_strokecolor' => "#FF0000",
    'highlight_strokeopacity' => "0.8",
    'highlight_strokeweight' => "3",
    'highlight_fillcolor' => "#FF0000",
    'highlight_fillopacity' => "0.35",
    'highlight_radius' => 10,
    'getdirections_link' => 0,
    'gps_button' => 0,
    'gps_button_label' => '',
    'gps_marker_title' => '',
    'gps_marker' => '',
    'gps_bubble' => 0,
    'gps_geocode' => 0,
    'gps_center' => 0,
    'gps_type' => 0,
    'gps_zoom' => -1,
    'smartip_button' => 0,
    'smartip_button_label' => '',
    'smartip_marker_title' => '',
    'smartip_marker' => '',
    'smartip_bubble' => 0,
    'smartip_center' => 0,
    'smartip_zoom' => -1,
    'smartip_callback' => 'getlocations_smartip/callback',
    'geolocation_mobile_check' => 1,
    'is_https' => $is_https ? 1 : 0,
    'show_search_distance' => 0,
    'views_search_marker_enable' => 0,
    'views_search_marker' => 'drupal',
    'views_search_marker_toggle' => 0,
    'views_search_marker_toggle_active' => 0,
    'views_search_radshape_enable' => 0,
    'views_search_radshape_strokecolor' => '#FF0000',
    'views_search_radshape_strokeopacity' => '0.8',
    'views_search_radshape_strokeweight' => '3',
    'views_search_radshape_fillcolor' => '#FF0000',
    'views_search_radshape_fillopacity' => '0.35',
    'views_search_radshape_toggle' => 0,
    'views_search_radshape_toggle_active' => 0,
    'views_search_center' => 0,
    'geocoder_enable' => 0,
    'what3words_enable' => 0,
    'what3words_search' => 1,
    'what3words_size' => '40',
    'what3words_map_marker' => 'drupal',
    'what3words_marker_show' => 0,
    'what3words_center' => 1,
    'what3words_zoom' => 12,
    'what3words_show' => 1,
    'what3words_click' => 1,
    'what3words_path' => 'getlocations/cb_w3w',
  );
  $providers = getlocations_get_map_providers();
  $baselayers = array();
  foreach ($providers as $k => $v) {
    $baselayers[$k] = $v['default'];
  }
  $defaults['baselayers'] = $baselayers;
  if ($reset) {
    return $defaults;
  }

  // ease over to new settings. Wed Sep 25 01:09:23 BST 2013
  $getlocations_defaults = variable_get('getlocations_default', $defaults);
  if (isset($getlocations_defaults['behavior'])) {
    foreach ($getlocations_defaults['behavior'] as $key => $val) {
      $getlocations_defaults[$key] = $val;
    }
    unset($getlocations_defaults['behavior']);
  }
  $newdefaults = getlocations_adjust_vars($defaults, $getlocations_defaults);
  return $newdefaults;
}