Skip to content
Snippets Groups Projects
Commit 55a6a6f6 authored by hutch's avatar hutch Committed by Andriy Podanenko
Browse files

Issue #2080985 by hutch: Added Pancontrol.

parent e38896f8
No related branches found
No related tags found
No related merge requests found
......@@ -29,6 +29,7 @@ function gmap_defaults() {
'zoom' => 3,
'maxzoom' => 14,
'controltype' => 'Small',
'pancontrol' => 1,
'align' => 'None',
'latlong' => '40,0',
'maptype' => 'Map',
......@@ -190,12 +191,12 @@ function gmap_gmap($op, &$map) {
'help' => t('Used for advanced javascript work, this will enable the <em>clickshape</em> event.'),
'internal' => TRUE,
),
'googlebar' => array(
'title' => t('Enable Google Bar'),
'default' => FALSE,
'help' => t('Enable the "Google Bar" at bottom of the map.'),
'previewable' => TRUE,
),
//'googlebar' => array(
// 'title' => t('Enable Google Bar'),
// 'default' => FALSE,
// 'help' => t('Enable the "Google Bar" at bottom of the map.'),
// 'previewable' => TRUE,
//),
'highlight' => array(
'title' => t('Highlight marker on rollover'),
'default' => FALSE,
......
......@@ -161,6 +161,13 @@ function gmap_admin_settings($form, &$form_state) {
);
gmap_widget_setup($form['gmap_default']['controltype'], 'controltype', 'settings_default_map');
$form['gmap_default']['pancontrol'] = array(
'#type' => 'checkbox',
'#title' => t('Show Pan control'),
'#default_value' => $defaults['pancontrol'],
);
gmap_widget_setup($form['gmap_default']['pancontrol'], 'pancontrol', 'settings_default_map');
$form['gmap_default']['mtc'] = array(
'#type' => 'select',
'#title' => t('Map Type Control'),
......
......@@ -337,8 +337,9 @@ Drupal.gmap.addHandler('gmap', function (elem) {
// Navigation control type
if (obj.vars.controltype !== 'None') {
opts.zoomControl = true;
// needs its own switch
opts.panControl = true;
}
if (obj.vars.pancontrol) {
opts.panControl = true;
}
if (obj.vars.controltype === 'Small') {
obj.zoomControlOptions = {style: google.maps.ZoomControlStyle.SMALL};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment