function getlocations_mapquest_display_options_form in Get Locations 7
Same name and namespace in other branches
- 7.2 modules/getlocations_mapquest/getlocations_mapquest.module \getlocations_mapquest_display_options_form()
Function
Return value
Returns
3 calls to getlocations_mapquest_display_options_form()
- getlocations_mapquest_field_formatter_settings_form in modules/
getlocations_mapquest/ getlocations_mapquest.module - Implements hook_field_formatter_settings_form(). Returns form elements for a formatter's settings.
- getlocations_mapquest_plugin_style::options_form in modules/
getlocations_mapquest/ views/ getlocations_mapquest_plugin_style.inc - Options form
- getlocations_mapquest_settings_form in modules/
getlocations_mapquest/ getlocations_mapquest.module - Function
File
- modules/
getlocations_mapquest/ getlocations_mapquest.module, line 1269 - getlocations_mapquest.module @author Bob Hutchinson http://drupal.org/user/52366 @copyright GNU GPL
Code
function getlocations_mapquest_display_options_form($defaults, $admin = FALSE) {
$form = array();
$form['#theme'][] = 'getlocations_mapquest_display_options_form';
$mapquest_lic = variable_get('getlocations_mapquest_lic', array(
'key' => '',
'type' => 'l',
));
$controlpositions = getlocations_mapquest_controlpositions();
$form['nodezoom'] = getlocations_element_map_zoom(t('Default Zoom for Single location'), $defaults['nodezoom'], t('The Default zoom level for a single marker.'));
$form['scrollWheelZoom'] = getlocations_element_map_checkbox(t('Scrollwheel'), $defaults['scrollWheelZoom'], t('Enable scrollwheel zooming.'));
$form['dragging'] = getlocations_element_map_checkbox(t('Draggable'), $defaults['dragging'], t('Enable dragging the map.'));
$form['doubleClickZoom'] = getlocations_element_map_checkbox(t('DoubleClick Zoom'), $defaults['doubleClickZoom'], t('Enable DoubleClick Zooming.'));
$mapopts = array(
'map' => t('Map layer'),
'sat' => t('Satellite layer'),
'hyb' => t('Hybrid layer'),
);
$form['maps_default'] = getlocations_element_dd(t('Default map'), $defaults['maps_default'], $mapopts);
$form['zoomControl'] = getlocations_element_dd(t('Zoom Control type'), $defaults['zoomControl'], array(
'none' => t('None'),
'small' => t('Small'),
'large' => t('Large'),
));
$form['zoomControl']['#suffix'] = '<div id="wrap-getlocations-zoomcontrol">';
$form['zoomcontrol_hset'] = getlocations_element_map_tf(t('Horizontal offset'), $defaults['zoomcontrol_hset'], '', 5, 255, TRUE);
$form['zoomcontrol_vset'] = getlocations_element_map_tf(t('Vertical offset'), $defaults['zoomcontrol_vset'], '', 5, 255, TRUE);
$form['zoomcontrolposition'] = getlocations_element_dd(t('Position of Zoom Control'), $defaults['zoomcontrolposition'], $controlpositions);
$form['zoomcontrolposition']['#suffix'] = '</div>';
$form['layerControl'] = getlocations_element_map_checkbox(t('Layer Control'), $defaults['layerControl'], t('Enable Layer Control on the map.'));
$form['layerControl']['#suffix'] = '<div id="wrap-getlocations-layercontrol">';
$form['layercontrol_hset'] = getlocations_element_map_tf(t('Horizontal offset'), $defaults['layercontrol_hset'], '', 5, 255, TRUE);
$form['layercontrol_vset'] = getlocations_element_map_tf(t('Vertical offset'), $defaults['layercontrol_vset'], '', 5, 255, TRUE);
$form['layercontrolposition'] = getlocations_element_dd(t('Position of Layer Control'), $defaults['layercontrolposition'], $controlpositions);
$form['layercontrolposition']['#suffix'] = '</div>';
$form['overview'] = getlocations_element_map_checkbox(t('Overview map'), $defaults['overview'], t('Show overview map.'));
$form['overview']['#suffix'] = '<div id="wrap-getlocations-overview">';
$form['overview_hset'] = getlocations_element_map_tf(t('Overview Width'), $defaults['overview_hset'], '', 5, 255, TRUE);
$form['overview_vset'] = getlocations_element_map_tf(t('Overview Height'), $defaults['overview_vset'], '', 5, 255, TRUE);
$form['overview_zoom'] = getlocations_element_map_tf(t('Overview Zoom offset'), $defaults['overview_zoom'], '', 5, 255, TRUE);
$form['overviewposition'] = getlocations_element_dd(t('Position of Overview'), $defaults['overviewposition'], $controlpositions);
$form['overview_opened'] = getlocations_element_map_checkbox(t('Overview map state'), $defaults['overview_opened'], t('Show overview map as open by default.'));
$form['overview_opened']['#suffix'] = '</div>';
# Traffic Control
if ($mapquest_lic['type'] == 'l') {
$form['trafficControl'] = getlocations_element_map_checkbox(t('Traffic Control'), $defaults['trafficControl'], t('Enable Traffic Control on the map.'));
$form['trafficControl']['#suffix'] = '<div id="wrap-getlocations-trafficcontrol">';
$form['trafficcontrol_hset'] = getlocations_element_map_tf(t('Horizontal offset'), $defaults['trafficcontrol_hset'], '', 5, 255, TRUE);
$form['trafficcontrol_vset'] = getlocations_element_map_tf(t('Vertical offset'), $defaults['trafficcontrol_vset'], '', 5, 255, TRUE);
$form['trafficcontrolposition'] = getlocations_element_dd(t('Position of Traffic Control'), $defaults['trafficcontrolposition'], $controlpositions);
$form['trafficcontrolposition']['#suffix'] = '</div>';
}
else {
$form['trafficControl'] = array(
'#type' => 'value',
'#value' => 0,
);
$form['trafficcontrolposition'] = array(
'#type' => 'value',
'#value' => '',
);
}
# Drawing Control
$form['drawingControl'] = getlocations_element_map_checkbox(t('Drawing Control'), $defaults['drawingControl'], t('Enable Drawing Control on the map.'));
$form['drawingControl']['#suffix'] = '<div id="wrap-getlocations-drawingcontrol">';
$form['drawingcontrol_hset'] = getlocations_element_map_tf(t('Horizontal offset'), $defaults['drawingcontrol_hset'], '', 5, 255, TRUE);
$form['drawingcontrol_vset'] = getlocations_element_map_tf(t('Vertical offset'), $defaults['drawingcontrol_vset'], '', 5, 255, TRUE);
$form['drawingcontrolposition'] = getlocations_element_dd(t('Position of Drawing Control'), $defaults['drawingcontrolposition'], $controlpositions);
$form['drawingcontrolposition']['#suffix'] = '</div>';
# Geolocation Control
$form['geolocationControl'] = getlocations_element_map_checkbox(t('Geolocation Control'), $defaults['geolocationControl'], t('Enable Geolocation Control on the map.'));
$form['geolocationControl']['#suffix'] = '<div id="wrap-getlocations-geolocationcontrol">';
$form['geolocationcontrol_hset'] = getlocations_element_map_tf(t('Horizontal offset'), $defaults['geolocationcontrol_hset'], '', 5, 255, TRUE);
$form['geolocationcontrol_vset'] = getlocations_element_map_tf(t('Vertical offset'), $defaults['geolocationcontrol_vset'], '', 5, 255, TRUE);
$form['geolocationcontrolposition'] = getlocations_element_dd(t('Position of Geolocation Control'), $defaults['geolocationcontrolposition'], $controlpositions);
$form['geolocationcontrolposition']['#suffix'] = '</div>';
$form['markeraction'] = getlocations_element_dd(t('Marker action'), $defaults['markeraction'], array(
'' => t('None'),
'popup' => t('Popup'),
'link' => t('Link to content'),
));
$form['show_maplinks'] = getlocations_element_map_checkbox(t('Show map links'), $defaults['show_maplinks'], t('Show a list of links to show Popup or go to Link on the map.'));
if (module_exists('getdirections')) {
$form['getdirections_link'] = getlocations_element_map_checkbox(t('Link to Getdirections in popup'), $defaults['getdirections_link'], t('Include a link to the Getdirections page in Popup.'));
}
$form['bestfitmargin'] = getlocations_element_map_tf(t('Best fit margin'), $defaults['bestfitmargin'], '', 5, 255, TRUE);
return $form;
}