1/** 2 * @file 3 * GMap Markers 4 * GMap API version -- No manager 5 */ 6 7/*global Drupal, GMarker */ 8 9// Replace to override marker creation 10Drupal.gmap.factory.marker = function (opts) { 11 return new google.maps.Marker(opts); 12}; 13 14Drupal.gmap.addHandler('gmap', function (elem) { 15 var obj = this; 16 17 obj.bind('addmarker', function (marker) { 18 if ( !obj.map.markers ) obj.map.markers = new Array(); 19 marker.marker.setMap(obj.map); 20 obj.map.markers.push( marker.marker ); 21 }); 22 23 obj.bind('delmarker', function (marker) { 24 marker.marker.setMap(null); 25 }); 26 27 obj.bind('clearmarkers', function () { 28 // @@@ Maybe don't nuke ALL overlays? 29 if ( obj.map.markers ) { 30 for(var i=0; i < obj.map.markers.length; i++){ 31 obj.map.markers[i].setMap(null); 32 } 33 } 34 }); 35});
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.