@bmlt-enabled/croutonjs 4.3.2 → 4.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/crouton-gmaps.js +743 -494
- package/crouton-gmaps.min.js +6 -6
- package/crouton-gmaps.min.js.map +1 -1
- package/crouton-map.js +467 -308
- package/crouton-map.min.js +1 -1
- package/crouton-map.min.js.map +1 -1
- package/crouton.js +494 -324
- package/crouton.min.js +6 -6
- package/crouton.min.js.map +1 -1
- package/crouton.nojquery.js +24 -13
- package/crouton.nojquery.min.js +6 -6
- package/crouton.nojquery.min.js.map +1 -1
- package/package.json +1 -1
package/crouton.js
CHANGED
|
@@ -12982,7 +12982,7 @@ function CroutonHandlebarsExtensions() {
|
|
|
12982
12982
|
crouton_Handlebars.registerPartial('header', hbs_Crouton.templates['header']);
|
|
12983
12983
|
crouton_Handlebars.registerPartial('byfields', hbs_Crouton.templates['byfield']);
|
|
12984
12984
|
crouton_Handlebars.registerPartial('formatPopup', hbs_Crouton.templates['formatPopup']);
|
|
12985
|
-
crouton_Handlebars.registerPartial('meetingModal', "<a tabindex='0'
|
|
12985
|
+
crouton_Handlebars.registerPartial('meetingModal', "<a tabindex='0' onclick='crouton.meetingModal({{this.id_bigint}})'><span class='glyphicon glyphicon-search' aria-hidden='true'></span>{{this.meeting_name}}</a>");
|
|
12986
12986
|
crouton_Handlebars.registerPartial('meetingLink', `
|
|
12987
12987
|
{{#if this.meeting_details_url}}
|
|
12988
12988
|
<a href='{{{this.meeting_details_url}}}'><span class='glyphicon glyphicon-search' aria-hidden='true'></span>{{this.meeting_name}}</a>
|
|
@@ -13388,7 +13388,7 @@ this["hbs_Crouton"]["templates"]["group3ColumnRow"] = Handlebars.template({"0":f
|
|
|
13388
13388
|
|
|
13389
13389
|
return "<td class=\"bmlt-column1\" "
|
|
13390
13390
|
+ ((stack1 = (lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"css-textAlign",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":1,"column":25},"end":{"line":1,"column":54}}})) != null ? stack1 : "")
|
|
13391
|
-
+ ">\n <div class='meeting-name'>\n <a tabindex='0'
|
|
13391
|
+
+ ">\n <div class='meeting-name'>\n <a tabindex='0' onclick='crouton.meetingModal("
|
|
13392
13392
|
+ alias4(alias3((depth0 != null ? lookupProperty(depth0,"id_bigint") : depth0), depth0))
|
|
13393
13393
|
+ ")'><span class='glyphicon glyphicon-search' aria-hidden='true'></span>"
|
|
13394
13394
|
+ alias4(alias3((depth0 != null ? lookupProperty(depth0,"meeting_name") : depth0), depth0))
|
|
@@ -13622,10 +13622,10 @@ this["hbs_Crouton"]["templates"]["header"] = Handlebars.template({"0":function(c
|
|
|
13622
13622
|
return undefined
|
|
13623
13623
|
};
|
|
13624
13624
|
|
|
13625
|
-
return " <li><a href=\"
|
|
13625
|
+
return " <li><a href=\"./#tab"
|
|
13626
13626
|
+ alias1(container.lambda(depth0, depth0))
|
|
13627
13627
|
+ "\" data-toggle=\"tab\">"
|
|
13628
|
-
+ alias1((lookupProperty(helpers,"getDayOfTheWeek")||(depth0 && lookupProperty(depth0,"getDayOfTheWeek"))||container.hooks.helperMissing).call(depth0 != null ? depth0 : (container.nullContext || {}),depth0,{"name":"getDayOfTheWeek","hash":{},"data":data,"loc":{"start":{"line":38,"column":
|
|
13628
|
+
+ alias1((lookupProperty(helpers,"getDayOfTheWeek")||(depth0 && lookupProperty(depth0,"getDayOfTheWeek"))||container.hooks.helperMissing).call(depth0 != null ? depth0 : (container.nullContext || {}),depth0,{"name":"getDayOfTheWeek","hash":{},"data":data,"loc":{"start":{"line":38,"column":63},"end":{"line":38,"column":87}}}))
|
|
13629
13629
|
+ "</a></li>\n";
|
|
13630
13630
|
},"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data,blockParams,depths) {
|
|
13631
13631
|
var stack1, alias1=depth0 != null ? depth0 : (container.nullContext || {}), lookupProperty = container.lookupProperty || function(parent, propertyName) {
|
|
@@ -14092,7 +14092,7 @@ this["hbs_Crouton"]["templates"]["meetingDetailsButton"] = Handlebars.template({
|
|
|
14092
14092
|
|
|
14093
14093
|
return " <div>\n <a onclick='crouton.meetingModal("
|
|
14094
14094
|
+ alias1(container.lambda((depth0 != null ? lookupProperty(depth0,"id_bigint") : depth0), depth0))
|
|
14095
|
-
+ ")' tabindex='0'
|
|
14095
|
+
+ ")' tabindex='0' class='map-button btn btn-primary btn-xs'>\n <span class='glyphicon glyphicon-search' aria-hidden='true'></span>\n "
|
|
14096
14096
|
+ alias1((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||container.hooks.helperMissing).call(depth0 != null ? depth0 : (container.nullContext || {}),"meeting details",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":4,"column":5},"end":{"line":4,"column":34}}}))
|
|
14097
14097
|
+ "\n </a>\n </div>\n";
|
|
14098
14098
|
},"useData":true});
|
|
@@ -15468,7 +15468,7 @@ function Crouton(config) {
|
|
|
15468
15468
|
self.distanceTabAllowed = false;
|
|
15469
15469
|
self.favoritesOn = false;
|
|
15470
15470
|
self.config = {
|
|
15471
|
-
version: '4.3.
|
|
15471
|
+
version: '4.3.4', // CroutonJS version for debugging
|
|
15472
15472
|
on_complete: null, // Javascript function to callback when data querying is completed.
|
|
15473
15473
|
root_server: null, // The root server to use.
|
|
15474
15474
|
placeholder_id: "bmlt-tabs", // The DOM id that will be used for rendering
|
|
@@ -15726,7 +15726,7 @@ function Crouton(config) {
|
|
|
15726
15726
|
self.dayTabFromId = function(id) {
|
|
15727
15727
|
const day_id = self.meetingData.find((m)=>m.id_bigint == id).weekday_tinyint;
|
|
15728
15728
|
self.hideAllPages();
|
|
15729
|
-
jQuery('.nav-tabs a[href="
|
|
15729
|
+
jQuery('.nav-tabs a[href="./#tab' + day_id + '"]').tab('show');
|
|
15730
15730
|
jQuery("#" + day_id).removeClass("hide").addClass("show");
|
|
15731
15731
|
};
|
|
15732
15732
|
/**
|
|
@@ -17059,7 +17059,7 @@ Crouton.prototype.render = function(doMeetingMap = false, fitBounds=true) {
|
|
|
17059
17059
|
const d = new Date();
|
|
17060
17060
|
let n = d.getDay();
|
|
17061
17061
|
n++;
|
|
17062
|
-
jQuery('.nav-tabs a[href="
|
|
17062
|
+
jQuery('.nav-tabs a[href="./#tab' + n + '"]').tab('show');
|
|
17063
17063
|
jQuery('#tab' + n).show();
|
|
17064
17064
|
}
|
|
17065
17065
|
|
|
@@ -17747,7 +17747,7 @@ function MeetingMap(inConfig) {
|
|
|
17747
17747
|
filterVisible(false);
|
|
17748
17748
|
gSearchPoint = {"lat": position.lat, "lng": position.lng};
|
|
17749
17749
|
crouton.updateDistances();
|
|
17750
|
-
const locationSearchResult = gDelegate.getZoomAdjustedBounds(gSearchPoint, filterMeetingsAndBounds, config.locationSearchZoom ?? 12);
|
|
17750
|
+
const locationSearchResult = gDelegate.getZoomAdjustedBounds(gSearchPoint, filterMeetingsAndBounds, config.locationSearchZoom ?? 12, findClosestMeetingLatLng(gSearchPoint));
|
|
17751
17751
|
gDelegate.flyToFixedZoom(position, locationSearchResult.zoom, filterVisible);
|
|
17752
17752
|
filterVisible(true);
|
|
17753
17753
|
setLocationSearchButtonLabel(crouton.localization.getWord('closest meetings'));
|
|
@@ -17911,7 +17911,7 @@ function MeetingMap(inConfig) {
|
|
|
17911
17911
|
const centerAndBounds = gDelegate.getGeocodeCenterAndBounds(resp, i);
|
|
17912
17912
|
if (!centerAndBounds) return;
|
|
17913
17913
|
const zoom = calcZoomThatContainsBoundingBox(centerAndBounds);
|
|
17914
|
-
const locationSearchResult = gDelegate.getZoomAdjustedBounds(gSearchPoint, filterMeetingsAndBounds, zoom);
|
|
17914
|
+
const locationSearchResult = gDelegate.getZoomAdjustedBounds(gSearchPoint, filterMeetingsAndBounds, zoom, findClosestMeetingLatLng(gSearchPoint));
|
|
17915
17915
|
gDelegate.flyToFixedZoom(gSearchPoint, locationSearchResult.zoom, filterVisible);
|
|
17916
17916
|
searchResponseCallback();
|
|
17917
17917
|
})
|
|
@@ -17975,6 +17975,16 @@ function MeetingMap(inConfig) {
|
|
|
17975
17975
|
function locationSearchGeocodeInitial(resp) {
|
|
17976
17976
|
locationSearchGeocode(resp, true);
|
|
17977
17977
|
}
|
|
17978
|
+
function findClosestMeetingLatLng(center) {
|
|
17979
|
+
return filterMeetings(gAllMeetings).reduce((closest, meeting) => {
|
|
17980
|
+
const meetingLocation = {lat: meeting.latitude, lng: meeting.longitude};
|
|
17981
|
+
const distance = getDistance(center, meetingLocation);
|
|
17982
|
+
if (distance < closest.distance) {
|
|
17983
|
+
return {meetingLocation: meetingLocation, distance: distance};
|
|
17984
|
+
}
|
|
17985
|
+
return closest;
|
|
17986
|
+
}, {meetingLocation: null, distance: Infinity}).meetingLocation;
|
|
17987
|
+
}
|
|
17978
17988
|
function locationSearchGeocode(resp, initial=false) {
|
|
17979
17989
|
chooseResponse('bmlt_location_search_modal', resp, function(resp, i) {
|
|
17980
17990
|
closeModalWindow(gLocationSearchModal);
|
|
@@ -17983,7 +17993,8 @@ function MeetingMap(inConfig) {
|
|
|
17983
17993
|
let center = centerAndBounds.center;
|
|
17984
17994
|
filterVisible(false);
|
|
17985
17995
|
let zoom = calcZoomThatContainsBoundingBox(centerAndBounds);
|
|
17986
|
-
|
|
17996
|
+
|
|
17997
|
+
gLocationSearchResult = gDelegate.getZoomAdjustedBounds(center, filterMeetingsAndBounds, zoom, findClosestMeetingLatLng(center));
|
|
17987
17998
|
gSearchPoint = {"lat": gLocationSearchResult.center.lat, "lng": gLocationSearchResult.center.lng};
|
|
17988
17999
|
filterVisible(true, gLocationSearchResult.bounds);
|
|
17989
18000
|
crouton.updateDistances(initial);
|
|
@@ -18048,13 +18059,13 @@ function MeetingMap(inConfig) {
|
|
|
18048
18059
|
retrieveGeolocation().then(function(coords) {
|
|
18049
18060
|
filterVisible(false);
|
|
18050
18061
|
if (isMapVisible() || !makeFilterVisible) {
|
|
18051
|
-
const locationSearchResult = gDelegate.getZoomAdjustedBounds(coords, filterMeetingsAndBounds, config.locationSearchZoom ?? 12);
|
|
18062
|
+
const locationSearchResult = gDelegate.getZoomAdjustedBounds(coords, filterMeetingsAndBounds, config.locationSearchZoom ?? 12, findClosestMeetingLatLng(coords));
|
|
18052
18063
|
gDelegate.flyToFixedZoom(coords, locationSearchResult.zoom, () => {
|
|
18053
18064
|
filterVisible(makeFilterVisible);
|
|
18054
18065
|
if (makeFilterVisible) setLocationSearchButtonLabel(crouton.localization.getWord('closest meetings'));
|
|
18055
18066
|
});
|
|
18056
18067
|
} else {
|
|
18057
|
-
gLocationSearchResult = gDelegate.getZoomAdjustedBounds(coords, filterMeetingsAndBounds, config.locationSearchZoom ?? 12);
|
|
18068
|
+
gLocationSearchResult = gDelegate.getZoomAdjustedBounds(coords, filterMeetingsAndBounds, config.locationSearchZoom ?? 12, findClosestMeetingLatLng(coords));
|
|
18058
18069
|
filterVisible(true, gLocationSearchResult.bounds);
|
|
18059
18070
|
setLocationSearchButtonLabel(crouton.localization.getWord('closest meetings'));
|
|
18060
18071
|
}
|
|
@@ -18588,129 +18599,139 @@ MeetingMap.prototype.hasMapSearch = null;
|
|
|
18588
18599
|
MeetingMap.prototype.createLocationSearchButton = null;
|
|
18589
18600
|
|
|
18590
18601
|
function MapDelegate(config) {
|
|
18591
|
-
const shadowUrl = config.BMLTPlugin_images
|
|
18602
|
+
const shadowUrl = config.BMLTPlugin_images
|
|
18603
|
+
? config.BMLTPlugin_images + "/NAMarkerS.png"
|
|
18592
18604
|
: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAAgEAYAAADbCl1AAAAABmJLR0T///////8JWPfcAAAACXBIWXMAAABIAAAASABGyWs+AAAF7UlEQVRo3u2YaWhcVRTH77zJzGS2pG0c1FRr6o5rXVBxwSLuCu5WLGLADa2VKlbFFUVcUasftIIiivu+C4q7xRVRcF8xVuIkcTL7TGZ5zw/ndybklSGZyTT98s6XH/e9d7f/vf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wi6o0h/LJx9GKfex45JcGOK/kh3Wwt97KTGDlWX0myhcR2NdGYMErScyyC+t86NrUIQzFNO7S1MrhIOk42MkK9mFgvLpFc2QpvVMxXULVCrpguiCecWkCNkOGLOLVB3IhNq3Fz6ofpQHY8KyQXBEEwc0jaDz7O5SdW5wVW/FZZ2EeZI5NODkAXIIFCB/HeC+nU2gPM5/bwAszMVtF1h3TcpjqJzPsVnhRWibYXv6tvQnQrJwBt5pgqrQeBn2iV/1Xzb5sjW2EEVfHMRAfOkT2mOfIbnufsREldVWcu4uJHZnCRzF8SlTCb8LerUtrBar0S/7NwqvrbADsh/KoxzIwqw4/wcZecj2lEfeSET5WJga9TmplPGJxa4yua2Q0BcSZYbVZ4FL5GXVnXh8em2XkU1/10xdT6NE9O2tesKVGCNityla2QHBQTO4Et72Ikhgp3vYsjNzD6UibPTJ05intyMCtzINNjo1TLHT5Yid//yIOO4kvZo38FlGC4ohmxkwzt+p6zV4NXsN9+lrgGShllrhN0c4dDrPH8PAV5DOITKkO6MkUX8ey4kiIzgw1MsZA7frju5xu9Cm9+Hhn8D5kmoQVPTsZaP+Eyt1R2rA1HfQ15ovuD127wmO8jjQ1MEqyBpUImraYVgk8UHZziK+UFh8WSEY+GqCGazg21+tpi3IDvXJF3jnPXRnithNcikIVdQBwFsLgYl0pcU39kEBetUBOM/aZ6/XyWEnKC9+nXU4yeKowKqC9KdmXONa86F7JS5f1jjWw0/ig3R1n+UMIxAvUTzXoQKk+4E+NFtrZzavDkHEqQarme6q+0mt/8BTRrNnwf6/EMAAAAASUVORK5CYII=";
|
|
18593
|
-
let iconUrl = config.BMLTPlugin_images
|
|
18605
|
+
let iconUrl = config.BMLTPlugin_images
|
|
18606
|
+
? config.BMLTPlugin_images + "/NAMarker.png"
|
|
18594
18607
|
: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAgCAYAAAD5VeO1AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAABIAAAASABGyWs+AAAACXZ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kYXRlADIwMTEtMDEtMDZUMDM6MjQ6MTMrMDA6MDDEp9A0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAABJRU5ErkJggg==";
|
|
18595
18608
|
|
|
18596
|
-
|
|
18609
|
+
var g_icon_image_single = L.icon({
|
|
18597
18610
|
iconUrl: iconUrl,
|
|
18598
18611
|
shadowUrl: shadowUrl,
|
|
18599
|
-
iconSize:
|
|
18600
|
-
shadowSize:
|
|
18601
|
-
iconAnchor:
|
|
18602
|
-
shadowAnchor: [12, 32],
|
|
18603
|
-
popupAnchor:
|
|
18612
|
+
iconSize: [23, 32], // size of the icon
|
|
18613
|
+
shadowSize: [43, 32], // size of the shadow
|
|
18614
|
+
iconAnchor: [12, 32], // point of the icon which will correspond to marker's location
|
|
18615
|
+
shadowAnchor: [12, 32], // the same for the shadow
|
|
18616
|
+
popupAnchor: [0, -32], // point from which the popup should open relative to the iconAnchor
|
|
18604
18617
|
});
|
|
18605
|
-
iconUrl = config.BMLTPlugin_images
|
|
18618
|
+
iconUrl = config.BMLTPlugin_images
|
|
18619
|
+
? config.BMLTPlugin_images + "/NAMarkerG.png"
|
|
18606
18620
|
: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAhCAYAAAAyCTAQAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAADTRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMi4yLWMwNjMgNTMuMzUyNjI0LCAyMDA4LzA3LzMwLTE4OjA1OjQxICAgICAgICAiPgogPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L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6Q2lBZHJFeHRhZHI9IiIKICAgIElwdGM0eG1wQ29yZTpDaUFkckNpdHk9IiIKICAgIElwdGM0eG1wQ29yZTpDaUFkclJlZ2lvbj0iIgogICAgSXB0YzR4bXBDb3JlOkNpQWRyUGNvZGU9IiIKICAgIElwdGM0eG1wQ29yZTpDaUFkckN0cnk9IiIKICAgIElwdGM0eG1wQ29yZTpDaVRlbFdvcms9IiIKICAgIElwdGM0eG1wQ29yZTpDaUVtYWlsV29yaz0iIgogICAgSXB0YzR4bXBDb3JlOkNpVXJsV29yaz0iIi8+CiAgPC9yZGY6RGVzY3JpcHRpb24+CiA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgCjw/eHBhY2tldCBlbmQ9InciPz7HRMckAAAG20lEQVR42qyWeXBV9RXHP/fet+QlL+QlPAgkeZIFxAWxqWBVagVKYtQUUTvtSIeKLYNY24pY/MPptA50nI4OnXbGzojVoSLNdFGJ6ci0MRSo1BZcILgQgglGSdJsL9vL2+679/bcBasVpON4Zn7v3d/2Pef3Pcvvp/DpskjaLQFYmq9QLf++nIWVhP40vCJzLdJekpY722blHKBXBWHzfJUV8xWmlcmqAhn02S2Uh/aFK+jr7+d4V3f2qMXrcXhMpprOB273H7oUHlyu4qsyoVCDoOEC25JfNp3SHU0YeXkkjrXT3bybF/fuoxVe0OEuWTJwNnBFOk80BH3r6qPTKRkdZXrZLHxDw4S/ch2hK69CP3qE9P42ZjW/iFVWgS47MokpRvf8mbZt23hiaOTIGDQKVh/81yBbHrxeYd3q9XdRvXQZxb2nCc6ejXGqC+3yWgLL60g17WS4dQ8BVUPNz0d99TCB8nKC31rDytgFhDbfX/to38DT4pObBC+resALL4GfrLrtVmrWfpeKq68hVFsLlmifOx+tdDbW5AToOoppOsfVCsJkWnYzeucd5IkBkeuWUbdlK98IBVfI9AYb1AGXKNh8Y2UsULX2O0SLIyiWhRopcTkzDBRVEc68ZoPbTdPwRaNMHXub+N3rCQ70U1R3PatW3848+JHsLLHBay6EGx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T7vDswxOPwF7kCf/ZhVbRFEvrhPQrxhDhSl2ZqbnTgVf2x3zehHzwgjpbJdBpFSrBd0+3EMGXIEtaaNbJyWTyEExIOgx+Te+/w8csGAQ4Lcp5dPs5cV7I8kC8xnM7IJTKLQHSG+KOTTCqDKSYeEvq26vxCPHG/t+UT4L6IQusDfpbNsy9lURBQ3OPZdcqOf9vJlu5mvCXJlpPxUZn/sc7xbosluF0+RosnuTGLu5/NMTYhwGl7wPLosVxgvNtFERoM6RsC/ieDnAD/4KPAZwO35cQbJhvbDBc84xFoehlquXfJh0oPy0SLwSPyufd/XxPaOd4t7V0WF9So1EY93jXF3al4inLeG2Jbjr+Pw/qzPYzUcz21JE3u+12Oo/+2nG+pci6o4X1n5X+nwYjUkA3u8k+K+ilPuYkeizt3G0wk7N2KC6p7dOwVTfsMNsnn8XO93NTzvBWPHjDZ9A8BSlmeAmniPHYZPGUbfybs+KxSIlhb/Fi/DWDtlHal6lgb5XOS6BUq3T8XBWt8djJTx+cpcvbGixVycqH/6jwv5M8sW6TF/t/F/xFgADsAxARvscdVAAAAAElFTkSuQmCC";
|
|
18607
18621
|
var g_icon_image_multi = L.icon({
|
|
18608
18622
|
iconUrl: iconUrl,
|
|
18609
18623
|
shadowUrl: shadowUrl,
|
|
18610
|
-
iconSize:
|
|
18611
|
-
shadowSize:
|
|
18612
|
-
iconAnchor:
|
|
18613
|
-
shadowAnchor: [12, 32],
|
|
18614
|
-
popupAnchor:
|
|
18624
|
+
iconSize: [23, 32], // size of the icon
|
|
18625
|
+
shadowSize: [43, 32], // size of the shadow
|
|
18626
|
+
iconAnchor: [12, 32], // point of the icon which will correspond to marker's location
|
|
18627
|
+
shadowAnchor: [12, 32], // the same for the shadow
|
|
18628
|
+
popupAnchor: [0, -32], // point from which the popup should open relative to the iconAnchor
|
|
18615
18629
|
});
|
|
18616
|
-
iconUrl = config.BMLTPlugin_images
|
|
18630
|
+
iconUrl = config.BMLTPlugin_images
|
|
18631
|
+
? config.BMLTPlug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+MNxASWRQULuxP7UHI1aWNOLBweSb2JvYjeP7T8A6xX9CqJ2X6nlKSiJWmJpbeCHci06zEymedPiUiY4hM+GoZZoWdxVTsRmzKXhJev7hyHF0FTrRne/GwPkB6G/wf1NN//VX6jkZ84J1VFrvr1MjTJNEpXRrJv3VyPX9qb879UYEWrdLlFQ5+JnfzQ9bE94jf9jUecZ8nr6yrj6JMnaCl6SJ0v1yLYPIC0mWHHDBdZ7ncbbQhkHjItqLp3Em/zHezTbBtii4XILZYqOwx9hOm7x+6fi8+gxVpAlSY+Bpz93KdEL30QJVuuyBKFyiOhrkpm1b8NA5KllUKYeB3Av6WavXXkQr0+OdoaLZxNcJO8MfU+Yyr+SRHOIkNubB2Nki4qCIF6ZLQHGfaRonrU00a78STB7nWpG0B/lFuqc8JE+7RI+w/Aon+Rir9Gs0Ex27jBfp/5+vZkK+xr2l1eqxa+W4tICJw0r+0nrXPypNBG5/QfejV4z3eBY/Gu9iJF/zrmWiye7HMqInSgS5G7iHKJyzQgcKO82k2W6vpdnAeBDy11zlSjzLP6Tav1GeReKUxwI7Rof+roXiP82naPbOtW5u8nXuihetz/gQm8QelKPsMoLVR3S8arxGwf/VGDD/JuCitdh9fKYyg82nU8ulY5dxzurhQh15fAut3HMT6w4+p3LvesWg+X34VpuEFcosZkoBbL/ODfkbt1/SiP2/i/8nwAAca+6jkhGCHgAAAABJRU5ErkJggg==";
|
|
18618
18633
|
var g_icon_image_selected = L.icon({
|
|
18619
18634
|
iconUrl: iconUrl,
|
|
18620
18635
|
shadowUrl: shadowUrl,
|
|
18621
|
-
iconSize:
|
|
18622
|
-
shadowSize:
|
|
18623
|
-
iconAnchor:
|
|
18624
|
-
shadowAnchor: [12, 32],
|
|
18625
|
-
popupAnchor:
|
|
18626
|
-
|
|
18627
|
-
iconUrl = config.BMLTPlugin_images
|
|
18636
|
+
iconSize: [23, 32], // size of the icon
|
|
18637
|
+
shadowSize: [43, 32], // size of the shadow
|
|
18638
|
+
iconAnchor: [12, 32], // point of the icon which will correspond to marker's location
|
|
18639
|
+
shadowAnchor: [12, 32], // the same for the shadow
|
|
18640
|
+
popupAnchor: [12, -32], // point from which the popup should open relative to the iconAnchor
|
|
18641
|
+
});
|
|
18642
|
+
iconUrl = config.BMLTPlugin_images
|
|
18643
|
+
? config.BMLTPlugin_images + "/SearchPoint.png"
|
|
18628
18644
|
: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAhCAYAAAAyCTAQAAAABGdBTUEAALGPC/xhBQAAAHhlWElmTU0AKgAAAAgABAESAAMAAAABAAEAAAEaAAUAAAABAAAAPgEbAAUAAAABAAAARodpAAQAAAABAAAATgAAAAAAAABIAAAAAQAAAEgAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAAABegAwAEAAAAAQAAACEAAAAAZxgyOAAAAAlwSFlzAAALEwAACxMBAJqcGAAAApJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDYuMC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iCiAgICAgICAgICAgIHhtbG5zOmV4aWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vZXhpZi8xLjAvIj4KICAgICAgICAgPHRpZmY6WVJlc29sdXRpb24+NzI8L3RpZmY6WVJlc29sdXRpb24+CiAgICAgICAgIDx0aWZmOlhSZXNvbHV0aW9uPjcyPC90aWZmOlhSZXNvbHV0aW9uPgogICAgICAgICA8dGlmZjpPcmllbnRhdGlvbj4xPC90aWZmOk9yaWVudGF0aW9uPgogICAgICAgICA8ZX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gwYMh0HK+rKysAc75nDW0+IBNL8diFKG7UamFiCAYhjTJJ5hvei9oGGNUi83NzZUwWu0tHuM1z6z3nBtu8N2Pw9HgPxfdzw+VqAFMGwaXDQyT+fDgh/sqkvgtNvg/iw2TnpuxHpwfiYBol3oQfjZUkQa+6bmJgB2PuUCS+QPeBel9hfPtvIjxFpiLjcD5nQYmATABvj8APdHk3eu6oQNdchzA30FFtTjr8d7B46/xPnB6OAwDblBThBlE/hGNQsWugI5f8fwZUAuYdOYdr2nin8C5xwtudIY+ACYAPCcoKMgBY/wXrwnd8Dz2+7zn/gaM7+8F577hH7+NA6AlH54nw9thAH+NmqjH/oagvPhfBsE57OD9M5R/N1rv91iHm69vjHtf/9/DGIBi4nH9S8y3/2j+G9yfXNblr8O6ITwAAAAASUVORK5CYII=";
|
|
18629
18645
|
var g_icon_image_searchpoimt = L.icon({
|
|
18630
18646
|
iconUrl: iconUrl,
|
|
18631
18647
|
shadowUrl: shadowUrl,
|
|
18632
|
-
iconSize:
|
|
18633
|
-
shadowSize:
|
|
18634
|
-
iconAnchor:
|
|
18635
|
-
shadowAnchor: [12, 32],
|
|
18636
|
-
popupAnchor:
|
|
18637
|
-
|
|
18638
|
-
|
|
18648
|
+
iconSize: [23, 32], // size of the icon
|
|
18649
|
+
shadowSize: [43, 32], // size of the shadow
|
|
18650
|
+
iconAnchor: [12, 32], // point of the icon which will correspond to marker's location
|
|
18651
|
+
shadowAnchor: [12, 32], // the same for the shadow
|
|
18652
|
+
popupAnchor: [12, -32], // point from which the popup should open relative to the iconAnchor
|
|
18653
|
+
});
|
|
18654
|
+
var gAllMarkers = []; ///< Holds all the markers.
|
|
18639
18655
|
var gMainMap;
|
|
18640
18656
|
var gTileLayer;
|
|
18641
18657
|
var gClusterLayer = null;
|
|
18642
18658
|
var gSearchPointMarker = false;
|
|
18643
18659
|
var gOpenMarker = false;
|
|
18644
18660
|
var gDiv = null;
|
|
18645
|
-
|
|
18646
|
-
if (!
|
|
18647
|
-
|
|
18648
|
-
if (
|
|
18649
|
-
gDiv.style.height =
|
|
18650
|
-
gDiv.style.marginBottom =
|
|
18661
|
+
function createMap(inDiv, inCenter, inHidden = false) {
|
|
18662
|
+
if (!inCenter) return null;
|
|
18663
|
+
gDiv = inDiv;
|
|
18664
|
+
if (inHidden) {
|
|
18665
|
+
gDiv.style.height = "auto";
|
|
18666
|
+
gDiv.style.marginBottom = "10px";
|
|
18651
18667
|
gMainMap = null;
|
|
18652
18668
|
return gDiv;
|
|
18653
18669
|
}
|
|
18654
18670
|
myOptions = {
|
|
18655
|
-
|
|
18656
|
-
|
|
18657
|
-
|
|
18658
|
-
|
|
18671
|
+
minZoom: config.minZoom,
|
|
18672
|
+
maxZoom: config.maxZoom,
|
|
18673
|
+
doubleClickZoom: false,
|
|
18674
|
+
scrollWheelZoom: false,
|
|
18659
18675
|
};
|
|
18660
18676
|
myOptions = Object.assign(myOptions, {
|
|
18661
|
-
|
|
18662
|
-
|
|
18663
|
-
|
|
18677
|
+
center: new L.latLng(inCenter.latitude, inCenter.longitude),
|
|
18678
|
+
zoom: inCenter.zoom,
|
|
18679
|
+
});
|
|
18680
|
+
var pixel_width = inDiv.offsetWidth;
|
|
18664
18681
|
if (pixel_width == 0) {
|
|
18665
18682
|
pixel_width = inDiv.parentNode.offsetWidth;
|
|
18666
18683
|
}
|
|
18667
|
-
var
|
|
18684
|
+
var pixel_height = parseInt(
|
|
18685
|
+
jQuery(inDiv).css("height").replace("px", ""),
|
|
18686
|
+
);
|
|
18668
18687
|
if (pixel_height == 0) {
|
|
18669
18688
|
pixel_height = pixel_width;
|
|
18670
18689
|
}
|
|
18671
|
-
if (pixel_height > pixel_width
|
|
18672
|
-
inDiv.
|
|
18690
|
+
if (pixel_height > pixel_width) {
|
|
18691
|
+
jQuery(inDiv).css("height", pixel_width + "px");
|
|
18673
18692
|
}
|
|
18674
|
-
|
|
18675
|
-
|
|
18676
|
-
|
|
18677
|
-
|
|
18693
|
+
gMainMap = new L.Map(inDiv, myOptions);
|
|
18694
|
+
gTileLayer = L.tileLayer(config.tileUrl, config.tileOptions).addTo(
|
|
18695
|
+
gMainMap,
|
|
18696
|
+
);
|
|
18697
|
+
gMainMap.zoomControl.setPosition("bottomright");
|
|
18698
|
+
gMainMap.on("moveend", function () {
|
|
18678
18699
|
gTileLayer.redraw();
|
|
18679
18700
|
});
|
|
18680
|
-
|
|
18681
|
-
|
|
18682
|
-
|
|
18701
|
+
return gMainMap;
|
|
18702
|
+
}
|
|
18703
|
+
function addListener(ev, f, once) {
|
|
18683
18704
|
if (!gMainMap) return;
|
|
18684
|
-
if (ev==
|
|
18685
|
-
ev =
|
|
18705
|
+
if (ev == "idle") {
|
|
18706
|
+
ev = "moveend";
|
|
18686
18707
|
}
|
|
18687
|
-
if (ev==
|
|
18688
|
-
ev =
|
|
18708
|
+
if (ev == "dragstart") {
|
|
18709
|
+
ev = "movestart";
|
|
18689
18710
|
}
|
|
18690
|
-
if (ev==
|
|
18691
|
-
ev =
|
|
18711
|
+
if (ev == "dragend") {
|
|
18712
|
+
ev = "moveend";
|
|
18692
18713
|
}
|
|
18693
|
-
|
|
18714
|
+
if (once) {
|
|
18694
18715
|
gMainMap.once(ev, f);
|
|
18695
18716
|
} else {
|
|
18696
18717
|
gMainMap.on(ev, f);
|
|
18697
18718
|
}
|
|
18698
|
-
return {
|
|
18699
|
-
|
|
18719
|
+
return { event: ev, f: f };
|
|
18720
|
+
}
|
|
18700
18721
|
function removeListener(o) {
|
|
18701
18722
|
if (!gMainMap) return;
|
|
18702
18723
|
gMainMap.off(o.event, o.f);
|
|
18703
18724
|
}
|
|
18704
|
-
function flyToFixedZoom(position, zoomLevel, extra=null) {
|
|
18725
|
+
function flyToFixedZoom(position, zoomLevel, extra = null) {
|
|
18705
18726
|
if (!gMainMap) return;
|
|
18706
18727
|
|
|
18707
18728
|
const latlng = L.latLng(position.lat, position.lng);
|
|
18708
|
-
|
|
18729
|
+
gMainMap.once("moveend", function (ev) {
|
|
18709
18730
|
if (gMainMap.getZoom() != zoomLevel) {
|
|
18710
|
-
gMainMap.once(
|
|
18731
|
+
gMainMap.once("zoomend", function () {
|
|
18711
18732
|
gMainMap.invalidateSize();
|
|
18712
18733
|
if (extra) {
|
|
18713
|
-
gMainMap.once(
|
|
18734
|
+
gMainMap.once("load moveend", extra);
|
|
18714
18735
|
}
|
|
18715
18736
|
});
|
|
18716
18737
|
gMainMap.setZoom(zoomLevel);
|
|
@@ -18720,12 +18741,15 @@ function MapDelegate(config) {
|
|
|
18720
18741
|
});
|
|
18721
18742
|
gMainMap.flyTo(latlng, zoomLevel);
|
|
18722
18743
|
}
|
|
18723
|
-
function clearAllMarkers
|
|
18724
|
-
{
|
|
18744
|
+
function clearAllMarkers() {
|
|
18725
18745
|
if (!gMainMap) return;
|
|
18726
|
-
gAllMarkers &&
|
|
18746
|
+
gAllMarkers &&
|
|
18747
|
+
gAllMarkers.forEach((m) => {
|
|
18748
|
+
m.marker.closePopup();
|
|
18749
|
+
gMainMap.removeLayer(m.marker);
|
|
18750
|
+
});
|
|
18727
18751
|
gAllMarkers = [];
|
|
18728
|
-
}
|
|
18752
|
+
}
|
|
18729
18753
|
function getZoom() {
|
|
18730
18754
|
if (!gMainMap) return null;
|
|
18731
18755
|
return gMainMap.getZoom();
|
|
@@ -18735,286 +18759,410 @@ function MapDelegate(config) {
|
|
|
18735
18759
|
}
|
|
18736
18760
|
function webMercatorToLatLng(point, zoom) {
|
|
18737
18761
|
const latLng = croutonMap.webMercatorToLatLng(point, zoom);
|
|
18738
|
-
|
|
18762
|
+
return L.latLng(latLng.lat, latLng.lng);
|
|
18739
18763
|
}
|
|
18740
18764
|
function calculateBounds(center, zoom, width, height) {
|
|
18741
18765
|
const centerPoint = croutonMap.latLngToWebMercator(center, zoom);
|
|
18742
|
-
const northeastWebMercator = {
|
|
18743
|
-
|
|
18744
|
-
|
|
18745
|
-
|
|
18746
|
-
|
|
18747
|
-
|
|
18748
|
-
|
|
18749
|
-
|
|
18750
|
-
|
|
18766
|
+
const northeastWebMercator = {
|
|
18767
|
+
x: centerPoint.x - width / 2,
|
|
18768
|
+
y: centerPoint.y - height / 2,
|
|
18769
|
+
};
|
|
18770
|
+
const southwestWebMercator = {
|
|
18771
|
+
x: centerPoint.x + width / 2,
|
|
18772
|
+
y: centerPoint.y + height / 2,
|
|
18773
|
+
};
|
|
18774
|
+
return L.latLngBounds(
|
|
18775
|
+
webMercatorToLatLng(southwestWebMercator, zoom),
|
|
18776
|
+
webMercatorToLatLng(northeastWebMercator, zoom),
|
|
18777
|
+
);
|
|
18778
|
+
}
|
|
18779
|
+
function withinInscribedCircle(center, point, zoom, width, height) {
|
|
18780
|
+
const centerPoint = croutonMap.latLngToWebMercator(center, zoom);
|
|
18781
|
+
const meetingPoint = croutonMap.latLngToWebMercator(point, zoom);
|
|
18782
|
+
const radius = Math.min(width, height) / 2;
|
|
18783
|
+
const distance = Math.sqrt(
|
|
18784
|
+
Math.pow(centerPoint.x - meetingPoint.x, 2) +
|
|
18785
|
+
Math.pow(centerPoint.y - meetingPoint.y, 2),
|
|
18786
|
+
);
|
|
18787
|
+
return distance <= radius;
|
|
18788
|
+
}
|
|
18789
|
+
function calcOffsetWidth(gDiv) {
|
|
18790
|
+
let ret = gDiv.offsetWidth;
|
|
18791
|
+
if (ret === 0) ret = gDiv.parentElement.offsetWidth;
|
|
18792
|
+
return ret;
|
|
18793
|
+
}
|
|
18751
18794
|
function calculateBoundsFromCenterAndZoom(center, zoomLevel) {
|
|
18752
|
-
|
|
18753
|
-
const mapHeight = parseInt(
|
|
18754
|
-
|
|
18755
|
-
|
|
18756
|
-
|
|
18795
|
+
const mapWidth = calcOffsetWidth(gDiv);
|
|
18796
|
+
const mapHeight = parseInt(
|
|
18797
|
+
jQuery(gDiv).css("height").replace("px", ""),
|
|
18798
|
+
);
|
|
18799
|
+
return calculateBounds(center, zoomLevel, mapWidth, mapHeight);
|
|
18800
|
+
}
|
|
18801
|
+
function getZoomAdjust(
|
|
18802
|
+
filterMeetings,
|
|
18803
|
+
zoomLevel = gMainMap.getZoom(),
|
|
18804
|
+
center = gMainMap.getCenter(),
|
|
18805
|
+
closestMeeting = null,
|
|
18806
|
+
) {
|
|
18757
18807
|
if (!gMainMap) return 12;
|
|
18808
|
+
if (config.map_search && isFilterVisible()) return zoomLevel;
|
|
18758
18809
|
const mapWidth = calcOffsetWidth(gDiv);
|
|
18759
|
-
const mapHeight = parseInt(
|
|
18760
|
-
|
|
18761
|
-
|
|
18810
|
+
const mapHeight = parseInt(
|
|
18811
|
+
jQuery(gDiv).css("height").replace("px", ""),
|
|
18812
|
+
);
|
|
18813
|
+
let ret = zoomLevel;
|
|
18762
18814
|
var bounds = calculateBounds(center, ret, mapWidth, mapHeight);
|
|
18763
|
-
|
|
18764
|
-
|
|
18765
|
-
|
|
18815
|
+
if (closestMeeting) {
|
|
18816
|
+
while (
|
|
18817
|
+
!withinInscribedCircle(
|
|
18818
|
+
center,
|
|
18819
|
+
closestMeeting,
|
|
18820
|
+
ret,
|
|
18821
|
+
mapWidth,
|
|
18822
|
+
mapHeight,
|
|
18823
|
+
) &&
|
|
18824
|
+
ret > config.minZoom
|
|
18825
|
+
) {
|
|
18826
|
+
ret -= 1;
|
|
18827
|
+
}
|
|
18828
|
+
} else {
|
|
18829
|
+
while (
|
|
18830
|
+
filterMeetings(bounds, center).length == 0 &&
|
|
18831
|
+
ret > config.minZoom
|
|
18832
|
+
) {
|
|
18833
|
+
ret -= 1;
|
|
18834
|
+
bounds = calculateBounds(center, ret, mapWidth, mapHeight);
|
|
18835
|
+
}
|
|
18836
|
+
}
|
|
18837
|
+
// If we didn't zoom out, zoom in if it doesn't lose meetings
|
|
18838
|
+
if (ret == zoomLevel) {
|
|
18839
|
+
let meetingsInBounds = filterMeetings(bounds, center).length;
|
|
18840
|
+
if (meetingsInBounds > 0) {
|
|
18841
|
+
do {
|
|
18842
|
+
ret = ret + 1;
|
|
18843
|
+
if (ret > config.maxZoom) break;
|
|
18844
|
+
var bounds = calculateBounds(
|
|
18845
|
+
center,
|
|
18846
|
+
ret,
|
|
18847
|
+
mapWidth,
|
|
18848
|
+
mapHeight,
|
|
18849
|
+
);
|
|
18850
|
+
} while (
|
|
18851
|
+
filterMeetings(bounds, center).length === meetingsInBounds
|
|
18852
|
+
);
|
|
18853
|
+
ret = ret - 1;
|
|
18854
|
+
}
|
|
18766
18855
|
}
|
|
18767
18856
|
return ret;
|
|
18768
18857
|
}
|
|
18769
18858
|
function markSearchPoint(inCoords) {
|
|
18770
18859
|
if (!gMainMap) return;
|
|
18771
18860
|
if (gSearchPointMarker) gSearchPointMarker.remove();
|
|
18772
|
-
gSearchPointMarker = L.marker(inCoords, {
|
|
18861
|
+
gSearchPointMarker = L.marker(inCoords, {
|
|
18862
|
+
icon: g_icon_image_searchpoimt,
|
|
18863
|
+
});
|
|
18773
18864
|
gSearchPointMarker.addTo(gMainMap);
|
|
18774
18865
|
}
|
|
18775
|
-
function createMarker
|
|
18776
|
-
|
|
18777
|
-
|
|
18778
|
-
|
|
18779
|
-
{
|
|
18780
|
-
|
|
18781
|
-
|
|
18782
|
-
|
|
18783
|
-
var marker = L.marker(inCoords, {icon: in_main_icon, title: in_title})
|
|
18784
|
-
marker.isMulti = multi;
|
|
18785
|
-
if (gClusterLayer) gClusterLayer.addLayer(marker);
|
|
18786
|
-
else marker.addTo(gMainMap);
|
|
18866
|
+
function createMarker(
|
|
18867
|
+
inCoords, ///< The long/lat for the marker.
|
|
18868
|
+
multi, ///< Flag if marker has multiple meetings
|
|
18869
|
+
in_title, ///< The tooltip
|
|
18870
|
+
) {
|
|
18871
|
+
if (!gMainMap) return;
|
|
18872
|
+
var in_main_icon = multi ? g_icon_image_multi : g_icon_image_single;
|
|
18787
18873
|
|
|
18788
|
-
|
|
18789
|
-
|
|
18790
|
-
|
|
18791
|
-
|
|
18792
|
-
|
|
18793
|
-
|
|
18794
|
-
|
|
18795
|
-
|
|
18796
|
-
|
|
18797
|
-
|
|
18798
|
-
|
|
18799
|
-
|
|
18800
|
-
|
|
18801
|
-
|
|
18802
|
-
|
|
18803
|
-
|
|
18804
|
-
|
|
18805
|
-
|
|
18806
|
-
|
|
18807
|
-
|
|
18808
|
-
|
|
18874
|
+
var marker = L.marker(inCoords, {
|
|
18875
|
+
icon: in_main_icon,
|
|
18876
|
+
title: in_title,
|
|
18877
|
+
});
|
|
18878
|
+
marker.isMulti = multi;
|
|
18879
|
+
if (gClusterLayer) gClusterLayer.addLayer(marker);
|
|
18880
|
+
else marker.addTo(gMainMap);
|
|
18881
|
+
|
|
18882
|
+
return marker;
|
|
18883
|
+
}
|
|
18884
|
+
function bindPopup(marker, in_html, in_ids, openedMarker) {
|
|
18885
|
+
if (!in_html) return;
|
|
18886
|
+
let highlightRow = function (target) {
|
|
18887
|
+
const id = target.id.split("-")[1];
|
|
18888
|
+
gOpenMarker = id;
|
|
18889
|
+
jQuery(".bmlt-data-row > td").removeClass("rowHighlight");
|
|
18890
|
+
jQuery("#meeting-data-row-" + id + " > td").addClass(
|
|
18891
|
+
"rowHighlight",
|
|
18892
|
+
);
|
|
18893
|
+
if (typeof crouton != "undefined") crouton.dayTabFromId(id);
|
|
18894
|
+
};
|
|
18895
|
+
marker.bindPopup(in_html);
|
|
18896
|
+
marker.on("popupopen", function (e) {
|
|
18897
|
+
if (
|
|
18898
|
+
openedMarker &&
|
|
18899
|
+
marker
|
|
18900
|
+
.getPopup()
|
|
18901
|
+
.getContent()
|
|
18902
|
+
.includes("panel-" + openedMarker)
|
|
18903
|
+
) {
|
|
18904
|
+
// I want to just do this:
|
|
18905
|
+
//jQuery("#panel-"+openedMarker).prop("checked", true);
|
|
18906
|
+
// But for some reason, leaflet makes a copy of the popup, so the ID is not unique....
|
|
18907
|
+
jQuery("input[type=radio][name=panel]")
|
|
18908
|
+
.filter(function () {
|
|
18909
|
+
return (
|
|
18910
|
+
jQuery(this).attr("id") == "panel-" + openedMarker
|
|
18911
|
+
);
|
|
18912
|
+
})
|
|
18913
|
+
.each(function (index, value) {
|
|
18914
|
+
jQuery(this).prop("checked", true);
|
|
18915
|
+
});
|
|
18916
|
+
}
|
|
18917
|
+
marker.setIcon(g_icon_image_selected);
|
|
18918
|
+
gMainMap.on("zoomstart", function () {
|
|
18919
|
+
marker.closePopup();
|
|
18920
|
+
});
|
|
18921
|
+
jQuery("input[type=radio][name=panel]:checked").each(
|
|
18922
|
+
function (index, target) {
|
|
18923
|
+
highlightRow(target);
|
|
18924
|
+
},
|
|
18925
|
+
);
|
|
18926
|
+
jQuery("input[type=radio][name=panel]").change(function () {
|
|
18927
|
+
highlightRow(this);
|
|
18809
18928
|
});
|
|
18810
|
-
}
|
|
18811
|
-
marker.setIcon(g_icon_image_selected);
|
|
18812
|
-
gMainMap.on('zoomstart',function(){
|
|
18813
|
-
marker.closePopup();
|
|
18814
18929
|
});
|
|
18815
|
-
|
|
18816
|
-
|
|
18817
|
-
|
|
18818
|
-
|
|
18819
|
-
|
|
18820
|
-
|
|
18821
|
-
});
|
|
18822
|
-
marker.on('popupclose', function(e) {
|
|
18823
|
-
gOpenMarker = false;
|
|
18824
|
-
marker.setIcon(marker.isMulti ? g_icon_image_multi : g_icon_image_single);
|
|
18825
|
-
jQuery(".bmlt-data-row > td").removeClass("rowHighlight");
|
|
18826
|
-
});
|
|
18827
|
-
if (openedMarker && in_ids.includes(parseInt(openedMarker))) {
|
|
18828
|
-
marker.openPopup();
|
|
18829
|
-
marker.once('add', function() {
|
|
18830
|
-
if (!marker.isPopupOpen()) marker.openPopup();
|
|
18930
|
+
marker.on("popupclose", function (e) {
|
|
18931
|
+
gOpenMarker = false;
|
|
18932
|
+
marker.setIcon(
|
|
18933
|
+
marker.isMulti ? g_icon_image_multi : g_icon_image_single,
|
|
18934
|
+
);
|
|
18935
|
+
jQuery(".bmlt-data-row > td").removeClass("rowHighlight");
|
|
18831
18936
|
});
|
|
18937
|
+
if (openedMarker && in_ids.includes(parseInt(openedMarker))) {
|
|
18938
|
+
marker.openPopup();
|
|
18939
|
+
marker.once("add", function () {
|
|
18940
|
+
if (!marker.isPopupOpen()) marker.openPopup();
|
|
18941
|
+
});
|
|
18942
|
+
}
|
|
18943
|
+
gAllMarkers.push({ ids: in_ids, marker: marker });
|
|
18832
18944
|
}
|
|
18833
|
-
|
|
18834
|
-
|
|
18835
|
-
|
|
18836
|
-
|
|
18837
|
-
|
|
18838
|
-
|
|
18839
|
-
|
|
18840
|
-
|
|
18841
|
-
|
|
18842
|
-
|
|
18843
|
-
|
|
18844
|
-
|
|
18845
|
-
|
|
18846
|
-
|
|
18847
|
-
|
|
18848
|
-
|
|
18849
|
-
|
|
18850
|
-
|
|
18851
|
-
|
|
18852
|
-
|
|
18853
|
-
|
|
18854
|
-
|
|
18855
|
-
|
|
18856
|
-
|
|
18857
|
-
|
|
18858
|
-
|
|
18859
|
-
|
|
18860
|
-
|
|
18861
|
-
|
|
18862
|
-
onAdd: function (map) {
|
|
18945
|
+
function addMarkerCallback(marker, cb, in_ids) {
|
|
18946
|
+
if (cb)
|
|
18947
|
+
marker.on("click", function () {
|
|
18948
|
+
cb(in_ids);
|
|
18949
|
+
});
|
|
18950
|
+
gAllMarkers.push({ ids: in_ids, marker: marker });
|
|
18951
|
+
}
|
|
18952
|
+
function getOpenMarker() {
|
|
18953
|
+
return gOpenMarker;
|
|
18954
|
+
}
|
|
18955
|
+
function openMarker(id) {
|
|
18956
|
+
if (!gMainMap) return;
|
|
18957
|
+
marker = gAllMarkers.find((m) => m.ids.includes(id));
|
|
18958
|
+
if (marker) {
|
|
18959
|
+
marker.marker.openPopup();
|
|
18960
|
+
jQuery("#panel-" + id).prop("checked", true);
|
|
18961
|
+
if (typeof crouton != "undefined") crouton.dayTabFromId(id);
|
|
18962
|
+
}
|
|
18963
|
+
jQuery(".bmlt-data-row > td").removeClass("rowHighlight");
|
|
18964
|
+
jQuery("#meeting-data-row-" + id + " > td").addClass("rowHighlight");
|
|
18965
|
+
}
|
|
18966
|
+
function addControl(div, pos, cb) {
|
|
18967
|
+
if (!div) return;
|
|
18968
|
+
if (!gMainMap) {
|
|
18969
|
+
gDiv.appendChild(div);
|
|
18970
|
+
return;
|
|
18971
|
+
}
|
|
18972
|
+
var ControlClass = L.Control.extend({
|
|
18973
|
+
onAdd: function (map) {
|
|
18863
18974
|
return div;
|
|
18864
18975
|
},
|
|
18865
|
-
onRemove: function(map) {
|
|
18976
|
+
onRemove: function (map) {
|
|
18866
18977
|
// Nothing to do here
|
|
18867
|
-
}
|
|
18978
|
+
},
|
|
18868
18979
|
});
|
|
18869
|
-
var controlConstructor = function(opts) {
|
|
18980
|
+
var controlConstructor = function (opts) {
|
|
18870
18981
|
return new ControlClass(opts);
|
|
18871
|
-
}
|
|
18982
|
+
};
|
|
18872
18983
|
if (cb) {
|
|
18873
18984
|
const observer = new MutationObserver(function (records) {
|
|
18874
|
-
records.forEach(record => {
|
|
18875
|
-
record.addedNodes.forEach(n => {
|
|
18985
|
+
records.forEach((record) => {
|
|
18986
|
+
record.addedNodes.forEach((n) => {
|
|
18876
18987
|
if (n === div) {
|
|
18877
18988
|
observer.disconnect();
|
|
18878
18989
|
cb();
|
|
18879
18990
|
}
|
|
18880
18991
|
});
|
|
18881
|
-
})
|
|
18992
|
+
});
|
|
18882
18993
|
});
|
|
18883
|
-
observer.observe(document, {childList: true, subtree: true});
|
|
18994
|
+
observer.observe(document, { childList: true, subtree: true });
|
|
18884
18995
|
}
|
|
18885
18996
|
controlConstructor({ position: pos }).addTo(gMainMap);
|
|
18886
|
-
|
|
18887
|
-
|
|
18997
|
+
}
|
|
18998
|
+
// Low level GeoCoding
|
|
18888
18999
|
function getJSON(url, params, callback) {
|
|
18889
19000
|
var xmlHttp = new XMLHttpRequest();
|
|
18890
|
-
xmlHttp.onreadystatechange = function() {
|
|
18891
|
-
|
|
18892
|
-
|
|
18893
|
-
|
|
18894
|
-
|
|
18895
|
-
|
|
18896
|
-
|
|
18897
|
-
|
|
18898
|
-
|
|
18899
|
-
|
|
18900
|
-
|
|
18901
|
-
|
|
18902
|
-
|
|
18903
|
-
|
|
18904
|
-
|
|
18905
|
-
|
|
18906
|
-
|
|
18907
|
-
|
|
18908
|
-
|
|
18909
|
-
|
|
18910
|
-
|
|
18911
|
-
|
|
18912
|
-
|
|
18913
|
-
|
|
18914
|
-
|
|
18915
|
-
}
|
|
19001
|
+
xmlHttp.onreadystatechange = function () {
|
|
19002
|
+
if (xmlHttp.readyState !== 4) {
|
|
19003
|
+
return;
|
|
19004
|
+
}
|
|
19005
|
+
var message;
|
|
19006
|
+
if (xmlHttp.status !== 200 && xmlHttp.status !== 304) {
|
|
19007
|
+
message = "";
|
|
19008
|
+
} else if (typeof xmlHttp.response === "string") {
|
|
19009
|
+
// IE doesn't parse JSON responses even with responseType: 'json'.
|
|
19010
|
+
try {
|
|
19011
|
+
message = JSON.parse(xmlHttp.response);
|
|
19012
|
+
} catch (e) {
|
|
19013
|
+
// Not a JSON response
|
|
19014
|
+
message = xmlHttp.response;
|
|
19015
|
+
}
|
|
19016
|
+
} else {
|
|
19017
|
+
message = xmlHttp.response;
|
|
19018
|
+
}
|
|
19019
|
+
callback(message);
|
|
19020
|
+
};
|
|
19021
|
+
xmlHttp.open("GET", url + getParamString(params), true);
|
|
19022
|
+
xmlHttp.responseType = "json";
|
|
19023
|
+
xmlHttp.setRequestHeader("Accept", "application/json");
|
|
19024
|
+
xmlHttp.setRequestHeader("Accept", "*/*");
|
|
19025
|
+
xmlHttp.send(null);
|
|
19026
|
+
}
|
|
18916
19027
|
function getParamString(obj, existingUrl, uppercase) {
|
|
18917
19028
|
var params = [];
|
|
18918
19029
|
for (var i in obj) {
|
|
18919
|
-
|
|
18920
|
-
|
|
18921
|
-
|
|
18922
|
-
|
|
18923
|
-
|
|
18924
|
-
|
|
18925
|
-
|
|
19030
|
+
var key = encodeURIComponent(uppercase ? i.toUpperCase() : i);
|
|
19031
|
+
var value = obj[i];
|
|
19032
|
+
if (!L.Util.isArray(value)) {
|
|
19033
|
+
params.push(key + "=" + encodeURIComponent(value));
|
|
19034
|
+
} else {
|
|
19035
|
+
for (var j = 0; j < value.length; j++) {
|
|
19036
|
+
params.push(key + "=" + encodeURIComponent(value[j]));
|
|
19037
|
+
}
|
|
18926
19038
|
}
|
|
18927
|
-
}
|
|
18928
19039
|
}
|
|
18929
|
-
return (
|
|
19040
|
+
return (
|
|
19041
|
+
(!existingUrl || existingUrl.indexOf("?") === -1 ? "?" : "&") +
|
|
19042
|
+
params.join("&")
|
|
19043
|
+
);
|
|
18930
19044
|
}
|
|
18931
19045
|
function geocode(query, params, cb) {
|
|
18932
19046
|
var serviceUrl = config.nominatimUrl;
|
|
18933
|
-
if (!serviceUrl) serviceUrl =
|
|
19047
|
+
if (!serviceUrl) serviceUrl = "https://nominatim.openstreetmap.org/";
|
|
18934
19048
|
getJSON(
|
|
18935
|
-
|
|
18936
|
-
|
|
18937
|
-
|
|
18938
|
-
|
|
18939
|
-
|
|
18940
|
-
|
|
18941
|
-
|
|
18942
|
-
|
|
18943
|
-
|
|
18944
|
-
|
|
18945
|
-
|
|
18946
|
-
|
|
18947
|
-
|
|
18948
|
-
|
|
18949
|
-
|
|
18950
|
-
|
|
18951
|
-
|
|
18952
|
-
|
|
18953
|
-
|
|
18954
|
-
|
|
18955
|
-
|
|
18956
|
-
|
|
18957
|
-
|
|
18958
|
-
|
|
18959
|
-
|
|
18960
|
-
|
|
18961
|
-
|
|
18962
|
-
|
|
18963
|
-
|
|
18964
|
-
|
|
19049
|
+
serviceUrl + "search",
|
|
19050
|
+
L.extend(
|
|
19051
|
+
{
|
|
19052
|
+
q: query,
|
|
19053
|
+
limit: 5,
|
|
19054
|
+
format: "json",
|
|
19055
|
+
addressdetails: 1,
|
|
19056
|
+
layer: "address",
|
|
19057
|
+
},
|
|
19058
|
+
params,
|
|
19059
|
+
),
|
|
19060
|
+
L.bind(function (data) {
|
|
19061
|
+
if (data && data.length) {
|
|
19062
|
+
results = data.reduce(function (carry, d) {
|
|
19063
|
+
if (
|
|
19064
|
+
!carry.find((item) => item.name === d.display_name)
|
|
19065
|
+
) {
|
|
19066
|
+
var bbox = d.boundingbox.map((c) => parseFloat(c));
|
|
19067
|
+
carry.push({
|
|
19068
|
+
name: d.display_name,
|
|
19069
|
+
bbox: L.latLngBounds(
|
|
19070
|
+
[bbox[0], bbox[2]],
|
|
19071
|
+
[bbox[1], bbox[3]],
|
|
19072
|
+
),
|
|
19073
|
+
center: L.latLng(d.lat, d.lon),
|
|
19074
|
+
properties: d,
|
|
19075
|
+
});
|
|
19076
|
+
}
|
|
19077
|
+
return carry;
|
|
19078
|
+
}, []);
|
|
19079
|
+
cb(results);
|
|
19080
|
+
} else {
|
|
19081
|
+
alert(crouton.localization.getWord("address_lookup_fail"));
|
|
19082
|
+
}
|
|
19083
|
+
}, this),
|
|
18965
19084
|
);
|
|
18966
|
-
};
|
|
18967
|
-
function getGeocodingChoices(in_geocode_response) {
|
|
18968
|
-
if (!Array.isArray(in_geocode_response)) return [];
|
|
18969
|
-
return in_geocode_response.map((r) => r.name);
|
|
18970
19085
|
}
|
|
18971
|
-
function
|
|
19086
|
+
function getGeocodingChoices(in_geocode_response) {
|
|
19087
|
+
if (!Array.isArray(in_geocode_response)) return [];
|
|
19088
|
+
return in_geocode_response.map((r) => r.name);
|
|
19089
|
+
}
|
|
19090
|
+
function getZoomAdjustedBounds(
|
|
19091
|
+
center,
|
|
19092
|
+
filterMeetings,
|
|
19093
|
+
zoomLevel,
|
|
19094
|
+
closestMeeting = null,
|
|
19095
|
+
) {
|
|
18972
19096
|
const mapWidth = calcOffsetWidth(gDiv);
|
|
18973
|
-
const mapHeight = parseInt(
|
|
19097
|
+
const mapHeight = parseInt(
|
|
19098
|
+
jQuery(gDiv).css("height").replace("px", ""),
|
|
19099
|
+
);
|
|
18974
19100
|
if (center) {
|
|
18975
|
-
const zoom = getZoomAdjust(
|
|
19101
|
+
const zoom = getZoomAdjust(
|
|
19102
|
+
filterMeetings,
|
|
19103
|
+
zoomLevel,
|
|
19104
|
+
center,
|
|
19105
|
+
closestMeeting,
|
|
19106
|
+
);
|
|
18976
19107
|
const bounds = calculateBounds(center, zoom, mapWidth, mapHeight);
|
|
18977
|
-
const ret = {
|
|
19108
|
+
const ret = { center: center, bounds: bounds, zoom: zoom };
|
|
18978
19109
|
return ret;
|
|
18979
19110
|
} else {
|
|
18980
|
-
alert
|
|
19111
|
+
alert(crouton.localization.getWord("address_lookup_fail"));
|
|
18981
19112
|
return null;
|
|
18982
19113
|
}
|
|
18983
19114
|
}
|
|
18984
|
-
function getGeocodeCenterAndBounds
|
|
18985
|
-
|
|
18986
|
-
|
|
18987
|
-
center: {
|
|
18988
|
-
|
|
18989
|
-
|
|
18990
|
-
|
|
18991
|
-
|
|
18992
|
-
|
|
18993
|
-
|
|
18994
|
-
|
|
18995
|
-
|
|
19115
|
+
function getGeocodeCenterAndBounds(in_geocode_response, i = 0) {
|
|
19116
|
+
if (in_geocode_response && in_geocode_response[i]) {
|
|
19117
|
+
return {
|
|
19118
|
+
center: {
|
|
19119
|
+
lat: in_geocode_response[i].center.lat,
|
|
19120
|
+
lng: in_geocode_response[i].center.lng,
|
|
19121
|
+
},
|
|
19122
|
+
southWest: {
|
|
19123
|
+
lat: in_geocode_response[i].bbox.getSouthWest().lat,
|
|
19124
|
+
lng: in_geocode_response[i].bbox.getSouthWest().lng,
|
|
19125
|
+
},
|
|
19126
|
+
northEast: {
|
|
19127
|
+
lat: in_geocode_response[i].bbox.getNorthEast().lat,
|
|
19128
|
+
lng: in_geocode_response[i].bbox.getNorthEast().lng,
|
|
19129
|
+
},
|
|
19130
|
+
};
|
|
19131
|
+
} else {
|
|
19132
|
+
alert(crouton.localization.getWord("address_lookup_fail"));
|
|
19133
|
+
}
|
|
19134
|
+
}
|
|
19135
|
+
function callGeocoder(in_loc, callback) {
|
|
18996
19136
|
geoCodeParams = {};
|
|
18997
|
-
if (config.region && config.region.trim() !==
|
|
19137
|
+
if (config.region && config.region.trim() !== "") {
|
|
18998
19138
|
geoCodeParams.countrycodes = config.region;
|
|
18999
19139
|
}
|
|
19000
|
-
if (
|
|
19001
|
-
|
|
19002
|
-
|
|
19003
|
-
|
|
19004
|
-
|
|
19005
|
-
|
|
19006
|
-
|
|
19007
|
-
|
|
19008
|
-
|
|
19009
|
-
|
|
19140
|
+
if (
|
|
19141
|
+
config.bounds &&
|
|
19142
|
+
isNumber(config.bounds.north) &&
|
|
19143
|
+
isNumber(config.bounds.east) &&
|
|
19144
|
+
isNumber(config.bounds.south) &&
|
|
19145
|
+
isNumber(config.bounds.west)
|
|
19146
|
+
) {
|
|
19147
|
+
geoCodeParams.viewbox =
|
|
19148
|
+
config.bounds.west +
|
|
19149
|
+
"," +
|
|
19150
|
+
config.bounds.south +
|
|
19151
|
+
"," +
|
|
19152
|
+
config.bounds.east +
|
|
19153
|
+
"," +
|
|
19154
|
+
config.bounds.north;
|
|
19155
|
+
}
|
|
19156
|
+
geocode(in_loc, geoCodeParams, callback);
|
|
19157
|
+
}
|
|
19010
19158
|
function isNumber(x) {
|
|
19011
|
-
if (typeof x ===
|
|
19012
|
-
if (typeof x ===
|
|
19159
|
+
if (typeof x === "number") return true;
|
|
19160
|
+
if (typeof x === "string" && x.trim() !== "" && !isNaN(x)) return true;
|
|
19013
19161
|
return false;
|
|
19014
19162
|
}
|
|
19015
19163
|
function contains(bounds, lat, lng) {
|
|
19016
19164
|
if (!gMainMap) return true;
|
|
19017
|
-
return bounds.contains(L.latLng
|
|
19165
|
+
return bounds.contains(L.latLng(lat, lng));
|
|
19018
19166
|
}
|
|
19019
19167
|
function getBounds() {
|
|
19020
19168
|
if (!gMainMap) return null;
|
|
@@ -19026,7 +19174,10 @@ function addControl(div,pos,cb) {
|
|
|
19026
19174
|
}
|
|
19027
19175
|
function fitBounds(locations) {
|
|
19028
19176
|
if (!gMainMap) return;
|
|
19029
|
-
const bounds = locations.reduce(function(b,lat_lng) {
|
|
19177
|
+
const bounds = locations.reduce(function (b, lat_lng) {
|
|
19178
|
+
b.extend(lat_lng);
|
|
19179
|
+
return b;
|
|
19180
|
+
}, L.latLngBounds());
|
|
19030
19181
|
gMainMap.fitBounds(bounds);
|
|
19031
19182
|
}
|
|
19032
19183
|
function createClusterLayer() {
|
|
@@ -19043,50 +19194,68 @@ function addControl(div,pos,cb) {
|
|
|
19043
19194
|
gClusterLayer = null;
|
|
19044
19195
|
}
|
|
19045
19196
|
function clickSearch(ev, cb) {
|
|
19046
|
-
L.DomUtil.addClass(gMainMap._container,
|
|
19047
|
-
gMainMap.once(
|
|
19048
|
-
gMainMap.once(
|
|
19049
|
-
L.DomUtil.removeClass(
|
|
19050
|
-
|
|
19051
|
-
|
|
19197
|
+
L.DomUtil.addClass(gMainMap._container, "crosshair-cursor-enabled");
|
|
19198
|
+
gMainMap.once("click", function (e) {
|
|
19199
|
+
gMainMap.once("click", function (e) {
|
|
19200
|
+
L.DomUtil.removeClass(
|
|
19201
|
+
gMainMap._container,
|
|
19202
|
+
"crosshair-cursor-enabled",
|
|
19203
|
+
);
|
|
19204
|
+
cb(e.latlng.lat, e.latlng.lng);
|
|
19205
|
+
});
|
|
19052
19206
|
});
|
|
19053
19207
|
}
|
|
19054
19208
|
function getCorners(lat_lngs = false) {
|
|
19055
|
-
|
|
19056
|
-
|
|
19057
|
-
|
|
19209
|
+
var bounds = lat_lngs
|
|
19210
|
+
? lat_lngs.reduce(function (b, lat_lng) {
|
|
19211
|
+
b.extend(lat_lng);
|
|
19212
|
+
return b;
|
|
19213
|
+
}, L.latLngBounds())
|
|
19214
|
+
: gMainMap.getBounds();
|
|
19058
19215
|
|
|
19059
|
-
|
|
19060
|
-
|
|
19061
|
-
|
|
19062
|
-
|
|
19063
|
-
|
|
19216
|
+
return {
|
|
19217
|
+
ne: {
|
|
19218
|
+
lat: bounds.getNorthEast().lat,
|
|
19219
|
+
lng: bounds.getNorthEast().lng,
|
|
19220
|
+
},
|
|
19221
|
+
sw: {
|
|
19222
|
+
lat: bounds.getSouthWest().lat,
|
|
19223
|
+
lng: bounds.getSouthWest().lng,
|
|
19224
|
+
},
|
|
19225
|
+
};
|
|
19226
|
+
}
|
|
19064
19227
|
function getCenter() {
|
|
19065
|
-
return {
|
|
19228
|
+
return { lat: gMainMap.getCenter().lat, lng: gMainMap.getCenter().lng };
|
|
19066
19229
|
}
|
|
19067
19230
|
function modalOn() {
|
|
19068
|
-
if (gMainMap) gMainMap.dragging.disable()
|
|
19231
|
+
if (gMainMap) gMainMap.dragging.disable();
|
|
19069
19232
|
}
|
|
19070
19233
|
function modalOff() {
|
|
19071
|
-
if (gMainMap) gMainMap.dragging.enable()
|
|
19234
|
+
if (gMainMap) gMainMap.dragging.enable();
|
|
19072
19235
|
}
|
|
19073
19236
|
function afterInit(doNotWait, f) {
|
|
19074
19237
|
f();
|
|
19075
19238
|
}
|
|
19076
|
-
function returnTrue() {
|
|
19239
|
+
function returnTrue() {
|
|
19240
|
+
return true;
|
|
19241
|
+
}
|
|
19077
19242
|
function isMapDefined() {
|
|
19078
|
-
return
|
|
19243
|
+
return gMainMap !== null;
|
|
19079
19244
|
}
|
|
19080
19245
|
function isMapVisible() {
|
|
19081
|
-
return (
|
|
19246
|
+
return (
|
|
19247
|
+
gMainMap !== null &&
|
|
19248
|
+
gMainMap.getSize().x > 0 &&
|
|
19249
|
+
gMainMap.getSize().y > 0
|
|
19250
|
+
);
|
|
19082
19251
|
}
|
|
19083
|
-
|
|
19084
|
-
|
|
19252
|
+
this.createMap = createMap;
|
|
19253
|
+
this.addListener = addListener;
|
|
19085
19254
|
this.removeListener = removeListener;
|
|
19086
|
-
|
|
19255
|
+
this.addControl = addControl;
|
|
19087
19256
|
this.flyToFixedZoom = flyToFixedZoom;
|
|
19088
|
-
|
|
19089
|
-
|
|
19257
|
+
this.clearAllMarkers = clearAllMarkers;
|
|
19258
|
+
this.callGeocoder = callGeocoder;
|
|
19090
19259
|
this.getZoomAdjustedBounds = getZoomAdjustedBounds;
|
|
19091
19260
|
this.getZoom = getZoom;
|
|
19092
19261
|
this.createMarker = createMarker;
|
|
@@ -19149,6 +19318,7 @@ MapDelegate.prototype.getCenter = null;
|
|
|
19149
19318
|
MapDelegate.prototype.markSearchPoint = null;
|
|
19150
19319
|
MapDelegate.prototype.getOpenMarker = null;
|
|
19151
19320
|
MapDelegate.prototype.calculateBoundsFromCenterAndZoom = null;
|
|
19321
|
+
|
|
19152
19322
|
/* @preserve
|
|
19153
19323
|
* Leaflet 1.9.4+v1.d15112c, a JS library for interactive maps. https://leafletjs.com
|
|
19154
19324
|
* (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
|