1/* $Id: markerloader_static.js,v 1.3 2009/02/11 19:30:22 bdragon Exp $ */ 2 3/** 4 * @file 5 * GMap Marker Loader 6 * Static markers. 7 * This is a simple marker loader to read markers from the map settings array. 8 * Commonly used with macros. 9 */ 10 11/*global Drupal */ 12 13// Add a gmap handler 14Drupal.gmap.addHandler('gmap', function (elem) { 15 var obj = this; 16 var marker, i; 17 if (obj.vars.markers) { 18 // Inject markers as soon as the icon loader is ready. 19 obj.bind('iconsready', function () { 20 for (i = 0; i < obj.vars.markers.length; i++) { 21 marker = obj.vars.markers[i]; 22 if (!marker.opts) { 23 marker.opts = {}; 24 } 25 // Pass around the object, bindings can change it if necessary. 26 obj.change('preparemarker', -1, marker); 27 // And add it. 28 if (marker && marker.marker == undefined) { 29 obj.change('addmarker', -1, marker); 30 } 31 } 32 obj.change('markersready', -1); 33 }); 34 } 35}); 36 37;/*})'"*/ 38;/*})'"*/
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.