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
84d4231d
Commit
84d4231d
authored
11 years ago
by
hutch
Committed by
Andriy Podanenko
11 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue #1851028 by bgprior, hutch | liquidcms: Fixed Pan/zoom controls disappeared.
parent
60de09bc
No related branches found
Branches containing commit
Tags
7.x-2.10-rc1
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
js/gmap.js
+13
-6
13 additions, 6 deletions
js/gmap.js
with
13 additions
and
6 deletions
js/gmap.js
+
13
−
6
View file @
84d4231d
...
...
@@ -239,13 +239,14 @@ Drupal.gmap.addHandler('gmap', function (elem) {
// Respond to incoming control type changes.
_ib
.
ctc
=
obj
.
bind
(
"
controltypechange
"
,
function
()
{
if
(
obj
.
vars
.
controltype
===
'
Small
'
)
{
obj
.
map
.
setOptions
({
navigation
ControlOptions
:
{
style
:
google
.
maps
.
Navigation
ControlStyle
.
SMALL
}});
obj
.
map
.
setOptions
({
zoom
ControlOptions
:
{
style
:
google
.
maps
.
Zoom
ControlStyle
.
SMALL
}});
}
else
if
(
obj
.
vars
.
controltype
===
'
Large
'
)
{
obj
.
map
.
setOptions
({
navigation
ControlOptions
:
{
style
:
google
.
maps
.
Navigation
ControlStyle
.
ZOOM_PAN
}});
obj
.
map
.
setOptions
({
zoom
ControlOptions
:
{
style
:
google
.
maps
.
Zoom
ControlStyle
.
LARGE
}});
}
// obsolete
else
if
(
obj
.
vars
.
controltype
===
'
Android
'
)
{
obj
.
map
.
setOptions
({
navigation
ControlOptions
:
{
style
:
google
.
maps
.
Navigation
ControlStyle
.
ANDROID
}});
obj
.
map
.
setOptions
({
zoom
ControlOptions
:
{
style
:
google
.
maps
.
Zoom
ControlStyle
.
SMALL
}});
}
});
// Send out outgoing control type changes.
...
...
@@ -329,18 +330,24 @@ Drupal.gmap.addHandler('gmap', function (elem) {
else
if
(
obj
.
vars
.
mtc
===
'
menu
'
)
{
opts
.
mapTypeControlOptions
.
style
=
google
.
maps
.
MapTypeControlStyle
.
DROPDOWN_MENU
;
}
else
if
(
obj
.
vars
.
mtc
===
'
none
'
)
{
opts
.
mapTypeControl
=
false
;
}
// Navigation control type
if
(
obj
.
vars
.
controltype
!==
'
None
'
)
{
opts
.
navigationControl
=
true
;
opts
.
zoomControl
=
true
;
// needs its own switch
opts
.
panControl
=
true
;
}
if
(
obj
.
vars
.
controltype
===
'
Small
'
)
{
o
pts
.
navigation
ControlOptions
=
{
style
:
google
.
maps
.
Navigation
ControlStyle
.
SMALL
};
o
bj
.
zoom
ControlOptions
=
{
style
:
google
.
maps
.
Zoom
ControlStyle
.
SMALL
};
}
else
if
(
obj
.
vars
.
controltype
===
'
Large
'
)
{
o
pts
.
navigation
ControlOptions
=
{
style
:
google
.
maps
.
Navigation
ControlStyle
.
ZOOM_PAN
};
o
bj
.
zoom
ControlOptions
=
{
style
:
google
.
maps
.
Zoom
ControlStyle
.
LARGE
};
}
// Set scale control visibility
opts
.
scaleControl
=
obj
.
vars
.
behavior
.
scale
;
...
...
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