Skip to content
Snippets Groups Projects
Commit a17f5f74 authored by Brandon Bergren's avatar Brandon Bergren
Browse files

JSLint run.

parent f0cef6b7
No related branches found
No related tags found
No related merge requests found
/* $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);
}); });
} }
}); });
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