You are here

function getlocations_gps_js_settings_do in Get Locations 7

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

Parameters

array $defaults: Settings

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

1 call to getlocations_gps_js_settings_do()
getlocations_js_settings_do in ./getlocations.module
Function sets up javascript settings

File

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

Code

function getlocations_gps_js_settings_do($defaults, $mapid) {
  $settings = array(
    $mapid => array(
      'gps_button' => $defaults['gps_button'],
      'gps_button_label' => $defaults['gps_button_label'],
      'gps_marker' => $defaults['gps_marker'],
      'gps_marker_title' => $defaults['gps_marker_title'],
      'gps_bubble' => $defaults['gps_bubble'],
      'gps_geocode' => $defaults['gps_geocode'],
      'gps_center' => $defaults['gps_center'],
      'gps_type' => $defaults['gps_type'],
      'gps_zoom' => $defaults['gps_zoom'],
      'gps_latlon_path' => $defaults['gps_latlon_path'],
    ),
  );
  drupal_add_js(array(
    'getlocations_gps' => $settings,
  ), 'setting');
  getlocations_gps_js_do();
}