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
a17f5f74
Commit
a17f5f74
authored
16 years ago
by
Brandon Bergren
Browse files
Options
Downloads
Patches
Plain Diff
JSLint run.
parent
f0cef6b7
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
js/markerloader_static.js
+12
-7
12 additions, 7 deletions
js/markerloader_static.js
with
12 additions
and
7 deletions
js/markerloader_static.js
+
12
−
7
View file @
a17f5f74
/* $Id$ */
/* $Id$ */
/**
/**
* @file
* GMap Marker Loader
* GMap Marker Loader
* Static markers.
* Static markers.
* This is a simple marker loader to read markers from the map settings array.
* This is a simple marker loader to read markers from the map settings array.
* Commonly used with macros.
* Commonly used with macros.
*/
*/
/*global Drupal */
// Add a gmap handler
// Add a gmap handler
Drupal
.
gmap
.
addHandler
(
'
gmap
'
,
function
(
elem
)
{
Drupal
.
gmap
.
addHandler
(
'
gmap
'
,
function
(
elem
)
{
var
obj
=
this
;
var
obj
=
this
;
var
marker
,
i
;
var
marker
,
i
;
if
(
obj
.
vars
.
markers
)
{
if
(
obj
.
vars
.
markers
)
{
// Inject markers as soon as the icon loader is ready.
// Inject markers as soon as the icon loader is ready.
obj
.
bind
(
'
iconsready
'
,
function
()
{
obj
.
bind
(
'
iconsready
'
,
function
()
{
for
(
i
=
0
;
i
<
obj
.
vars
.
markers
.
length
;
i
++
)
{
for
(
i
=
0
;
i
<
obj
.
vars
.
markers
.
length
;
i
++
)
{
marker
=
obj
.
vars
.
markers
[
i
];
marker
=
obj
.
vars
.
markers
[
i
];
if
(
!
marker
.
opts
)
{
marker
.
opts
=
{};}
if
(
!
marker
.
opts
)
{
marker
.
opts
=
{};
}
// Pass around the object, bindings can change it if necessary.
// Pass around the object, bindings can change it if necessary.
obj
.
change
(
'
preparemarker
'
,
-
1
,
marker
);
obj
.
change
(
'
preparemarker
'
,
-
1
,
marker
);
// And add it.
// And add it.
obj
.
change
(
'
addmarker
'
,
-
1
,
marker
);
obj
.
change
(
'
addmarker
'
,
-
1
,
marker
);
}
}
obj
.
change
(
'
markersready
'
,
-
1
);
obj
.
change
(
'
markersready
'
,
-
1
);
});
});
}
}
});
});
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