PageSourceSearch

https://eurosdr.net/sites/all/modules/contrib/gmap/js/markerloader_static.js?tm9hts

js eurosdr.net collected 2026-10-02 05:06:07 UTC 1,088 bytes, 35 lines download raw bytes

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});

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.