You are here

function getlocations_fields_js_settings_do in Get Locations 7.2

Same name and namespace in other branches
  1. 7 modules/getlocations_fields/getlocations_fields.module \getlocations_fields_js_settings_do()

Parameters

array $defaults: Settings

string $mapid: Unique map identifier used in javascript to allow multiple maps

1 call to getlocations_fields_js_settings_do()
getlocations_fields_getmap in modules/getlocations_fields/getlocations_fields.module
input map

File

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

Code

function getlocations_fields_js_settings_do($defaults, $mapid) {
  $settings = array(
    $mapid => array(
      'nodezoom' => $defaults['nodezoom'],
      'map_marker' => $defaults['input_map_marker'],
      'use_address' => $defaults['use_address'],
      'latlon_warning' => $defaults['latlon_warning'],
      'autocomplete_bias' => $defaults['autocomplete_bias'],
      'restrict_by_country' => $defaults['restrict_by_country'],
      'search_country' => $defaults['search_country'],
      'smart_ip_path' => url("getlocations_fields/smart_ip"),
      'street_num_pos' => $defaults['street_num_pos'],
      'sv_heading' => $defaults['sv_heading'],
      'sv_zoom' => $defaults['sv_zoom'],
      'sv_pitch' => $defaults['sv_pitch'],
      'sv_enable' => $defaults['sv_enable'],
      'sv_showfirst' => $defaults['sv_showfirst'],
      'map_settings_allow' => $defaults['map_settings_allow'],
      'streetview_settings_allow' => $defaults['streetview_settings_allow'],
    ),
  );
  drupal_add_js(array(
    'getlocations_fields' => $settings,
  ), 'setting');
}