PageSourceSearch

https://mairievendes.fr/wp-content/plugins/ultimate-maps-by-supsys…/modules/maps/js/frontend.maps.js?ver=1.3.3

js mairievendes.fr collected 2026-10-03 02:47:13 UTC 6,039 bytes, 194 lines download raw bytes

1var g_umsAllMaps = [];
2function umsGetMembershipGmeViewId(map, oldViewId) {
3  var newViewId = oldViewId;
4  if (map && map.getParam && map.getParam("membershipEnable") == "1") {
5    // prepare view id
6    if (map._elementId && map._elementId.id && map._elementId.id.substr) {
7      var viewIdKey = "ultimate_maps_",
8        newIdPos = map._elementId.id.substr(viewIdKey.length);
9      if (newIdPos) {
10        newViewId = newIdPos;
11      }
12    }
13  }
14  return newViewId;
15}
16jQuery(document).ready(function () {
17  var mapsInitClb = function () {
18    if (
19      typeof umsAllMapsInfo !== "undefined" &&
20      umsAllMapsInfo &&
21      umsAllMapsInfo.length
22    ) {
23      for (var i = 0; i < umsAllMapsInfo.length; i++) {
24        if (jQuery("#" + umsAllMapsInfo[i].view_html_id).length) {
25          umsInitMapOnPage(umsAllMapsInfo[i]);
26        }
27      }
28      jQuery(document).trigger("umsAmiVarInited");
29    }
30  };
31  var waitForLeaflet = function (attempts) {
32    attempts = attempts || 0;
33    if (attempts > 100) {
34      return;
35    }
36    if (typeof L !== "undefined" && typeof L.map === "function") {
37      mapsInitClb();
38    } else {
39      setTimeout(function () {
40        waitForLeaflet(attempts + 1);
41      }, 100);
42    }
43  };
44  waitForLeaflet();
45});
46function umsInitMapOnPage(mapData) {
47  g_umsMapLoadObserver.trigger(umsGetMapsEngine(mapData), function () {
48    var additionalData = {
49        markerGroups:
50          typeof mapData.marker_groups != "undefined"
51            ? mapData.marker_groups
52            : [],
53      },
54      newMap = null,
55      mapMarkersIds = [],
56      markerIdToShow = umsIsMarkerToShow(),
57      infoWndToShow = umsIsInfoWndToShow();
58
59    /*if(mapData && mapData.view_html_mbs_id) {
60			// for membership Activity ajax load
61			newMap = new umsGoogleMap(mapData.view_html_mbs_id, mapData.params, additionalData);
62			newMap.setParam('view_html_mbs_id', mapData.view_html_mbs_id);
63			newMap.refreshWithCenter(mapData.params.center.lat(), mapData.params.center.lng(), mapData.params.zoom);
64		} else {
65			newMap = new umsGoogleMap('#'+ mapData.view_html_id, mapData.params, additionalData);
66		}*/
67
68    // for membership Google Maps "Get original"
69    /*if(mapData.mbs_presets == 1) {
70			newMap.setParam('mbs_presets', 1);
71		}*/
72    newMap = umsMapLoader.initMap(
73      "#" + mapData.view_html_id,
74      mapData,
75      additionalData
76    );
77
78    if (mapData.markers && mapData.markers.length) {
79      mapData.markers = _umsPrepareMarkersList(mapData.markers);
80
81      for (var i in mapData.markers) {
82        mapMarkersIds.push(mapData.markers[i].id);
83      }
84      if (toeInArray(markerIdToShow, mapMarkersIds) == -1) {
85        markerIdToShow = false;
86      }
87      if (toeInArray(infoWndToShow, mapMarkersIds) == -1) {
88        infoWndToShow = false;
89      }
90      for (var j = 0; j < mapData.markers.length; j++) {
91        if (markerIdToShow && mapData.markers[j].id != markerIdToShow) continue;
92        if (infoWndToShow) {
93          mapData.markers[j].params.show_description =
94            mapData.markers[j].id == infoWndToShow ? "1" : "0";
95        }
96        var newMarker = newMap.addMarker(mapData.markers[j]);
97        // We will set this only when marker info window need to be loaded
98        newMarker.setTitle(mapData.markers[j].title, true);
99        newMarker.setDescription(mapData.markers[j].description);
100      }
101      newMap.markersRefresh();
102      newMap.checkMarkersParams(newMap.getAllMarkers(), markerIdToShow);
103    }
104    if (mapData.shapes && mapData.shapes.length) {
105      mapData.shapes = _umsPrepareShapesList(mapData.shapes);
106      for (var z = 0; z < mapData.shapes.length; z++) {
107        var newShape = newMap.addShape(mapData.shapes[z]);
108      }
109    }
110    if (mapData.heatmap) {
111      mapData.heatmap = _umsPrepareHeatmapList(mapData.heatmap);
112      newMap.addHeatmap(mapData.heatmap);
113    }
114    g_umsAllMaps.push(newMap);
115  });
116}
117function umsGetMapInfoById(id) {
118  if (
119    typeof umsAllMapsInfo !== "undefined" &&
120    umsAllMapsInfo &&
121    umsAllMapsInfo.length
122  ) {
123    id = parseInt(id);
124    for (var i = 0; i < umsAllMapsInfo.length; i++) {
125      if (umsAllMapsInfo[i].id == id) {
126        return umsAllMapsInfo[i];
127      }
128    }
129  }
130  return false;
131}
132function umsGetMapInfoByViewId(viewId) {
133  if (
134    typeof umsAllMapsInfo !== "undefined" &&
135    umsAllMapsInfo &&
136    umsAllMapsInfo.length
137  ) {
138    for (var i = 0; i < umsAllMapsInfo.length; i++) {
139      if (umsAllMapsInfo[i].view_id == viewId) {
140        return umsAllMapsInfo[i];
141      }
142    }
143  }
144  return false;
145}
146function umsGetAllMaps() {
147  return g_umsAllMaps;
148}
149function umsGetMapById(id) {
150  var allMaps = umsGetAllMaps();
151  for (var i = 0; i < allMaps.length; i++) {
152    if (allMaps[i].getId() == id) {
153      return allMaps[i];
154    }
155  }
156  return false;
157}
158function umsGetMapByViewId(viewId) {
159  var allMaps = umsGetAllMaps();
160  for (var i = 0; i < allMaps.length; i++) {
161    var currViewId = allMaps[i].getViewId();
162    if (window.umsGetMembershipGmeViewId) {
163      currViewId = umsGetMembershipGmeViewId(allMaps[i], currViewId);
164    }
165    if (currViewId == viewId) {
166      return allMaps[i];
167    }
168  }
169  return false;
170}
171function umsIsMarkerToShow() {
172  var markerHash = "umsMarker",
173    hashParams = toeGetHashParams();
174  if (hashParams) {
175    for (var i in hashParams) {
176      if (!hashParams[i] || typeof hashParams[i] !== "string") continue;
177      var pair = hashParams[i].split("=");
178      if (pair[0] == markerHash) return parseInt(pair[1]);
179    }
180  }
181  return false;
182}
183function umsIsInfoWndToShow() {
184  var markerHash = "umsInfoWnd",
185    hashParams = toeGetHashParams();
186  if (hashParams) {
187    for (var i in hashParams) {
188      if (!hashParams[i] || typeof hashParams[i] !== "string") continue;
189      var pair = hashParams[i].split("=");
190      if (pair[0] == markerHash) return parseInt(pair[1]);
191    }
192  }
193  return false;
194}

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.