Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
gmap
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
drupal.org
gmap
Commits
55a6a6f6
Commit
55a6a6f6
authored
11 years ago
by
hutch
Committed by
Andriy Podanenko
11 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue #2080985 by hutch: Added Pancontrol.
parent
e38896f8
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
gmap.module
+7
-6
7 additions, 6 deletions
gmap.module
gmap_settings_ui.inc
+7
-0
7 additions, 0 deletions
gmap_settings_ui.inc
js/gmap.js
+3
-2
3 additions, 2 deletions
js/gmap.js
with
17 additions
and
8 deletions
gmap.module
+
7
−
6
View file @
55a6a6f6
...
...
@@ -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
,
...
...
This diff is collapsed.
Click to expand it.
gmap_settings_ui.inc
+
7
−
0
View file @
55a6a6f6
...
...
@@ -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'
),
...
...
This diff is collapsed.
Click to expand it.
js/gmap.js
+
3
−
2
View file @
55a6a6f6
...
...
@@ -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
};
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment