You are here

function getlocations_fields_streetview_js_settings_do in Get Locations 7

Same name and namespace in other branches
  1. 7.2 modules/getlocations_fields/views/getlocations_fields.views.inc \getlocations_fields_streetview_js_settings_do()
1 call to getlocations_fields_streetview_js_settings_do()
template_preprocess_getlocations_fields_view_streetview in modules/getlocations_fields/views/getlocations_fields.views.inc
Preprocess function for getlocations_fields_view_streetview.tpl. getlocations_fields module only

File

modules/getlocations_fields/views/getlocations_fields.views.inc, line 786
getlocations_fields.views.inc @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL

Code

function getlocations_fields_streetview_js_settings_do($defaults, $mapid) {
  $settings = array(
    $mapid => array(
      'width' => $defaults['width'],
      'height' => $defaults['height'],
      'sv_addresscontrol' => $defaults['sv_addresscontrol'],
      'sv_addresscontrolposition' => $defaults['sv_addresscontrolposition'],
      'sv_pancontrol' => $defaults['sv_pancontrol'],
      'sv_pancontrolposition' => $defaults['sv_pancontrolposition'],
      'sv_zoomcontrol' => $defaults['sv_zoomcontrol'],
      'sv_zoomcontrolposition' => $defaults['sv_zoomcontrolposition'],
      'sv_linkscontrol' => $defaults['sv_linkscontrol'],
      'sv_imagedatecontrol' => $defaults['sv_imagedatecontrol'],
      'sv_scrollwheel' => $defaults['sv_scrollwheel'],
      'sv_clicktogo' => $defaults['sv_clicktogo'],
      'latitude' => $defaults['latitude'],
      'longitude' => $defaults['longitude'],
      'sv_heading' => $defaults['sv_heading'],
      'sv_zoom' => $defaults['sv_zoom'],
      'sv_pitch' => $defaults['sv_pitch'],
      'sv_enable' => $defaults['sv_enable'],
      'js_path' => base_path() . GETLOCATIONS_PATH . '/js/',
      'sv_fullscreen' => $defaults['sv_fullscreen'],
    ),
  );
  drupal_add_js(array(
    'getlocations_fields_streetview' => $settings,
  ), 'setting');
}