@bmlt-enabled/croutonjs 4.3.1 → 4.3.3

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 CHANGED
@@ -11213,6 +11213,7 @@ function CroutonLocalization(language) {
11213
11213
  "waze_desc": "فتح في تطبيق وايز",
11214
11214
  'address_lookup_fail': 'تعذر العثور على العنوان. يرجى المحاولة مرة أخرى.',
11215
11215
  "favorites": "المفضلة",
11216
+ "choose one": "اختر واحدا",
11216
11217
  "widen search": "البحث الواسع",
11217
11218
  "cancel search": "إلغاء البحث"
11218
11219
  },
@@ -11282,6 +11283,7 @@ function CroutonLocalization(language) {
11282
11283
  "address_lookup_fail": "Adresu se nepodařilo najít. Zkuste to prosím znovu.",
11283
11284
  "contact": "Kontakt",
11284
11285
  "favorites": "Oblíbené",
11286
+ "choose one": "Vyberte si jedno:",
11285
11287
  "widen search": "Rozšířit vyhledávání",
11286
11288
  "cancel search": "Zrušit vyhledávání",
11287
11289
  },
@@ -11353,6 +11355,7 @@ function CroutonLocalization(language) {
11353
11355
  "address_lookup_fail": "Adressen kunne ikke findes. Prøv venligst igen.",
11354
11356
  "contact": "Kontakt",
11355
11357
  "favorites": "Favoritter",
11358
+ "choose one": "Vælg én:",
11356
11359
  "widen search": "Udvid søgning",
11357
11360
  "cancel search": "Annuller søgning",
11358
11361
  },
@@ -11431,6 +11434,7 @@ function CroutonLocalization(language) {
11431
11434
  "all meetings": "Alle Meetings",
11432
11435
  'upcoming meetings': "Nächste 24 Stunden",
11433
11436
  "favorites": "Favoriten",
11437
+ "choose one": "Auswählen:",
11434
11438
  "widen search": "Suche ausweiten",
11435
11439
  "cancel search": "Abbrechen",
11436
11440
  },
@@ -11527,6 +11531,7 @@ function CroutonLocalization(language) {
11527
11531
  "all meetings": "Όλες οι ομάδες",
11528
11532
  "upcoming meetings": "Προσεχείς ομάδες",
11529
11533
  "favorites": "Αγαπημένα",
11534
+ "choose one": "Επιλέξτε ένα:",
11530
11535
  "widen search": "Διεύρυνση αναζήτησης",
11531
11536
  "cancel search": "Ακύρωση αναζήτησης",
11532
11537
  },
@@ -11600,6 +11605,7 @@ function CroutonLocalization(language) {
11600
11605
  "sorted by distance": "Sorted by Distance",
11601
11606
  "address_lookup_fail": "The address could not be found. Please try again.",
11602
11607
  "favorites": "Favorites",
11608
+ "choose one": "Select one:",
11603
11609
  "widen search": "Widen Search",
11604
11610
  "cancel search": "Cancel Search",
11605
11611
  },
@@ -11674,6 +11680,7 @@ function CroutonLocalization(language) {
11674
11680
  "sorted by distance": "Sorted by Distance",
11675
11681
  "address_lookup_fail": "The address could not be found. Please try again.",
11676
11682
  "favorites": "Favorites",
11683
+ "choose one": "Select one:",
11677
11684
  "widen search": "Widen Search",
11678
11685
  "cancel search": "Cancel Search",
11679
11686
  },
@@ -11748,6 +11755,7 @@ function CroutonLocalization(language) {
11748
11755
  "sorted by distance": "Sorted by Distance",
11749
11756
  "address_lookup_fail": "The address could not be found. Please try again.",
11750
11757
  "favorites": "Favorites",
11758
+ "choose one": "Select one:",
11751
11759
  "widen search": "Widen Search",
11752
11760
  "cancel search": "Cancel Search",
11753
11761
  },
@@ -11822,6 +11830,7 @@ function CroutonLocalization(language) {
11822
11830
  "sorted by distance": "Sorted by Distance",
11823
11831
  "address_lookup_fail": "The address could not be found. Please try again.",
11824
11832
  "favorites": "Favorites",
11833
+ "choose one": "Select one:",
11825
11834
  "widen search": "Widen Search",
11826
11835
  "cancel search": "Cancel Search",
11827
11836
  },
@@ -11920,7 +11929,7 @@ function CroutonLocalization(language) {
11920
11929
  "all meetings": "All Meetings",
11921
11930
  'upcoming meetings': "Upcoming Meetings",
11922
11931
  "favorites": "Favorites",
11923
- "choose one": "Choose one:",
11932
+ "choose one": "Select one:",
11924
11933
  "widen search": "Widen Search",
11925
11934
  "cancel search": "Cancel Search",
11926
11935
  },
@@ -11996,6 +12005,7 @@ function CroutonLocalization(language) {
11996
12005
  "sorted by distance": "Ordenado por distancia",
11997
12006
  "address_lookup_fail": "The address could not be found. Please try again.",
11998
12007
  "favorites": "Favoritos",
12008
+ "choose one": "Elige uno:",
11999
12009
  "widen search": "Búsqueda amplia",
12000
12010
  "cancel search": "Cancelar búsqueda",
12001
12011
  },
@@ -12082,6 +12092,7 @@ function CroutonLocalization(language) {
12082
12092
  'group details': 'نمایش گروه',
12083
12093
  "address_lookup_fail": "آدرس پیدا نشد. لطفا دوباره تلاش کنید.",
12084
12094
  "favorites": "مورد علاقه",
12095
+ "choose one": "یکی را انتخاب کنید",
12085
12096
  "widen search": "جستجوی گسترده",
12086
12097
  "cancel search": "لغو جستجو",
12087
12098
  },
@@ -12155,6 +12166,7 @@ function CroutonLocalization(language) {
12155
12166
  "sorted by distance": "Trié par distance",
12156
12167
  "address_lookup_fail": "L'adresse est introuvable. Veuillez réessayer.",
12157
12168
  "favorites": "Favoris",
12169
+ "choose one": "Choisis-en un",
12158
12170
  "widen search": "Recherche élargie",
12159
12171
  "cancel search": "Annuler la recherche",
12160
12172
  },
@@ -12228,6 +12240,7 @@ function CroutonLocalization(language) {
12228
12240
  "sorted by distance": "Ordinati per distanza",
12229
12241
  "address_lookup_fail": "L'indirizzo non è stato trovato. Per favore riprova.",
12230
12242
  "favorites": "Preferiti",
12243
+ "choose one": "Scegline uno",
12231
12244
  "widen search": "Ricerca larga",
12232
12245
  "cancel search": "Annulla ricerca",
12233
12246
  },
@@ -12368,6 +12381,7 @@ function CroutonLocalization(language) {
12368
12381
  "sorted by distance": "Posortowane według odległości",
12369
12382
  "address_lookup_fail": "The address could not be found. Please try again.",
12370
12383
  "favorites": "Ulubione",
12384
+ "choose one": "Wybierz jedną",
12371
12385
  "widen search": "Widen Search",
12372
12386
  "cancel search": "Cancel Search",
12373
12387
  },
@@ -12512,6 +12526,7 @@ function CroutonLocalization(language) {
12512
12526
  "sorted by distance": "Сортировка по расстоянию",
12513
12527
  "address_lookup_fail": "Адрес не найден. Пожалуйста, попробуйте еще раз.",
12514
12528
  "favorites": "Избранное",
12529
+ "choose one": "Выбери одну",
12515
12530
  "widen search": "Расширить поиск",
12516
12531
  "cancel search": "Отмена поиска",
12517
12532
  },
@@ -12580,6 +12595,7 @@ function CroutonLocalization(language) {
12580
12595
  "sorted by distance": "Zoradené podľa vzdialenosti",
12581
12596
  "address_lookup_fail": "Adresa sa nenašla. Skúste to znova prosím.",
12582
12597
  "favorites": "Obľúbené",
12598
+ "choose one": "Vyber si jeden",
12583
12599
  "widen search": "Rozšíriť vyhľadávanie",
12584
12600
  "cancel search": "Zrušiť vyhľadávanie",
12585
12601
  },
@@ -13639,18 +13655,18 @@ this["hbs_Crouton"]["templates"]["locationSearch"] = Handlebars.template({"compi
13639
13655
  + alias3((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"Search by location",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":3,"column":8},"end":{"line":3,"column":40}}}))
13640
13656
  + "\n <svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" class=\"bi bi-crosshair\" viewBox=\"0 0 16 16\" style=\"vertical-align: sub;\">\n <path d=\"M8.5.5a.5.5 0 0 0-1 0v.518A7 7 0 0 0 1.018 7.5H.5a.5.5 0 0 0 0 1h.518A7 7 0 0 0 7.5 14.982v.518a.5.5 0 0 0 1 0v-.518A7 7 0 0 0 14.982 8.5h.518a.5.5 0 0 0 0-1h-.518A7 7 0 0 0 8.5 1.018zm-6.48 7A6 6 0 0 1 7.5 2.02v.48a.5.5 0 0 0 1 0v-.48a6 6 0 0 1 5.48 5.48h-.48a.5.5 0 0 0 0 1h.48a6 6 0 0 1-5.48 5.48v-.48a.5.5 0 0 0-1 0v.48A6 6 0 0 1 2.02 8.5h.48a.5.5 0 0 0 0-1zM8 10a2 2 0 1 0 0-4 2 2 0 0 0 0 4\"/>\n </svg>\n </span>\n</button>\n<div id=\"bmlt_location_search_modal\" class=\"modal\" style=\"display: none;\">\n <div id=\"bmlt_location_search_content\" class=\"modal-content\" style=\"border-color:unset;\">\n <span id=\"close_location_search\" class=\"modal-close\">x</span>\n <div class=\"modal-title\">"
13641
13657
  + alias3((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"Search by location",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":12,"column":33},"end":{"line":12,"column":65}}}))
13642
- + "</div>\n <div class=\"crouton-modal-search-page\">\n <div id=\"modal-location-search-box\" class=\"modal-search\">\n <input id=\"bmlt-location-search-goto-text\" type=\"text\" class=\"crouton-goto-text\"\n placeholder=\""
13643
- + alias3((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"Enter a city or zip code",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":16,"column":33},"end":{"line":16,"column":71}}}))
13644
- + "\">\n <button id=\"bmlt-location-search-text-button\" class=\"filter-button\">"
13645
- + alias3((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"text_search",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":17,"column":84},"end":{"line":17,"column":109}}}))
13658
+ + "</div>\n <div class=\"crouton-modal-search-page\">\n <div id=\"modal-location-search-box\" class=\"modal-search\">\n <div>\n <input id=\"bmlt-location-search-goto-text\" type=\"text\" class=\"crouton-goto-text\" autocomplete=\"off\"\n placeholder=\""
13659
+ + alias3((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"Enter a city or zip code",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":17,"column":33},"end":{"line":17,"column":71}}}))
13660
+ + "\">\n </div>\n <button id=\"bmlt-location-search-text-button\" class=\"filter-button\">"
13661
+ + alias3((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"text_search",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":19,"column":84},"end":{"line":19,"column":109}}}))
13646
13662
  + "</button>\n </div>\n <div class=\"modal-search\">\n <button id=\"bmlt-location-search-nearbyMeetings\" class=\"filter-button\">"
13647
- + alias3((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"near_me",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":20,"column":87},"end":{"line":20,"column":108}}}))
13663
+ + alias3((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"near_me",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":22,"column":87},"end":{"line":22,"column":108}}}))
13648
13664
  + "</button>\n </div>\n <div id=\"location-search-widen\" class=\"modal-search\">\n <button id=\"bmlt-location-search-widen\" class=\"filter-button\">"
13649
- + alias3((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"Widen Search",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":23,"column":78},"end":{"line":23,"column":104}}}))
13665
+ + alias3((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"Widen Search",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":25,"column":78},"end":{"line":25,"column":104}}}))
13650
13666
  + "</button>\n </div>\n <div>\n <!--<button id=\"location-search-close\" class=\"advanced-search-button\" style=\"float:left\">"
13651
- + alias3((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"Close",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":26,"column":96},"end":{"line":26,"column":115}}}))
13667
+ + alias3((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"Close",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":28,"column":96},"end":{"line":28,"column":115}}}))
13652
13668
  + "</a>-->\n <button id=\"bmlt-location_search-cancel\" class=\"advanced-search-button\">"
13653
- + alias3((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"Cancel Search",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":27,"column":88},"end":{"line":27,"column":115}}}))
13669
+ + alias3((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias2).call(alias1,"Cancel Search",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":29,"column":88},"end":{"line":29,"column":115}}}))
13654
13670
  + "</button>\n </div>\n </div>\n <div class=\"crouton-modal-search-choice\"></div>\n </div>\n</div>";
13655
13671
  },"useData":true});
13656
13672
  this["hbs_Crouton"]["templates"]["main"] = Handlebars.template({"0":function(container,depth0,helpers,partials,data) {
@@ -13851,8 +13867,8 @@ this["hbs_Crouton"]["templates"]["mapMenu"] = Handlebars.template({"0":function(
13851
13867
  + alias1((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias3).call(alias2,"Show meetings near...",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":44,"column":28},"end":{"line":44,"column":63}}}))
13852
13868
  + "</span><span id=\"close_search\" class=\"modal-close\">x</span>\n <p></p>\n <div class=\"crouton-modal-search-page\">\n <div class=\"modal-search\">\n "
13853
13869
  + alias1((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias3).call(alias2,"Enter a city or zip code",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":48,"column":16},"end":{"line":48,"column":54}}}))
13854
- + "\n <input id=\"goto-text\" class=\"crouton-goto-text\" type=\"text\">\n <button id=\"goto-button\" class=\"filter-button\">"
13855
- + alias1((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias3).call(alias2,"text_search",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":50,"column":63},"end":{"line":50,"column":88}}}))
13870
+ + "\n <div>\n <input id=\"goto-text\" class=\"crouton-goto-text\" type=\"text\" autocomplete=\"off\">\n </div>\n <button id=\"goto-button\" class=\"filter-button\">"
13871
+ + alias1((lookupProperty(helpers,"getWord")||(depth0 && lookupProperty(depth0,"getWord"))||alias3).call(alias2,"text_search",{"name":"getWord","hash":{},"data":data,"loc":{"start":{"line":52,"column":63},"end":{"line":52,"column":88}}}))
13856
13872
  + "</button>\n </div>\n </div>\n <div class=\"crouton-modal-search-choice\"></div>\n </div>\n</div>\n\n";
13857
13873
  },"usePartial":true,"useData":true,"useDepths":true});
13858
13874
  this["hbs_Crouton"]["templates"]["mapSearch"] = Handlebars.template({"compiler":[8,">= 4.3.0"],"main":function(container,depth0,helpers,partials,data) {
@@ -15452,7 +15468,7 @@ function Crouton(config) {
15452
15468
  self.distanceTabAllowed = false;
15453
15469
  self.favoritesOn = false;
15454
15470
  self.config = {
15455
- version: '4.3.1', // CroutonJS version for debugging
15471
+ version: '4.3.3', // CroutonJS version for debugging
15456
15472
  on_complete: null, // Javascript function to callback when data querying is completed.
15457
15473
  root_server: null, // The root server to use.
15458
15474
  placeholder_id: "bmlt-tabs", // The DOM id that will be used for rendering
@@ -17382,6 +17398,7 @@ function MeetingMap(inConfig) {
17382
17398
  var gOldBounds = false;
17383
17399
  var gCurrentlyDraggingMap = false;
17384
17400
  var gLocationSearchResult = null;
17401
+ var gAllCities = [];
17385
17402
  function preloadApiLoadedCallback(f,a) {
17386
17403
  gLoadedCallbackFunction = f;
17387
17404
  gLoadedCallbackArgs = a;
@@ -17530,6 +17547,96 @@ function MeetingMap(inConfig) {
17530
17547
  function doGeolocationThenClose() {
17531
17548
  doGeolocation().then(closeModalWindow(gLocationSearchModal));
17532
17549
  }
17550
+ function addAutocompleteEvents(inp, button) {
17551
+ var currentFocus;
17552
+ inp.addEventListener("input",function(e) {
17553
+ var a, b, i, val = this.value;
17554
+ const inp = this;
17555
+ /*close any already open lists of autocompleted values*/
17556
+ closeAllLists();
17557
+ if (!val) { return false;}
17558
+ currentFocus = -1;
17559
+ /*create a DIV element that will contain the items (values):*/
17560
+ a = document.createElement("DIV");
17561
+ a.setAttribute("id", this.id + "autocomplete-list");
17562
+ a.setAttribute("class", "autocomplete-items");
17563
+ /*append the DIV element as a child of the autocomplete container:*/
17564
+ this.parentNode.appendChild(a);
17565
+ /*for each item in the array...*/
17566
+ for (i = 0; i < gAllCities.length; i++) {
17567
+ /*check if the item starts with the same letters as the text field value:*/
17568
+ if (gAllCities[i].substr(0, val.length).toUpperCase() == val.toUpperCase()) {
17569
+ /*create a DIV element for each matching element:*/
17570
+ b = document.createElement("DIV");
17571
+ /*make the matching letters bold:*/
17572
+ b.innerHTML = "<strong>" + gAllCities[i].substr(0, val.length) + "</strong>";
17573
+ b.innerHTML += gAllCities[i].substr(val.length);
17574
+ /*insert a input field that will hold the current array item's value:*/
17575
+ b.innerHTML += "<input type='hidden' value='" + gAllCities[i] + "'>";
17576
+ /*execute a function when someone clicks on the item value (DIV element):*/
17577
+ b.addEventListener("click", function(event) {
17578
+ /*insert the value for the autocomplete text field:*/
17579
+ inp.value = this.getElementsByTagName("input")[0].value;
17580
+ /*close the list of autocompleted values,
17581
+ (or any other open lists of autocompleted values:*/
17582
+ closeAllLists();
17583
+ button.click();
17584
+ });
17585
+ a.appendChild(b);
17586
+ }
17587
+ }
17588
+ });
17589
+ inp.addEventListener("keydown", function(e) {
17590
+ var x = document.getElementById(this.id + "autocomplete-list");
17591
+ if (x) x = x.getElementsByTagName("div");
17592
+ if (e.keyCode == 40) {
17593
+ /*If the arrow DOWN key is pressed,
17594
+ increase the currentFocus variable:*/
17595
+ currentFocus++;
17596
+ /*and and make the current item more visible:*/
17597
+ addActive(x);
17598
+ } else if (e.keyCode == 38) { //up
17599
+ /*If the arrow UP key is pressed,
17600
+ decrease the currentFocus variable:*/
17601
+ currentFocus--;
17602
+ /*and and make the current item more visible:*/
17603
+ addActive(x);
17604
+ } else if (e.keyCode == 13) {
17605
+ /*If the ENTER key is pressed, prevent the form from being submitted,*/
17606
+ e.preventDefault();
17607
+ if (currentFocus > -1) {
17608
+ /*and simulate a click on the "active" item:*/
17609
+ if (x) x[currentFocus].click();
17610
+ }
17611
+ }
17612
+ });
17613
+ function addActive(x) {
17614
+ /*a function to classify an item as "active":*/
17615
+ if (!x) return false;
17616
+ /*start by removing the "active" class on all items:*/
17617
+ removeActive(x);
17618
+ if (currentFocus >= x.length) currentFocus = 0;
17619
+ if (currentFocus < 0) currentFocus = (x.length - 1);
17620
+ /*add class "autocomplete-active":*/
17621
+ x[currentFocus].classList.add("autocomplete-active");
17622
+ }
17623
+ function removeActive(x) {
17624
+ /*a function to remove the "active" class from all autocomplete items:*/
17625
+ for (var i = 0; i < x.length; i++) {
17626
+ x[i].classList.remove("autocomplete-active");
17627
+ }
17628
+ }
17629
+ function closeAllLists() {
17630
+ var x = document.getElementsByClassName("autocomplete-items");
17631
+ for (var i = 0; i < x.length; i++) {
17632
+ x[i].parentNode.removeChild(x[i]);
17633
+ }
17634
+ }
17635
+ /*execute a function when someone clicks in the document:*/
17636
+ document.addEventListener("click", function (e) {
17637
+ closeAllLists(e.target);
17638
+ });
17639
+ }
17533
17640
  function createLocationSearchButton() {
17534
17641
  const template = hbs_Crouton.templates['locationSearch'];
17535
17642
  const controlDiv = document.createElement('div');
@@ -17538,12 +17645,7 @@ function MeetingMap(inConfig) {
17538
17645
  controlDiv.querySelector("#location-search-button").addEventListener('click', showLocationSearchDialog);
17539
17646
  gDefaultLocationSearchButtonLabel = controlDiv.querySelector("#location-search-button :first-child").innerHTML;
17540
17647
  controlDiv.querySelector("#bmlt-location-search-nearbyMeetings").addEventListener('click', doGeolocationThenClose);
17541
- controlDiv.querySelector("#bmlt-location-search-goto-text").addEventListener('keypress', function (event) {
17542
- if (event.key === "Enter") {
17543
- event.preventDefault();
17544
- document.getElementById("bmlt-location-search-text-button").click();
17545
- }
17546
- });
17648
+ addAutocompleteEvents(controlDiv.querySelector("#bmlt-location-search-goto-text"), controlDiv.querySelector("#bmlt-location-search-text-button"));
17547
17649
  controlDiv.querySelector("#bmlt-location-search-text-button").addEventListener('click', function () {
17548
17650
  let text = document.getElementById("bmlt-location-search-goto-text").value.trim();
17549
17651
  if (text === "") return;
@@ -17645,7 +17747,7 @@ function MeetingMap(inConfig) {
17645
17747
  filterVisible(false);
17646
17748
  gSearchPoint = {"lat": position.lat, "lng": position.lng};
17647
17749
  crouton.updateDistances();
17648
- const locationSearchResult = gDelegate.getZoomAdjustedBounds(gSearchPoint, filterMeetingsAndBounds, config.locationSearchZoom ?? 12);
17750
+ const locationSearchResult = gDelegate.getZoomAdjustedBounds(gSearchPoint, filterMeetingsAndBounds, config.locationSearchZoom ?? 12, findClosestMeetingLatLng(gSearchPoint));
17649
17751
  gDelegate.flyToFixedZoom(position, locationSearchResult.zoom, filterVisible);
17650
17752
  filterVisible(true);
17651
17753
  setLocationSearchButtonLabel(crouton.localization.getWord('closest meetings'));
@@ -17676,11 +17778,7 @@ function MeetingMap(inConfig) {
17676
17778
  });
17677
17779
  [...controlDiv.getElementsByClassName('modal-close')].forEach((elem)=>elem.addEventListener('click', (e)=>closeModalWindow(e.target)));
17678
17780
  controlDiv.querySelector("#close_table").addEventListener('click', hideListView);
17679
- controlDiv.querySelector("#goto-text").addEventListener('keydown', function (event) {
17680
- if (event && event.key == "Enter") {
17681
- lookupLocation(document.getElementById('goto-text').value,g_suspendedFullscreen, mapMenuGeocode);
17682
- }
17683
- });
17781
+ addAutocompleteEvents(controlDiv.querySelector("#goto-text"), controlDiv.querySelector("#goto-button"));
17684
17782
  controlDiv.querySelector("#goto-button").addEventListener('click', function (event) {
17685
17783
  lookupLocation(document.getElementById('goto-text').value, g_suspendedFullscreen, mapMenuGeocode);
17686
17784
  });
@@ -17813,7 +17911,7 @@ function MeetingMap(inConfig) {
17813
17911
  const centerAndBounds = gDelegate.getGeocodeCenterAndBounds(resp, i);
17814
17912
  if (!centerAndBounds) return;
17815
17913
  const zoom = calcZoomThatContainsBoundingBox(centerAndBounds);
17816
- const locationSearchResult = gDelegate.getZoomAdjustedBounds(gSearchPoint, filterMeetingsAndBounds, zoom);
17914
+ const locationSearchResult = gDelegate.getZoomAdjustedBounds(gSearchPoint, filterMeetingsAndBounds, zoom, findClosestMeetingLatLng(gSearchPoint));
17817
17915
  gDelegate.flyToFixedZoom(gSearchPoint, locationSearchResult.zoom, filterVisible);
17818
17916
  searchResponseCallback();
17819
17917
  })
@@ -17852,7 +17950,7 @@ function MeetingMap(inConfig) {
17852
17950
  );
17853
17951
  jQuery('#'+modalName+' .crouton-modal-search-page').addClass('hide');
17854
17952
  jQuery('#'+modalName+' .crouton-modal-search-choice').removeClass('hide')
17855
- .html('<div class="choose-location"><h4>'+crouton.localization.getWord('Choose one')+'</h4>'+html.join('')+'</div>')
17953
+ .html('<div class="choose-location"><h4>'+crouton.localization.getWord('Select one')+'</h4>'+html.join('')+'</div>')
17856
17954
  jQuery('#'+modalName+' .location-choice').on('click', function() {
17857
17955
  const index = parseInt(jQuery(this).data("choice"))
17858
17956
  setLocationSearchButtonLabel(choices[index]);
@@ -17877,6 +17975,16 @@ function MeetingMap(inConfig) {
17877
17975
  function locationSearchGeocodeInitial(resp) {
17878
17976
  locationSearchGeocode(resp, true);
17879
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
+ }
17880
17988
  function locationSearchGeocode(resp, initial=false) {
17881
17989
  chooseResponse('bmlt_location_search_modal', resp, function(resp, i) {
17882
17990
  closeModalWindow(gLocationSearchModal);
@@ -17885,7 +17993,8 @@ function MeetingMap(inConfig) {
17885
17993
  let center = centerAndBounds.center;
17886
17994
  filterVisible(false);
17887
17995
  let zoom = calcZoomThatContainsBoundingBox(centerAndBounds);
17888
- gLocationSearchResult = gDelegate.getZoomAdjustedBounds(center, filterMeetingsAndBounds, zoom);
17996
+
17997
+ gLocationSearchResult = gDelegate.getZoomAdjustedBounds(center, filterMeetingsAndBounds, zoom, findClosestMeetingLatLng(center));
17889
17998
  gSearchPoint = {"lat": gLocationSearchResult.center.lat, "lng": gLocationSearchResult.center.lng};
17890
17999
  filterVisible(true, gLocationSearchResult.bounds);
17891
18000
  crouton.updateDistances(initial);
@@ -17905,6 +18014,13 @@ function MeetingMap(inConfig) {
17905
18014
  return;
17906
18015
  }
17907
18016
  gAllMeetings = meetings_responseObject.filter(m => m.venue_type != 2);
18017
+ gAllCities = meetings_responseObject.reduce(function (carry, m) {
18018
+ const fields = ['location_municipality', 'location_city_subsection', 'location_province', 'location_neighborhood'];
18019
+ fields.forEach(function (f) {
18020
+ if (m[f].length > 1 && !carry.includes(m[f])) carry.push(m[f]);
18021
+ });
18022
+ return carry;
18023
+ }, []);
17908
18024
  if (fitBounds && !config.centerMe && !config.goto) {
17909
18025
  let lat_lngs = gAllMeetings.reduce(function(a,m) {a.push([m.latitude, m.longitude]); return a;},[]);
17910
18026
  const maxRadius = config.maxTomatoWidth/2.0;
@@ -17943,13 +18059,13 @@ function MeetingMap(inConfig) {
17943
18059
  retrieveGeolocation().then(function(coords) {
17944
18060
  filterVisible(false);
17945
18061
  if (isMapVisible() || !makeFilterVisible) {
17946
- const locationSearchResult = gDelegate.getZoomAdjustedBounds(coords, filterMeetingsAndBounds, config.locationSearchZoom ?? 12);
18062
+ const locationSearchResult = gDelegate.getZoomAdjustedBounds(coords, filterMeetingsAndBounds, config.locationSearchZoom ?? 12, findClosestMeetingLatLng(coords));
17947
18063
  gDelegate.flyToFixedZoom(coords, locationSearchResult.zoom, () => {
17948
18064
  filterVisible(makeFilterVisible);
17949
18065
  if (makeFilterVisible) setLocationSearchButtonLabel(crouton.localization.getWord('closest meetings'));
17950
18066
  });
17951
18067
  } else {
17952
- gLocationSearchResult = gDelegate.getZoomAdjustedBounds(coords, filterMeetingsAndBounds, config.locationSearchZoom ?? 12);
18068
+ gLocationSearchResult = gDelegate.getZoomAdjustedBounds(coords, filterMeetingsAndBounds, config.locationSearchZoom ?? 12, findClosestMeetingLatLng(coords));
17953
18069
  filterVisible(true, gLocationSearchResult.bounds);
17954
18070
  setLocationSearchButtonLabel(crouton.localization.getWord('closest meetings'));
17955
18071
  }
@@ -18047,12 +18163,15 @@ function MeetingMap(inConfig) {
18047
18163
  }
18048
18164
  jQuery('#bmlt_location_search_modal .crouton-modal-search-page').removeClass('hide');
18049
18165
  jQuery('#bmlt_location_search_modal .crouton-modal-search-choice').addClass('hide');
18050
- jQuery('bmlt-location-search-goto-text').val('');
18166
+ jQuery('#bmlt-location-search-goto-text').val('');
18167
+ jQuery('#bmlt-location-search-goto-textautocomplete-list').remove();
18051
18168
  }
18052
18169
  function showGeocodingDialog(e=null) {
18053
18170
  openModalWindow(document.getElementById('geocoding_modal'));
18054
18171
  jQuery('#geocoding_modal .crouton-modal-search-page').removeClass('hide');
18055
18172
  jQuery('#geocoding_modal .crouton-modal-search-choice').addClass('hide');
18173
+ jQuery('#goto-text').val('');
18174
+ jQuery('#goto-textautocomplete-list').remove();
18056
18175
  }
18057
18176
  function showListView(e=null) {
18058
18177
  filterVisible();
@@ -18480,514 +18599,751 @@ MeetingMap.prototype.hasMapSearch = null;
18480
18599
  MeetingMap.prototype.createLocationSearchButton = null;
18481
18600
 
18482
18601
  function MapDelegate(in_config) {
18483
- const config = in_config;
18484
- var g_icon_image_single = null;
18485
- var g_icon_image_multi = null;
18486
- var g_icon_image_selected = null;
18487
- var g_icon_shadow = null;
18488
- var g_icon_shape = null;
18489
- var gDiv = null;
18490
- var gMainMap;
18491
- var gOms = null;
18492
- var gMarkerClusterer = null;
18493
- var gInfoWindow;
18494
- var gIsLoaded = false;
18495
- var gIsClustering = false;
18496
- var gAllMarkers = []; ///< Holds all the markers.
18497
- var gSearchPointMarker = false;
18498
- var gOpenMarker = false;
18499
- function isApiLoaded() {
18500
- return gIsLoaded;
18501
- }
18502
- function loadApi(f, args) {
18503
- var tag = document.createElement('script');
18504
- gIsLoaded = true;
18505
- if (typeof config['api_key'] === 'undefined') config['api_key'] = "";
18506
- tag.src = "https://maps.googleapis.com/maps/api/js?key=" + config['api_key'] + "&loading=async&callback=croutonMap.apiLoadedCallback";
18507
- tag.defer = true;
18508
- tag.async = true;
18509
- var firstScriptTag = document.getElementsByTagName('script')[0];
18510
- firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
18511
- };
18512
- function createMap(inDiv, inCenter, inHidden = false) {
18513
- gDiv = inDiv;
18514
- if ( inHidden ) {
18515
- gDiv.style.height = 'auto';
18516
- gDiv.style.marginBottom = '10px';
18602
+ const config = in_config;
18603
+ var g_icon_image_single = null;
18604
+ var g_icon_image_multi = null;
18605
+ var g_icon_image_selected = null;
18606
+ var g_icon_shadow = null;
18607
+ var g_icon_shape = null;
18608
+ var gDiv = null;
18609
+ var gMainMap;
18610
+ var gOms = null;
18611
+ var gMarkerClusterer = null;
18612
+ var gInfoWindow;
18613
+ var gIsLoaded = false;
18614
+ var gIsClustering = false;
18615
+ var gAllMarkers = []; ///< Holds all the markers.
18616
+ var gSearchPointMarker = false;
18617
+ var gOpenMarker = false;
18618
+ function isApiLoaded() {
18619
+ return gIsLoaded;
18620
+ }
18621
+ function loadApi(f, args) {
18622
+ var tag = document.createElement("script");
18623
+ gIsLoaded = true;
18624
+ if (typeof config["api_key"] === "undefined") config["api_key"] = "";
18625
+ tag.src =
18626
+ "https://maps.googleapis.com/maps/api/js?key=" +
18627
+ config["api_key"] +
18628
+ "&loading=async&callback=croutonMap.apiLoadedCallback";
18629
+ tag.defer = true;
18630
+ tag.async = true;
18631
+ var firstScriptTag = document.getElementsByTagName("script")[0];
18632
+ firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
18633
+ }
18634
+ function createMap(inDiv, inCenter, inHidden = false) {
18635
+ gDiv = inDiv;
18636
+ if (inHidden) {
18637
+ gDiv.style.height = "auto";
18638
+ gDiv.style.marginBottom = "10px";
18517
18639
  gMainMap = null;
18518
18640
  return gDiv;
18519
18641
  }
18520
- let iconUrl = config.BMLTPlugin_images ? config.BMLTPlugin_images+"/NAMarker.png"
18521
- : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAgCAYAAAD5VeO1AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAABIAAAASABGyWs+AAAACXZwQWcAAAAXAAAAIACehauIAAAGEElEQVRIx62We2xT9xXHP/dhmxA7Iy/aOMY0Y01AMALdmjIi9bWpj6G9KqGQTtq6P6a26rqCUtCoWk1iAwmhtZ2oEJPQJhBdH2lUGjqUBLp2UaCq6BALxU7jOI8aamLqENuxiR/3nv1xb5w0CxPTeqSfrs69v/M95/f9fX/ndxVubApwF/AIlNwN7jpwamAITMUg/RFIJ3ASSN8IYCG7F9y/gW/eA2sWQS3gAXQ8HpX77tP57LPPCQb7zWz2o0/gyn7gMJD/b+CLQNkHG34FDwFfB8oAF6ADKl6vk5MnfZSWmvT3p3j99SE6OjrJZjt6YeoXwPBC1brA+XZ5+c9kzZq/SlVVt2zc+E/x+c7JE0+EpaMjJk8/PSaVlf0SDickm01JLndNpqai0t7+idTX/1HANww0LMTQ/kWLfi4vv3xKLl6MSFfXpJw9m5GOjoQEgxkREXn33YSUlQVldHRaRAzp7r4mgcCkiEzKxx8PS2PjIYHqs/Zyi/ZduFt27HhHJiYuiYhIOJyV3t60nDmTkXg8LyIix44lxe0ekJGRrIiItLVFpbIyKL29kyKSlL6+EamqekGA3QCqhV22ranpRzz22Arc7ioAqqs1NA1MUzAMe20KmCZFv6bGQTyeY/PmKBcuQHNzOc8++2PgO78E/CrQBI33tLauZenSJaRSIAIej0pVlU44nCcWM4rgIlYCsOaAxvh4ge3b4+RyTlpbfdTX/6Aa+KEKbPL51rqbm5eSybh45plxBgaygILLpfDSSxNMThpfqtw0xVKAS7EFp9Hdnaaraxq/v4QHH/w2sPR7Kiy+q75+OX5/KYGAydGjk+zbFwdg2TKdZcscR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wtgHpmzCTcNDhCCT0247X5LPTN8XwZ2vQMTv14I9H8xBfyd8CeBvwn0CHx/BPD/P6BzzQ/3R+CQwDYB5Sezib8Sc2yGbwlUHviqKp5HD78H6m424N/MV8HqLH5ZPAAAACV0RVh0Y3JlYXRlLWRhdGUAMjAxMS0wMS0wNlQwMzoyNDoxMyswMDowMJsWpgAAAAAldEVYdG1vZGlmeS1kYXRlADIwMTEtMDEtMDZUMDM6MjQ6MTMrMDA6MDDEp9A0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAABJRU5ErkJggg==";
18522
- g_icon_image_single = new google.maps.MarkerImage ( iconUrl, new google.maps.Size(23, 32), new google.maps.Point(0,0), new google.maps.Point(12, 32) );
18523
- iconUrl = config.BMLTPlugin_images ? config.BMLTPlugin_images+"/NAMarkerG.png"
18524
- : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAhCAYAAAAyCTAQAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAADTRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+Cjx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDQuMi4yLWMwNjMgNTMuMzUyNjI0LCAyMDA4LzA3LzMwLTE4OjA1OjQxICAgICAgICAiPgogPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICAgeG1sbnM6eG1wUmlnaHRzPSJodHRwOi8vbnMu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9IiIKICAgIElwdGM0eG1wQ29yZTpDaVRlbFdvcms9IiIKICAgIElwdGM0eG1wQ29yZTpDaUVtYWlsV29yaz0iIgogICAgSXB0YzR4bXBDb3JlOkNpVXJsV29yaz0iIi8+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+JHsLLHBay6EGxeuvJlILIbfBhRwpagIpbgYayyOJfwrquq6SOYQcDzrxd9Mvt3J5CMPkycKY99cTV20OCbDN9g7vrYgUlgyY8mXJSoMUtt/jTUyjBIKoRQUkNz1NIb00XyOy62PgCvBoHM6VaYmW1owXztM6KKLWXzttXboNqhi6TVzqqspqKxCe+8UQ49uY2rXTp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Nsy9lURBQ3OPZdcqOf9vJlu5mvCXJlpPxUZn/sc7xbosluF0+RosnuTGLu5/NMTYhwGl7wPLosVxgvNtFERoM6RsC/ieDnAD/4KPAZwO35cQbJhvbDBc84xFoehlquXfJh0oPy0SLwSPyufd/XxPaOd4t7V0WF9So1EY93jXF3al4inLeG2Jbjr+Pw/qzPYzUcz21JE3u+12Oo/+2nG+pci6o4X1n5X+nwYjUkA3u8k+K+ilPuYkeizt3G0wk7N2KC6p7dOwVTfsMNsnn8XO93NTzvBWPHjDZ9A8BSlmeAmniPHYZPGUbfybs+KxSIlhb/Fi/DWDtlHal6lgb5XOS6BUq3T8XBWt8djJTx+cpcvbGixVycqH/6jwv5M8sW6TF/t/F/xFgADsAxARvscdVAAAAAElFTkSuQmCC";
18525
- g_icon_image_multi = new google.maps.MarkerImage ( iconUrl, new google.maps.Size(23, 32), new google.maps.Point(0,0), new google.maps.Point(12, 32) );
18526
- iconUrl = config.BMLTPlugin_images ? config.BMLTPlugin_images+"/NAMarkerSel.png"
18527
- : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAhCAYAAAAyCTAQAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA/JpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wUmlnaH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2W6vpdnAeBDy11zlSjzLP6Tav1GeReKUxwI7Rof+roXiP82naPbOtW5u8nXuihetz/gQm8QelKPsMoLVR3S8arxGwf/VGDD/JuCitdh9fKYyg82nU8ulY5dxzurhQh15fAut3HMT6w4+p3LvesWg+X34VpuEFcosZkoBbL/ODfkbt1/SiP2/i/8nwAAca+6jkhGCHgAAAABJRU5ErkJggg==";
18528
- g_icon_image_selected = new google.maps.MarkerImage ( iconUrl, new google.maps.Size(23, 32), new google.maps.Point(0,0), new google.maps.Point(12, 32) );
18529
-
18530
- iconUrl = config.BMLTPlugin_images ? config.BMLTPlugin_images+"/SearchPoint.png"
18531
- : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAhCAYAAAAyCTAQAAAABGdBTUEAALGPC/xhBQAAAHhlWElmTU0AKgAAAAgABAESAAMAAAABAAEAAAEaAAUAAAABAAAAPgEbAAUAAAABAAAARodpAAQAAAABAAAATgAAAAAAAABIAAAAAQAAAEgAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAAABegAwAEAAAAAQAAACEAAAAAZxgyOAAAAAlwSFlzAAALEwAACxMBAJqcGAAAApJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDYuMC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1sbnM6dGlmZj0iaHR0cDovL25zLmFkb2JlLmNvbS90aWZmLzEuMC8iCiAgICAgICAgICAgIHhtbG5zOmV4aWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vZXhpZi8xLjAvIj4KICAgICAgICAgPHRpZmY6WVJlc29sdXRpb24+NzI8L3RpZmY6WVJ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YuGlLGY2Kgo1dbWVmloaNB0BPwv37179xf0+Ro6i6lYz0ab/ACPf4P1YlBSig5nh0GNZCt2SeqYFcloWHBMKvXOqkQi5eHDhy0ovCrgzBOYuD7O8W7GPC6N4UIR+I31lrdiFRKIoPSe71QNSl8jWvXgwYMh0HK+rKysAc75nDW0+IBNL8diFKG7UamFiCAYhjTJJ5hvei9oGGNUi83NzZUwWu0tHuM1z6z3nBtu8N2Pw9HgPxfdzw+VqAFMGwaXDQyT+fDgh/sqkvgtNvg/iw2TnpuxHpwfiYBol3oQfjZUkQa+6bmJgB2PuUCS+QPeBel9hfPtvIjxFpiLjcD5nQYmATABvj8APdHk3eu6oQNdchzA30FFtTjr8d7B46/xPnB6OAwDblBThBlE/hGNQsWugI5f8fwZUAuYdOYdr2nin8C5xwtudIY+ACYAPCcoKMgBY/wXrwnd8Dz2+7zn/gaM7+8F577hH7+NA6AlH54nw9thAH+NmqjH/oagvPhfBsE57OD9M5R/N1rv91iHm69vjHtf/9/DGIBi4nH9S8y3/2j+G9yfXNblr8O6ITwAAAAASUVORK5CYII=";
18532
- g_icon_image_searchpoint = new google.maps.MarkerImage ( iconUrl, new google.maps.Size(23, 32), new google.maps.Point(0,0), new google.maps.Point(12, 32) );
18533
- iconUrl = config.BMLTPlugin_images ? config.BMLTPlugin_images+"/NAMarkerS.png"
18534
- : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAAgEAYAAADbCl1AAAAABmJLR0T///////8JWPfcAAAACXBIWXMAAABIAAAASABGyWs+AAAF7UlEQVRo3u2YaWhcVRTH77zJzGS2pG0c1FRr6o5rXVBxwSLuCu5WLGLADa2VKlbFFUVcUasftIIiivu+C4q7xRVRcF8xVuIkcTL7TGZ5zw/ndybklSGZyTT98s6XH/e9d7f/vfecc58xnnnmmWeeeeaZZ5555plnnnnmmWeebXTzb+L+fbALRuEieCBcweffCK0K3JdpHAN3ornvKS93vR+A31Gf99YBtF+jv6/hefAnmG4yD8f9YK6FVSGDcD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NkOGLOLVB3IhNq3Fz6ofpQHY8KyQXBEEwc0jaDz7O5SdW5wVW/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=";
18535
- g_icon_shadow = new google.maps.MarkerImage( iconUrl, new google.maps.Size(43, 32), new google.maps.Point(0,0), new google.maps.Point(12, 32) );
18536
- g_icon_shape = { coord: [16,0,18,1,19,2,20,3,21,4,21,5,22,6,22,7,22,8,22,9,22,10,22,11,22,12,22,13,22,14,22,15,22,16,21,17,21,18,22,19,20,20,19,21,20,22,18,23,17,24,18,25,17,26,15,27,14,28,15,29,12,30,12,31,10,31,10,30,9,29,8,28,8,27,7,26,6,25,5,24,5,23,4,22,3,21,3,20,2,19,1,18,1,17,1,16,0,15,0,14,0,13,0,12,0,11,0,10,0,9,0,8,0,7,1,6,1,5,2,4,2,3,3,2,5,1,6,0,16,0], type: 'poly' };
18537
-
18538
- var myOptions = {
18539
- 'mapTypeId': google.maps.MapTypeId.ROADMAP,
18540
- 'zoomControl': true,
18541
- 'minZoom': config.minZoom,
18542
- 'maxZoom': config.maxZoom,
18543
- 'mapTypeControl': false,
18544
- 'streetViewControl': true,
18545
- 'disableDoubleClickZoom' : true,
18546
- 'draggableCursor': "pointer",
18547
- 'scaleControl' : true,
18548
- 'fullscreenControl': config.map_search ? true : false,
18549
- };
18550
- if (inCenter) {
18551
- myOptions = Object.assign(myOptions, {
18552
- 'center': new google.maps.LatLng ( inCenter.latitude, inCenter.longitude ),
18553
- 'zoom': parseInt(inCenter.zoom)
18554
- });
18555
- }
18556
- var pixel_width = inDiv.offsetWidth;
18557
- var pixel_height = inDiv.offsetHeight;
18558
-
18559
- if ( (pixel_width < 640) || (pixel_height < 640) ) {
18560
- myOptions.scrollwheel = true;
18561
- myOptions.zoomControlOptions = { 'style': google.maps.ZoomControlStyle.SMALL };
18562
- } else {
18563
- myOptions.zoomControlOptions = { 'style': google.maps.ZoomControlStyle.LARGE };
18564
- };
18565
- gInfoWindow = new google.maps.InfoWindow();
18566
- gMainMap = new google.maps.Map ( inDiv, myOptions );
18567
-
18568
- return gMainMap;
18569
- }
18570
- function addListener(ev,f,once) {
18571
- if (!gMainMap) return;
18572
- var e = ev;
18573
- switch (ev) {
18574
- case "zoomend":
18575
- e = 'zoom_changed';
18576
- break;
18577
- default:
18578
- ;
18579
- }
18580
- if (once) {
18581
- return google.maps.event.addListenerOnce( gMainMap, e, f);
18582
- } else {
18583
- return google.maps.event.addListener( gMainMap, e, f);
18584
- }
18585
- }
18586
- function removeListener(f) {
18587
- if (!gMainMap) return;
18588
- f.remove();
18589
- }
18590
- function fitBounds(locations) {
18591
- if (!gMainMap) return;
18592
- google.maps.event.addListenerOnce(gMainMap, "bounds_changed", function () {
18593
- gMainMap.setZoom(parseInt(Math.min(gMainMap.getZoom(), config.maxZoom)));
18594
- });
18595
- let start = new google.maps.LatLngBounds(); // avoid occasional timing problem
18596
- if (!start) return;
18597
- const bounds = locations.reduce(
18598
- function (bounds, m) {
18599
- if (bounds === null) return start;
18600
- return bounds.extend(new google.maps.LatLng(m[0], m[1]));
18601
- }, start);
18602
- gMainMap.fitBounds(bounds);
18603
- }
18604
- function flyToFixedZoom(position, zoom, extra) {
18605
- if (!gMainMap) return;
18606
- google.maps.event.addListenerOnce(gMainMap, 'idle', function() {
18607
- if (extra) extra();
18608
- });
18609
- const latlng = new google.maps.LatLng(position.lat, position.lng);
18610
- gMainMap.setCenter(latlng);
18611
- gMainMap.setZoom(zoom);
18612
- }
18613
- function getOpenMarker() {
18614
- return gOpenMarker;
18615
- }
18616
- function clearAllMarkers ()
18617
- {
18618
- if (!gMainMap) return;
18619
- gAllMarkers && gAllMarkers.forEach(function(m) {
18620
- m && m.marker.info_win && gAllMarkers[c].marker.info_win_.close();
18621
- m.marker.setMap( null );
18622
- });
18623
- gAllMarkers = [];
18624
- gOpenMarker = false;
18625
- };
18626
- function isFilterVisible() {
18642
+ let iconUrl = config.BMLTPlugin_images
18643
+ ? config.BMLTPlugin_images + "/NAMarker.png"
18644
+ : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAgCAYAAAD5VeO1AAAABmJLR0QA/wD/AP+gvaeTAAAACXBIWXMAAABIAAAASABGyWs+AAAACXZwQWcAAAAXAAAAIACehauIAAAGEElEQVRIx62We2xT9xXHP/dhmxA7Iy/aOMY0Y01AMALdmjIi9bWpj6G9KqGQTtq6P6a26rqCUtCoWk1iAwmhtZ2oEJPQJhBdH2lUGjqUBLp2UaCq6BALxU7jOI8aamLqENuxiR/3nv1xb5w0CxPTeqSfrs69v/M95/f9fX/ndxVubApwF/AIlNwN7jpwamAITMUg/RFIJ3ASSN8IYCG7F9y/gW/eA2sWQS3gAXQ8HpX77tP57LPPCQb7zWz2o0/gyn7gMJD/b+CLQNkHG34FDwFfB8oAF6ADKl6vk5M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BBWuCirFsXlsuXsyKSld27AwLrBoFyzQK/fj0eL9ty5UoDIjo1NS6++MJkeDiPYZiMj5s8+ujXiETyHD6coKZGR9fh1KkM589n2bq1ApECPT0p9u49Rjp9eB9waqafa1DTB7/bAN8APGiaC8NQixLr7PRzyy0aDzwQYdu2Cm6/3cmBA9c4fTqNopiI5IAk0DYC5zYAMa0YzVQUHD+FRsCByKwsAUKhHGvXuhgayvPkk0uoq3PgckF3dwqwjzDHgfadQC+gaMxaCEZXwKpGuNW+ebRigmi0QCiUJxjMEo+bjI3laW9PEovl7OM/Cuz5O0y12S/+45rzwerT8Fs/1ABuwDHbmRE7ROaMPJADdiXgxL3A+RkwbR54Eq6OgdoCq+3Pc+mZqWUmgWE/jwOHdgLH5hY8HxxgAAY9cNtG8NlTtHngUuyEMADs6oBM23yghcAB8x8w1AyNddZ1ODcBNnDeVsfuMIRabOdmwDEgdRquPgLry8DJzK/FLM8G8Jc8HG8F/rXA/t0QHGACLg2CowVWqtZUldnLoRf4wwtgHpmzCTcNDhCCT0247X5LPTN8XwZ2vQMTv14I9H8xBfyd8CeBvwn0CHx/BPD/P6BzzQ/3R+CQwDYB5Sezib8Sc2yGbwlUHviqKp5HD78H6m424N/MV8HqLH5ZPAAAACV0RVh0Y3JlYXRlLWRhdGUAMjAxMS0wMS0wNlQwMzoyNDoxMyswMDowMJsWpgAAAAAldEVYdG1vZGlmeS1kYXRlADIwMTEtMDEtMDZUMDM6MjQ6MTMrMDA6MDDEp9A0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAABJRU5ErkJggg==";
18645
+ g_icon_image_single = new google.maps.MarkerImage(
18646
+ iconUrl,
18647
+ new google.maps.Size(23, 32),
18648
+ new google.maps.Point(0, 0),
18649
+ new google.maps.Point(12, 32),
18650
+ );
18651
+ iconUrl = config.BMLTPlugin_images
18652
+ ? config.BMLTPlugin_images + "/NAMarkerG.png"
18653
+ : "data:image/png;base64,iVBORw0KGgoAA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xPgogICA8L2RjOmNyZWF0b3I+CiAgIDxkYzp0aXRsZT4KICAgIDxyZGY6QWx0PgogICAgIDxyZGY6bGkgeG1sOmxhbmc9IngtZGVmYXVsdCI+TkFNYXJrZXI8L3JkZjpsaT4KICAgIDwvcmRmOkFsdD4KICAgPC9kYzp0aXRsZT4KICAgPHhtcFJpZ2h0czpVc2FnZVRlcm1zPgogICAgPHJkZjpBbHQ+CiAgICAgPHJkZjpsaSB4bWw6bGFuZz0ieC1kZWZhdWx0Ii8+CiAgICA8L3JkZjpBbHQ+CiAgIDwveG1wUmlnaHRzOlVzYWdlVGVybXM+CiAgIDxJcHRjNHhtcENvcmU6Q3JlYXRvckNvbnRhY3RJbmZvCiAgICBJcHRjNHhtcENvcmU6Q2lBZHJFeHRhZHI9IiIKICAgIElwdGM0eG1wQ29yZTpDaUFkckNpdHk9IiIKICAgIElwdGM0eG1wQ29yZTpDaUFkclJlZ2lvbj0iIgogICAgSXB0YzR4bXBDb3JlOkNpQWRyUGNvZGU9IiIKICAgIElwdGM0eG1wQ29yZTpDaUFkckN0cnk9IiIKICAgIElwdGM0eG1wQ29yZTpDaVRlbFdvcms9IiIKICAgIElwdGM0eG1wQ29yZTpDaUVtYWlsV29yaz0iIgogICAgSXB0YzR4bXBDb3JlOkNpVXJsV29yaz0iIi8+CiAgPC9yZGY6RGVzY3JpcHRpb24+CiA8L3JkZjpSREY+CjwveDp4bXBtZXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgICAgCjw/eHBhY2tldCBlbmQ9InciPz7HRMckAAAG20lEQVR42qyWeXBV9RXHP/fet+QlL+QlPAgkeZIFxAWxqWBVagVKYtQUUTvtSIeKLYNY24pY/MPptA50nI4OnXbGzojVoSLNdFGJ6ci0MRSo1BZcILgQgglGSdJsL9vL2+679/bcBasVpON4Zn7v3d/2Pef3Pcvvp/DpskjaLQFYmq9QLf++nIWVhP40vCJzLdJekpY722blHKBXBWHzfJUV8xWmlcmqAhn02S2Uh/aFK+jr7+d4V3f2qMXrcXhMpprOB273H7oUHly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VD27s975upd97CmlNFYePNcj7ZKyec6ugm9dwfUUP5DrJ9fEuOZknUuIHuw2FEuA3NjBBaeYvkxRgdBw8iJr1sT+1/Sze6BlqayaZThO/5IQXzq5yQM89Y39/nWu9xi2E6lisyZoe9beH0ezehXHQJKaFq/+tHMjK0x1493gPPt7e+RKKtFasixszHthO+sEYshcTJHqakYNnORsqATZclRjhOFmWa30/pxu+Tv26DRNsgHb/ZzstZvU1w3zxTcucthvaNpcWh0pq5hMOFcLqH1MkuJ8ryS2dQ3roPvfMEp79+G8X1XyUo/pnct5dUZ6eU4y+hmwb6SJzHj71Dk0WDYP5V88DjEuGxymR6UdEHfeS6TknYST3RXCb0sSR+1cRXPRf9tX9KYt2Db+HlTl5MHHqDZLec7tT7vDswxOPwF7kCf/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";
18654
+ g_icon_image_multi = new google.maps.MarkerImage(
18655
+ iconUrl,
18656
+ new google.maps.Size(23, 32),
18657
+ new google.maps.Point(0, 0),
18658
+ new google.maps.Point(12, 32),
18659
+ );
18660
+ iconUrl = config.BMLTPlugin_images
18661
+ ? config.BMLTPlugin_images + "/NAMarkerSel.png"
18662
+ : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAhCAYAAAAyCTAQAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA/JpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wUmlnaHRzPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvcmlnaHRzLyIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1wUmlnaHRzOk1hcmtlZD0iRmFsc2UiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6OEFFRUI5RkFCQkM0MTFFMEFEOEJGMzBCOTRGRDNBMTMiIHhtcE1NOkluc3RhbmN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qhEx/OmUrNpQ9hpSews62vyB/onSUlp12Sy5Hr2GaW87EWzzHqOqdKv0XeT6KlJVyilcPSVPQJVw+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==";
18663
+ g_icon_image_selected = new google.maps.MarkerImage(
18664
+ iconUrl,
18665
+ new google.maps.Size(23, 32),
18666
+ new google.maps.Point(0, 0),
18667
+ new google.maps.Point(12, 32),
18668
+ );
18669
+
18670
+ iconUrl = config.BMLTPlugin_images
18671
+ ? config.BMLTPlugin_images + "/SearchPoint.png"
18672
+ : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAhCAYAAAAyCTAQAAAABGd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8fwZUAuYdOYdr2nin8C5xwtudIY+ACYAPCcoKMgBY/wXrwnd8Dz2+7zn/gaM7+8F577hH7+NA6AlH54nw9thAH+NmqjH/oagvPhfBsE57OD9M5R/N1rv91iHm69vjHtf/9/DGIBi4nH9S8y3/2j+G9yfXNblr8O6ITwAAAAASUVORK5CYII=";
18673
+ g_icon_image_searchpoint = new google.maps.MarkerImage(
18674
+ iconUrl,
18675
+ new google.maps.Size(23, 32),
18676
+ new google.maps.Point(0, 0),
18677
+ new google.maps.Point(12, 32),
18678
+ );
18679
+ iconUrl = config.BMLTPlugin_images
18680
+ ? config.BMLTPlugin_images + "/NAMarkerS.png"
18681
+ : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACsAAAAgEAYAAADbCl1AAAAABmJLR0T///////8JWPfcAAAACXBIWXMAAABIAAAASABGyWs+AAAF7UlEQVRo3u2YaWhcVRTH77zJzGS2pG0c1FRr6o5rXVBxwSLuCu5WLGLADa2VKlbFFUVcUasftIIiivu+C4q7xRVRcF8xVuIkcTL7TGZ5zw/ndybklSGZyTT98s6XH/e9d7f/vfecc58xnnnmmWeeeeaZZ5555plnnnnmmWeebXTzb+L+fbALRuEieCBcweffCK0K3JdpHAN3ornvKS93vR+A31Gf99YBtF+jv6/hefAnmG4yD8f9YK6FVSGDcDN4ELyHz5YyPIRU3QPUCy0RRgrC6IvCGM/jCyjfSPkJvrsXxoThVbR3NP3sKrTqdPgQuj2qA4B/w6qLDYF1xBtbSF1AJmwO5/U6iKD+IuP/mAmX4dXC7gsoP4UwW1F+VxjcmfoPItDvtP8880YA+330OEVYOVNYvEqYP0GY3UNY2I3vllD/LObxMGTcRhekMfFOmwX1aO9Hdwhm9Qm7liHMoDAyOrVarBciXHgvvmdBguykAPX8SfgM/VxEQ2cj7M3wTnQ4Qlg7Q1hifNlXhKPoM7Inzw/h+91ph/GZXyAuyjidFlYFTcBrePwOQuLruk8Xxm8X9m4pnHcHQiJc5A2+Z2cEBhDuD6HvQ9pngXzd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id//yIOO4kvZo38FlGC4ohmxkwzt+p6zV4NXsN9+lrgGShllrhN0c4dDrPH8PAV5DOITKkO6MkUX8ey4kiIzgw1MsZA7frju5xu9Cm9+Hhn8D5kmoQVPTsZaP+Eyt1R2rA1HfQ15ovuD127wmO8jjQ1MEqyBpUImraYVgk8UHZziK+UFh8WSEY+GqCGazg21+tpi3IDvXJF3jnPXRnithNcikIVdQBwFsLgYl0pcU39kEBetUBOM/aZ6/XyWEnKC9+nXU4yeKowKqC9KdmXONa86F7JS5f1jjWw0/ig3R1n+UMIxAvUTzXoQKk+4E+NFtrZzavDkHEqQarme6q+0mt/8BTRrNnwf6/EMAAAAASUVORK5CYII=";
18682
+ g_icon_shadow = new google.maps.MarkerImage(
18683
+ iconUrl,
18684
+ new google.maps.Size(43, 32),
18685
+ new google.maps.Point(0, 0),
18686
+ new google.maps.Point(12, 32),
18687
+ );
18688
+ g_icon_shape = {
18689
+ coord: [
18690
+ 16, 0, 18, 1, 19, 2, 20, 3, 21, 4, 21, 5, 22, 6, 22, 7, 22, 8,
18691
+ 22, 9, 22, 10, 22, 11, 22, 12, 22, 13, 22, 14, 22, 15, 22, 16,
18692
+ 21, 17, 21, 18, 22, 19, 20, 20, 19, 21, 20, 22, 18, 23, 17, 24,
18693
+ 18, 25, 17, 26, 15, 27, 14, 28, 15, 29, 12, 30, 12, 31, 10, 31,
18694
+ 10, 30, 9, 29, 8, 28, 8, 27, 7, 26, 6, 25, 5, 24, 5, 23, 4, 22,
18695
+ 3, 21, 3, 20, 2, 19, 1, 18, 1, 17, 1, 16, 0, 15, 0, 14, 0, 13,
18696
+ 0, 12, 0, 11, 0, 10, 0, 9, 0, 8, 0, 7, 1, 6, 1, 5, 2, 4, 2, 3,
18697
+ 3, 2, 5, 1, 6, 0, 16, 0,
18698
+ ],
18699
+ type: "poly",
18700
+ };
18701
+
18702
+ var myOptions = {
18703
+ mapTypeId: google.maps.MapTypeId.ROADMAP,
18704
+ zoomControl: true,
18705
+ minZoom: config.minZoom,
18706
+ maxZoom: config.maxZoom,
18707
+ mapTypeControl: false,
18708
+ streetViewControl: true,
18709
+ disableDoubleClickZoom: true,
18710
+ draggableCursor: "pointer",
18711
+ scaleControl: true,
18712
+ fullscreenControl: config.map_search ? true : false,
18713
+ };
18714
+ if (inCenter) {
18715
+ myOptions = Object.assign(myOptions, {
18716
+ center: new google.maps.LatLng(
18717
+ inCenter.latitude,
18718
+ inCenter.longitude,
18719
+ ),
18720
+ zoom: parseInt(inCenter.zoom),
18721
+ });
18722
+ }
18723
+ var pixel_width = inDiv.offsetWidth;
18724
+ if (pixel_width == 0) {
18725
+ pixel_width = inDiv.parentNode.offsetWidth;
18726
+ }
18727
+ var pixel_height = parseInt(
18728
+ jQuery(inDiv).css("height").replace("px", ""),
18729
+ );
18730
+ if (pixel_height == 0) {
18731
+ pixel_height = pixel_width;
18732
+ }
18733
+ if (pixel_height > pixel_width) {
18734
+ jQuery(inDiv).css("height", pixel_width + "px");
18735
+ }
18736
+ if (pixel_width < 640 || pixel_height < 640) {
18737
+ myOptions.scrollwheel = true;
18738
+ myOptions.zoomControlOptions = {
18739
+ style: google.maps.ZoomControlStyle.SMALL,
18740
+ };
18741
+ } else {
18742
+ myOptions.zoomControlOptions = {
18743
+ style: google.maps.ZoomControlStyle.LARGE,
18744
+ };
18745
+ }
18746
+ gInfoWindow = new google.maps.InfoWindow();
18747
+ gMainMap = new google.maps.Map(inDiv, myOptions);
18748
+
18749
+ return gMainMap;
18750
+ }
18751
+ function addListener(ev, f, once) {
18752
+ if (!gMainMap) return;
18753
+ var e = ev;
18754
+ switch (ev) {
18755
+ case "zoomend":
18756
+ e = "zoom_changed";
18757
+ break;
18758
+ default:
18759
+ }
18760
+ if (once) {
18761
+ return google.maps.event.addListenerOnce(gMainMap, e, f);
18762
+ } else {
18763
+ return google.maps.event.addListener(gMainMap, e, f);
18764
+ }
18765
+ }
18766
+ function removeListener(f) {
18767
+ if (!gMainMap) return;
18768
+ f.remove();
18769
+ }
18770
+ function fitBounds(locations) {
18771
+ if (!gMainMap) return;
18772
+ google.maps.event.addListenerOnce(
18773
+ gMainMap,
18774
+ "bounds_changed",
18775
+ function () {
18776
+ gMainMap.setZoom(
18777
+ parseInt(Math.min(gMainMap.getZoom(), config.maxZoom)),
18778
+ );
18779
+ },
18780
+ );
18781
+ let start = new google.maps.LatLngBounds(); // avoid occasional timing problem
18782
+ if (!start) return;
18783
+ const bounds = locations.reduce(function (bounds, m) {
18784
+ if (bounds === null) return start;
18785
+ return bounds.extend(new google.maps.LatLng(m[0], m[1]));
18786
+ }, start);
18787
+ gMainMap.fitBounds(bounds);
18788
+ }
18789
+ function flyToFixedZoom(position, zoom, extra) {
18790
+ if (!gMainMap) return;
18791
+ google.maps.event.addListenerOnce(gMainMap, "idle", function () {
18792
+ if (extra) extra();
18793
+ });
18794
+ const latlng = new google.maps.LatLng(position.lat, position.lng);
18795
+ gMainMap.setCenter(latlng);
18796
+ gMainMap.setZoom(zoom);
18797
+ }
18798
+ function getOpenMarker() {
18799
+ return gOpenMarker;
18800
+ }
18801
+ function clearAllMarkers() {
18802
+ if (!gMainMap) return;
18803
+ gAllMarkers &&
18804
+ gAllMarkers.forEach(function (m) {
18805
+ m &&
18806
+ m.marker.info_win &&
18807
+ gAllMarkers[c].marker.info_win_.close();
18808
+ m.marker.setMap(null);
18809
+ });
18810
+ gAllMarkers = [];
18811
+ gOpenMarker = false;
18812
+ }
18813
+ function isFilterVisible() {
18627
18814
  return config.filter_visible && config.filter_visible == 1;
18628
18815
  }
18629
18816
  function webMercatorToLatLng(point, zoom) {
18630
- const latLng = croutonMap.webMercatorToLatLng(point, zoom);
18631
- return new google.maps.LatLng(latLng.lat, latLng.lng);
18817
+ const latLng = croutonMap.webMercatorToLatLng(point, zoom);
18818
+ return new google.maps.LatLng(latLng.lat, latLng.lng);
18632
18819
  }
18633
18820
  function calculateBounds(center, zoom, width, height) {
18634
18821
  const centerPoint = croutonMap.latLngToWebMercator(center, zoom);
18635
- const southwestWebMercator = {x: centerPoint.x-width/2, y: centerPoint.y+height/2};
18636
- const northeastWebMercator = {x: centerPoint.x+width/2, y: centerPoint.y-height/2};
18637
- return new google.maps.LatLngBounds(webMercatorToLatLng(southwestWebMercator, zoom), webMercatorToLatLng(northeastWebMercator, zoom));
18638
- }
18639
- function calcOffsetWidth(gDiv) {
18640
- let ret = gDiv.offsetWidth;
18641
- if (ret === 0) ret = gDiv.parentElement.offsetWidth;
18642
- return ret;
18643
- }
18644
- function getZoomAdjust(filterMeetings, zoomLevel=gMainMap.getZoom(), center=gMainMap.getCenter()) {
18822
+ const southwestWebMercator = {
18823
+ x: centerPoint.x - width / 2,
18824
+ y: centerPoint.y + height / 2,
18825
+ };
18826
+ const northeastWebMercator = {
18827
+ x: centerPoint.x + width / 2,
18828
+ y: centerPoint.y - height / 2,
18829
+ };
18830
+ return new google.maps.LatLngBounds(
18831
+ webMercatorToLatLng(southwestWebMercator, zoom),
18832
+ webMercatorToLatLng(northeastWebMercator, zoom),
18833
+ );
18834
+ }
18835
+ function withinInscribedCircle(center, point, zoom, width, height) {
18836
+ const centerPoint = croutonMap.latLngToWebMercator(center, zoom);
18837
+ const meetingPoint = croutonMap.latLngToWebMercator(point, zoom);
18838
+ const radius = Math.min(width, height) / 2;
18839
+ const distance = Math.sqrt(
18840
+ Math.pow(centerPoint.x - meetingPoint.x, 2) +
18841
+ Math.pow(centerPoint.y - meetingPoint.y, 2),
18842
+ );
18843
+ return distance <= radius;
18844
+ }
18845
+ function calcOffsetWidth(gDiv) {
18846
+ let ret = gDiv.offsetWidth;
18847
+ if (ret === 0) ret = gDiv.parentElement.offsetWidth;
18848
+ return ret;
18849
+ }
18850
+ function getZoomAdjust(
18851
+ filterMeetings,
18852
+ zoomLevel = gMainMap.getZoom(),
18853
+ center = gMainMap.getCenter(),
18854
+ closestMeeting = null,
18855
+ ) {
18645
18856
  if (!gMainMap) return 12;
18857
+ if (config.map_search && isFilterVisible()) return zoomLevel;
18646
18858
  const mapWidth = calcOffsetWidth(gDiv);
18647
- const mapHeight = parseInt(jQuery(gDiv).css("height").replace("px",""));
18648
- const center_latlng = {"lat":center.lat(), "lng":center.lng()};
18649
- ret = zoomLevel;
18650
- if (config.map_search && isFilterVisible()) return ret;
18859
+ const mapHeight = parseInt(
18860
+ jQuery(gDiv).css("height").replace("px", ""),
18861
+ );
18862
+ const center_latlng = { lat: center.lat(), lng: center.lng() };
18863
+ let ret = zoomLevel;
18651
18864
  var bounds = calculateBounds(center_latlng, ret, mapWidth, mapHeight);
18652
- while(filterMeetings(bounds, center_latlng).length==0 && ret>6) {
18653
- ret -= 1;
18654
- bounds = calculateBounds(center_latlng, ret, mapWidth, mapHeight);
18865
+ if (closestMeeting) {
18866
+ while (
18867
+ !withinInscribedCircle(
18868
+ center_latlng,
18869
+ closestMeeting,
18870
+ ret,
18871
+ mapWidth,
18872
+ mapHeight,
18873
+ ) &&
18874
+ ret > config.minZoom
18875
+ ) {
18876
+ ret -= 1;
18877
+ }
18878
+ } else {
18879
+ while (
18880
+ filterMeetings(bounds, center_latlng).length == 0 &&
18881
+ ret > config.minZoom
18882
+ ) {
18883
+ ret -= 1;
18884
+ bounds = calculateBounds(
18885
+ center_latlng,
18886
+ ret,
18887
+ mapWidth,
18888
+ mapHeight,
18889
+ );
18890
+ }
18891
+ }
18892
+ // If we didn't zoom out, zoom in if it doesn't lose meetings
18893
+ if (ret == zoomLevel) {
18894
+ let meetingsInBounds = filterMeetings(bounds, center_latlng).length;
18895
+ if (meetingsInBounds > 0) {
18896
+ do {
18897
+ ret = ret + 1;
18898
+ if (ret > config.maxZoom) break;
18899
+ var bounds = calculateBounds(
18900
+ center_latlng,
18901
+ ret,
18902
+ mapWidth,
18903
+ mapHeight,
18904
+ );
18905
+ } while (
18906
+ filterMeetings(bounds, center_latlng).length ===
18907
+ meetingsInBounds
18908
+ );
18909
+ ret = ret - 1;
18910
+ }
18655
18911
  }
18656
18912
  return ret;
18657
18913
  }
18658
- function getZoom() {
18659
- if (!gMainMap) return 12;
18660
- return gMainMap.getZoom();
18661
- }
18662
- function contains(bounds, lat, lng) {
18663
- if (!gMainMap) return true;
18664
- return bounds.contains(new google.maps.LatLng ( lat, lng));
18665
- }
18666
- function getBounds() {
18667
- if (!gMainMap) return null;
18668
- return gMainMap.getBounds();
18669
- }
18670
- function createClusterLayer() {
18671
- gIsClustering = true;
18672
- }
18673
- function removeClusterLayer() {
18674
- if (!gMainMap) return;
18675
- gIsClustering =false;
18676
- gMarkerClusterer && gMarkerClusterer.setMap(null);
18677
- gMarkerClusterer = null;
18678
- if (gOms) {
18679
- gOms.removeAllMarkers();
18680
- gOms.clearListeners('click');
18681
- gOms = null;
18682
- }
18683
- }
18684
- function addClusterLayer() {
18685
- if (!gMainMap) return;
18686
- let markers = gAllMarkers.map((m)=>m.marker);
18687
- if (gIsClustering) {
18688
- gMarkerClusterer = new markerClusterer.MarkerClusterer( { 'map': gMainMap, 'markers': markers, 'imagePath': 'https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m'} );
18689
- gOms = new OverlappingMarkerSpiderfier(gMainMap, {
18690
- markersWontMove: true,
18691
- markersWontHide: true,
18692
- });
18693
- gOms.addListener('format', function (marker, status) {
18694
- var icon;
18695
- if (status === OverlappingMarkerSpiderfier.markerStatus.SPIDERFIED
18696
- || status === OverlappingMarkerSpiderfier.markerStatus.SPIDERFIABLE
18697
- || status === OverlappingMarkerSpiderfier.markerStatus.UNSPIDERFIED) {
18698
- icon = g_icon_image_multi;
18699
- } else if (status === OverlappingMarkerSpiderfier.markerStatus.UNSPIDERFIABLE) {
18700
- icon = g_icon_image_single;
18701
- } else {
18702
- icon = null;
18703
- }
18704
- marker.setIcon(icon);
18705
- });
18706
- google.maps.event.addListener(gMainMap, 'zoom_changed', function() {
18707
- if (gMainMap.getProjection()=='undefined') return;
18708
- google.maps.event.addListenerOnce(gMainMap, 'idle', function() {
18709
- if (gMainMap.getProjection()=='undefined') return;
18710
- if (gOms == null) return;
18711
- var spidered = gOms.markersNearAnyOtherMarker();
18712
- for (var i = 0; i < spidered.length; i ++) {
18713
- spidered[i].icon = g_icon_image_multi;
18714
- }
18715
- });
18716
- });
18717
-
18718
- // This is necessary to make the Spiderfy work
18719
- gOms.addListener('click', function (marker) {
18720
- marker.zIndex = 999;
18721
- gInfoWindow.setContent(marker.desc);
18722
- gInfoWindow.open(gMainMap, marker);
18723
- });
18724
- markers.forEach((marker)=>gOms.addMarker(marker));
18725
-
18726
- } else markers.forEach((m)=>m.setMap(gMainMap));
18727
- }
18728
- function markSearchPoint(inCoords) {
18729
- if (!gMainMap) return;
18730
- if (gSearchPointMarker) gSearchPointMarker.setMap(null);
18731
- gSearchPointMarker = new google.maps.Marker (
18732
- { 'position': new google.maps.LatLng(...inCoords)});
18733
- gSearchPointMarker.setIcon(g_icon_image_searchpoint);
18734
- gSearchPointMarker.setMap(gMainMap);
18735
- }
18736
- function createMarker ( inCoords, ///< The long/lat for the marker.
18737
- multi,
18738
- inTitle
18739
- )
18740
- {
18741
- if (!gMainMap) return;
18742
- var in_main_icon = (multi ? g_icon_image_multi : g_icon_image_single)
18743
- var marker = null;
18744
-
18745
- var marker = new google.maps.Marker (
18746
- { 'position': new google.maps.LatLng(...inCoords),
18747
- 'shadow': g_icon_shadow,
18748
- 'icon': in_main_icon,
18749
- 'shape': g_icon_shape,
18750
- 'cursor': 'default',
18751
- 'title': inTitle,
18752
- 'draggable': false
18753
- } );
18754
- marker.zIndex = 999;
18755
- marker.old_image = marker.getIcon();
18756
- return marker;
18757
- };
18758
- function bindPopup(marker, inHtml, inIds, openedMarker) {
18759
- if (inHtml) {
18760
- marker.desc = inHtml;
18761
- google.maps.event.addListener ( marker, "click", function () {
18762
- gAllMarkers.forEach((m) => m.marker.setIcon(m.marker.old_image));
18763
- if(marker.old_image){marker.setIcon(g_icon_image_selected)};
18764
- openInfoWindow(marker);
18765
- });
18766
- if (gOpenMarker && inIds.includes(parseInt(gOpenMarker))) {
18767
- openInfoWindow(marker);
18768
- }
18769
- gInfoWindow.addListener('closeclick', function () {
18770
- gOpenMarker = false;
18771
- gAllMarkers.forEach((m) => m.marker.setIcon(m.marker.old_image));
18772
- jQuery(".bmlt-data-row > td").removeClass("rowHighlight");
18773
- });
18774
- }
18775
- gAllMarkers[gAllMarkers.length] = {ids: inIds, marker: marker};
18776
- }
18777
- function addMarkerCallback(marker, cb, in_ids) {
18778
- if (cb) marker.addListener('click', () => {
18779
- cb(in_ids);
18780
- });
18781
- gAllMarkers.push( {ids: in_ids, marker: marker} );
18782
- }
18783
- function highlightRow(target) {
18784
- const id = target.id.split('-')[1];
18785
- gOpenMarker = id;
18786
- jQuery(".bmlt-data-row > td").removeClass("rowHighlight");
18787
- jQuery("#meeting-data-row-" + id + " > td").addClass("rowHighlight");
18788
- if (typeof crouton == 'undefined') crouton.dayTabFromId(id);
18789
- }
18790
- function openInfoWindow(marker) {
18791
- marker.setZIndex(google.maps.Marker.MAX_ZINDEX+1);
18792
- gInfoWindow.setContent(marker.desc);
18793
- gInfoWindow.open(gMainMap, marker);
18794
- gInfoWindow.addListener('visible', function() {
18795
- jQuery("input[type=radio][name=panel]:checked").each(function(index, target) {
18796
- highlightRow(target);
18797
- });
18798
- jQuery('input[type=radio][name=panel]').change(function() {
18799
- highlightRow(this);
18800
- });
18801
- });
18802
- }
18803
- function addControl(div,pos,cb) {
18804
- if (!div) return;
18805
- if (!gMainMap) {
18806
- gDiv.appendChild(div);
18807
- return;
18808
- }
18809
- var p = pos;
18810
- switch(pos) {
18811
- case 'topright':
18812
- p = google.maps.ControlPosition.TOP_RIGHT;
18813
- div.style.margin = "10px 10px 0 0";
18814
- break;
18815
- case 'topleft':
18816
- p = google.maps.ControlPosition.TOP_LEFT;
18817
- div.style.margin = "10px 0 0 10px";
18818
- break;
18819
- case 'bottomleft':
18820
- p = google.maps.ControlPosition.LEFT_BOTTOM;
18821
- div.style.margin = "0 0 0px 10px";
18822
- break;
18823
- }
18824
- div.index = 1;
18825
- if (cb) {
18826
- const observer = new MutationObserver(function (records) {
18827
- records.forEach(record => {
18828
- record.addedNodes.forEach(n => {
18829
- if (n === div) {
18830
- observer.disconnect();
18831
- cb();
18832
- }
18833
- });
18834
- })
18835
- });
18836
- observer.observe(document, {childList: true, subtree: true});
18837
- }
18838
- gMainMap.controls[p].push(div);
18839
- }
18840
- function openMarker(id) {
18841
- if (!gMainMap) return;
18842
- const marker = gAllMarkers.find((m) => m.ids.includes(id));
18843
- if (marker) {
18844
- jQuery("#panel-"+id).prop('checked', true);
18845
- openInfoWindow(marker.marker)
18846
- }
18847
- }
18848
- function getGeocodingChoices(in_geocode_response) {
18849
- if (!Array.isArray(in_geocode_response)) return [];
18850
- return in_geocode_response.map((r) => r.formatted_address);
18851
- }
18852
- function getGeocodeCenterAndBounds(in_geocode_response, i=0) {
18853
- if ( in_geocode_response && in_geocode_response[i] && in_geocode_response[i].geometry && in_geocode_response[i].geometry.location )
18854
- return {
18855
- center: {lat: in_geocode_response[i].geometry.location.lat(), lng: in_geocode_response[i].geometry.location.lng()},
18856
- southWest: {lat: in_geocode_response[i].geometry.viewport.getSouthWest().lat(),
18857
- lng: in_geocode_response[i].geometry.viewport.getSouthWest().lng()},
18858
- northEast: {lat: in_geocode_response[i].geometry.viewport.getNorthEast().lat(),
18859
- lng: in_geocode_response[i].geometry.viewport.getNorthEast().lng()},
18860
- };
18861
- alert ( crouton.localization.getWord("address_lookup_fail") );
18862
- return null;
18863
- }
18864
- function callGeocoder(in_loc, callback) {
18865
- var geocoder = new google.maps.Geocoder;
18866
-
18867
- if ( geocoder )
18868
- {
18869
- var geoCodeParams = { 'address': in_loc };
18870
- if (config.region && config.region.trim() !== '') {
18871
- geoCodeParams.region = config.region;
18872
- }
18873
- if (config.bounds
18874
- && config.bounds.north && config.bounds.north.trim()!== ''
18875
- && config.bounds.east && config.bounds.east.trim()!== ''
18876
- && config.bounds.south && config.bounds.south.trim()!== ''
18877
- && config.bounds.west && config.bounds.west.trim()!== '') {
18878
- geoCodeParams.bounds = new google.maps.LatLngBounds(
18879
- new google.maps.LatLng(config.bounds.south, config.bounds.west),
18880
- new google.maps.LatLng(config.bounds.north, config.bounds.east));
18881
- }
18882
- geocoder.geocode ( geoCodeParams, callback );
18883
- }
18884
- else // None of that stuff is defined if we couldn't create the geocoder.
18885
- {
18886
- alert ( crouton.localization.getWord("address_lookup_fail") );
18887
- };
18888
- }
18889
- function getZoomAdjustedBounds(center_latlng, filterMeetings, zoomLevel) {
18890
- if (!center_latlng) return null;
18891
- const center = new google.maps.LatLng(center_latlng.lat, center_latlng.lng);
18914
+ function getZoom() {
18915
+ if (!gMainMap) return 12;
18916
+ return gMainMap.getZoom();
18917
+ }
18918
+ function contains(bounds, lat, lng) {
18919
+ if (!gMainMap) return true;
18920
+ return bounds.contains(new google.maps.LatLng(lat, lng));
18921
+ }
18922
+ function getBounds() {
18923
+ if (!gMainMap) return null;
18924
+ return gMainMap.getBounds();
18925
+ }
18926
+ function createClusterLayer() {
18927
+ gIsClustering = true;
18928
+ }
18929
+ function removeClusterLayer() {
18930
+ if (!gMainMap) return;
18931
+ gIsClustering = false;
18932
+ gMarkerClusterer && gMarkerClusterer.setMap(null);
18933
+ gMarkerClusterer = null;
18934
+ if (gOms) {
18935
+ gOms.removeAllMarkers();
18936
+ gOms.clearListeners("click");
18937
+ gOms = null;
18938
+ }
18939
+ }
18940
+ function addClusterLayer() {
18941
+ if (!gMainMap) return;
18942
+ let markers = gAllMarkers.map((m) => m.marker);
18943
+ if (gIsClustering) {
18944
+ gMarkerClusterer = new markerClusterer.MarkerClusterer({
18945
+ map: gMainMap,
18946
+ markers: markers,
18947
+ imagePath:
18948
+ "https://developers.google.com/maps/documentation/javascript/examples/markerclusterer/m",
18949
+ });
18950
+ gOms = new OverlappingMarkerSpiderfier(gMainMap, {
18951
+ markersWontMove: true,
18952
+ markersWontHide: true,
18953
+ });
18954
+ gOms.addListener("format", function (marker, status) {
18955
+ var icon;
18956
+ if (
18957
+ status ===
18958
+ OverlappingMarkerSpiderfier.markerStatus.SPIDERFIED ||
18959
+ status ===
18960
+ OverlappingMarkerSpiderfier.markerStatus.SPIDERFIABLE ||
18961
+ status ===
18962
+ OverlappingMarkerSpiderfier.markerStatus.UNSPIDERFIED
18963
+ ) {
18964
+ icon = g_icon_image_multi;
18965
+ } else if (
18966
+ status ===
18967
+ OverlappingMarkerSpiderfier.markerStatus.UNSPIDERFIABLE
18968
+ ) {
18969
+ icon = g_icon_image_single;
18970
+ } else {
18971
+ icon = null;
18972
+ }
18973
+ marker.setIcon(icon);
18974
+ });
18975
+ google.maps.event.addListener(
18976
+ gMainMap,
18977
+ "zoom_changed",
18978
+ function () {
18979
+ if (gMainMap.getProjection() == "undefined") return;
18980
+ google.maps.event.addListenerOnce(
18981
+ gMainMap,
18982
+ "idle",
18983
+ function () {
18984
+ if (gMainMap.getProjection() == "undefined") return;
18985
+ if (gOms == null) return;
18986
+ var spidered = gOms.markersNearAnyOtherMarker();
18987
+ for (var i = 0; i < spidered.length; i++) {
18988
+ spidered[i].icon = g_icon_image_multi;
18989
+ }
18990
+ },
18991
+ );
18992
+ },
18993
+ );
18994
+
18995
+ // This is necessary to make the Spiderfy work
18996
+ gOms.addListener("click", function (marker) {
18997
+ marker.zIndex = 999;
18998
+ gInfoWindow.setContent(marker.desc);
18999
+ gInfoWindow.open(gMainMap, marker);
19000
+ });
19001
+ markers.forEach((marker) => gOms.addMarker(marker));
19002
+ } else markers.forEach((m) => m.setMap(gMainMap));
19003
+ }
19004
+ function markSearchPoint(inCoords) {
19005
+ if (!gMainMap) return;
19006
+ if (gSearchPointMarker) gSearchPointMarker.setMap(null);
19007
+ gSearchPointMarker = new google.maps.Marker({
19008
+ position: new google.maps.LatLng(...inCoords),
19009
+ });
19010
+ gSearchPointMarker.setIcon(g_icon_image_searchpoint);
19011
+ gSearchPointMarker.setMap(gMainMap);
19012
+ }
19013
+ function createMarker(
19014
+ inCoords, ///< The long/lat for the marker.
19015
+ multi,
19016
+ inTitle,
19017
+ ) {
19018
+ if (!gMainMap) return;
19019
+ var in_main_icon = multi ? g_icon_image_multi : g_icon_image_single;
19020
+ var marker = null;
19021
+
19022
+ var marker = new google.maps.Marker({
19023
+ position: new google.maps.LatLng(...inCoords),
19024
+ shadow: g_icon_shadow,
19025
+ icon: in_main_icon,
19026
+ shape: g_icon_shape,
19027
+ cursor: "default",
19028
+ title: inTitle,
19029
+ draggable: false,
19030
+ });
19031
+ marker.zIndex = 999;
19032
+ marker.old_image = marker.getIcon();
19033
+ return marker;
19034
+ }
19035
+ function bindPopup(marker, inHtml, inIds, openedMarker) {
19036
+ if (inHtml) {
19037
+ marker.desc = inHtml;
19038
+ google.maps.event.addListener(marker, "click", function () {
19039
+ gAllMarkers.forEach((m) =>
19040
+ m.marker.setIcon(m.marker.old_image),
19041
+ );
19042
+ if (marker.old_image) {
19043
+ marker.setIcon(g_icon_image_selected);
19044
+ }
19045
+ openInfoWindow(marker);
19046
+ });
19047
+ if (gOpenMarker && inIds.includes(parseInt(gOpenMarker))) {
19048
+ openInfoWindow(marker);
19049
+ }
19050
+ gInfoWindow.addListener("closeclick", function () {
19051
+ gOpenMarker = false;
19052
+ gAllMarkers.forEach((m) =>
19053
+ m.marker.setIcon(m.marker.old_image),
19054
+ );
19055
+ jQuery(".bmlt-data-row > td").removeClass("rowHighlight");
19056
+ });
19057
+ }
19058
+ gAllMarkers[gAllMarkers.length] = { ids: inIds, marker: marker };
19059
+ }
19060
+ function addMarkerCallback(marker, cb, in_ids) {
19061
+ if (cb)
19062
+ marker.addListener("click", () => {
19063
+ cb(in_ids);
19064
+ });
19065
+ gAllMarkers.push({ ids: in_ids, marker: marker });
19066
+ }
19067
+ function highlightRow(target) {
19068
+ const id = target.id.split("-")[1];
19069
+ gOpenMarker = id;
19070
+ jQuery(".bmlt-data-row > td").removeClass("rowHighlight");
19071
+ jQuery("#meeting-data-row-" + id + " > td").addClass("rowHighlight");
19072
+ if (typeof crouton == "undefined") crouton.dayTabFromId(id);
19073
+ }
19074
+ function openInfoWindow(marker) {
19075
+ marker.setZIndex(google.maps.Marker.MAX_ZINDEX + 1);
19076
+ gInfoWindow.setContent(marker.desc);
19077
+ gInfoWindow.open(gMainMap, marker);
19078
+ gInfoWindow.addListener("visible", function () {
19079
+ jQuery("input[type=radio][name=panel]:checked").each(
19080
+ function (index, target) {
19081
+ highlightRow(target);
19082
+ },
19083
+ );
19084
+ jQuery("input[type=radio][name=panel]").change(function () {
19085
+ highlightRow(this);
19086
+ });
19087
+ });
19088
+ }
19089
+ function addControl(div, pos, cb) {
19090
+ if (!div) return;
19091
+ if (!gMainMap) {
19092
+ gDiv.appendChild(div);
19093
+ return;
19094
+ }
19095
+ var p = pos;
19096
+ switch (pos) {
19097
+ case "topright":
19098
+ p = google.maps.ControlPosition.TOP_RIGHT;
19099
+ div.style.margin = "10px 10px 0 0";
19100
+ break;
19101
+ case "topleft":
19102
+ p = google.maps.ControlPosition.TOP_LEFT;
19103
+ div.style.margin = "10px 0 0 10px";
19104
+ break;
19105
+ case "bottomleft":
19106
+ p = google.maps.ControlPosition.LEFT_BOTTOM;
19107
+ div.style.margin = "0 0 0px 10px";
19108
+ break;
19109
+ }
19110
+ div.index = 1;
19111
+ if (cb) {
19112
+ const observer = new MutationObserver(function (records) {
19113
+ records.forEach((record) => {
19114
+ record.addedNodes.forEach((n) => {
19115
+ if (n === div) {
19116
+ observer.disconnect();
19117
+ cb();
19118
+ }
19119
+ });
19120
+ });
19121
+ });
19122
+ observer.observe(document, { childList: true, subtree: true });
19123
+ }
19124
+ gMainMap.controls[p].push(div);
19125
+ }
19126
+ function openMarker(id) {
19127
+ if (!gMainMap) return;
19128
+ const marker = gAllMarkers.find((m) => m.ids.includes(id));
19129
+ if (marker) {
19130
+ jQuery("#panel-" + id).prop("checked", true);
19131
+ openInfoWindow(marker.marker);
19132
+ }
19133
+ }
19134
+ function getGeocodingChoices(in_geocode_response) {
19135
+ if (!Array.isArray(in_geocode_response)) return [];
19136
+ return in_geocode_response.map((r) => r.formatted_address);
19137
+ }
19138
+ function getGeocodeCenterAndBounds(in_geocode_response, i = 0) {
19139
+ if (
19140
+ in_geocode_response &&
19141
+ in_geocode_response[i] &&
19142
+ in_geocode_response[i].geometry &&
19143
+ in_geocode_response[i].geometry.location
19144
+ )
19145
+ return {
19146
+ center: {
19147
+ lat: in_geocode_response[i].geometry.location.lat(),
19148
+ lng: in_geocode_response[i].geometry.location.lng(),
19149
+ },
19150
+ southWest: {
19151
+ lat: in_geocode_response[i].geometry.viewport
19152
+ .getSouthWest()
19153
+ .lat(),
19154
+ lng: in_geocode_response[i].geometry.viewport
19155
+ .getSouthWest()
19156
+ .lng(),
19157
+ },
19158
+ northEast: {
19159
+ lat: in_geocode_response[i].geometry.viewport
19160
+ .getNorthEast()
19161
+ .lat(),
19162
+ lng: in_geocode_response[i].geometry.viewport
19163
+ .getNorthEast()
19164
+ .lng(),
19165
+ },
19166
+ };
19167
+ alert(crouton.localization.getWord("address_lookup_fail"));
19168
+ return null;
19169
+ }
19170
+ function callGeocoder(in_loc, callback) {
19171
+ var geocoder = new google.maps.Geocoder();
19172
+
19173
+ if (geocoder) {
19174
+ var geoCodeParams = { address: in_loc };
19175
+ if (config.region && config.region.trim() !== "") {
19176
+ geoCodeParams.region = config.region;
19177
+ }
19178
+ if (
19179
+ config.bounds &&
19180
+ config.bounds.north &&
19181
+ config.bounds.north.trim() !== "" &&
19182
+ config.bounds.east &&
19183
+ config.bounds.east.trim() !== "" &&
19184
+ config.bounds.south &&
19185
+ config.bounds.south.trim() !== "" &&
19186
+ config.bounds.west &&
19187
+ config.bounds.west.trim() !== ""
19188
+ ) {
19189
+ geoCodeParams.bounds = new google.maps.LatLngBounds(
19190
+ new google.maps.LatLng(
19191
+ config.bounds.south,
19192
+ config.bounds.west,
19193
+ ),
19194
+ new google.maps.LatLng(
19195
+ config.bounds.north,
19196
+ config.bounds.east,
19197
+ ),
19198
+ );
19199
+ }
19200
+ geocoder.geocode(geoCodeParams, callback);
19201
+ } else // None of that stuff is defined if we couldn't create the geocoder.
19202
+ {
19203
+ alert(crouton.localization.getWord("address_lookup_fail"));
19204
+ }
19205
+ }
19206
+ function getZoomAdjustedBounds(
19207
+ center_latlng,
19208
+ filterMeetings,
19209
+ zoomLevel,
19210
+ closestMeeting = null,
19211
+ ) {
19212
+ if (!center_latlng) return null;
19213
+ const center = new google.maps.LatLng(
19214
+ center_latlng.lat,
19215
+ center_latlng.lng,
19216
+ );
18892
19217
  const mapWidth = calcOffsetWidth(gDiv);
18893
- const mapHeight = parseInt(jQuery(gDiv).css("height").replace("px",""));
19218
+ const mapHeight = parseInt(
19219
+ jQuery(gDiv).css("height").replace("px", ""),
19220
+ );
18894
19221
  if (center) {
18895
- const zoom = getZoomAdjust(filterMeetings, zoomLevel, center);
18896
- const bounds = calculateBounds(center_latlng, zoom, mapWidth, mapHeight);
18897
- const ret = {"center": center_latlng, "bounds": bounds, "zoom": zoom};
19222
+ const zoom = getZoomAdjust(
19223
+ filterMeetings,
19224
+ zoomLevel,
19225
+ center,
19226
+ closestMeeting,
19227
+ );
19228
+ const bounds = calculateBounds(
19229
+ center_latlng,
19230
+ zoom,
19231
+ mapWidth,
19232
+ mapHeight,
19233
+ );
19234
+ const ret = { center: center_latlng, bounds: bounds, zoom: zoom };
18898
19235
  return ret;
18899
19236
  } else {
18900
- alert ( crouton.localization.getWord("address_lookup_fail") );
19237
+ alert(crouton.localization.getWord("address_lookup_fail"));
18901
19238
  return null;
18902
19239
  }
18903
- }
19240
+ }
18904
19241
  function calculateBoundsFromCenterAndZoom(center, zoomLevel) {
18905
- const mapWidth = calcOffsetWidth(gDiv);
18906
- const mapHeight = parseInt(jQuery(gDiv).css("height").replace("px",""));
18907
- return calculateBounds(center, zoomLevel, mapWidth, mapHeight);
18908
- }
18909
- function invalidateSize() {
18910
- }
18911
- function clickSearch(ev, cb) {
18912
- if (!gMainMap) return;
18913
- gMainMap.setOptions({
18914
- draggableCursor: 'crosshair',
18915
- zoomControl: false,
18916
- gestureHandling: 'none'
18917
- });
18918
- google.maps.event.addListenerOnce( gMainMap, 'click', function(e) {
18919
- gMainMap.setOptions({
18920
- draggableCursor: 'default',
18921
- zoomControl: true,
18922
- gestureHandling: 'auto'
18923
- });
18924
- cb(e.latLng.lat(), e.latLng.lng());
18925
- })
18926
- };
18927
- function getCorners(lat_lngs = false) {
18928
- var bounds = lat_lngs
18929
- ? lat_lngs.reduce(function(b,m) {return b.extend(new google.maps.LatLng(m[0], m[1]));}, new google.maps.LatLngBounds())
18930
- : gMainMap.getBounds();
18931
-
18932
- return {
18933
- "ne" : {"lat": bounds.getNorthEast().lat(), "lng": bounds.getNorthEast().lng()},
18934
- "sw" : {"lat": bounds.getSouthWest().lat(), "lng": bounds.getSouthWest().lng()}
18935
- }
18936
- }
18937
- function getCenter() {
18938
- var center = gMainMap.getCenter();
18939
- return { "lat": center.lat(), "lng": center.lng()}
18940
- }
18941
- function afterInit(doNotWait, f) {
18942
- if (!gMainMap) return;
18943
- if (doNotWait || (typeof gMainMap.getBounds() !== 'undefined')) f();
18944
- else addListener('idle', function() {
18945
- f();
18946
- }, true);
18947
- }
18948
- function modalOn() {}
18949
- function modalOff() {}
19242
+ const mapWidth = calcOffsetWidth(gDiv);
19243
+ const mapHeight = parseInt(
19244
+ jQuery(gDiv).css("height").replace("px", ""),
19245
+ );
19246
+ return calculateBounds(center, zoomLevel, mapWidth, mapHeight);
19247
+ }
19248
+ function invalidateSize() {}
19249
+ function clickSearch(ev, cb) {
19250
+ if (!gMainMap) return;
19251
+ gMainMap.setOptions({
19252
+ draggableCursor: "crosshair",
19253
+ zoomControl: false,
19254
+ gestureHandling: "none",
19255
+ });
19256
+ google.maps.event.addListenerOnce(gMainMap, "click", function (e) {
19257
+ gMainMap.setOptions({
19258
+ draggableCursor: "default",
19259
+ zoomControl: true,
19260
+ gestureHandling: "auto",
19261
+ });
19262
+ cb(e.latLng.lat(), e.latLng.lng());
19263
+ });
19264
+ }
19265
+ function getCorners(lat_lngs = false) {
19266
+ var bounds = lat_lngs
19267
+ ? lat_lngs.reduce(function (b, m) {
19268
+ return b.extend(new google.maps.LatLng(m[0], m[1]));
19269
+ }, new google.maps.LatLngBounds())
19270
+ : gMainMap.getBounds();
19271
+
19272
+ return {
19273
+ ne: {
19274
+ lat: bounds.getNorthEast().lat(),
19275
+ lng: bounds.getNorthEast().lng(),
19276
+ },
19277
+ sw: {
19278
+ lat: bounds.getSouthWest().lat(),
19279
+ lng: bounds.getSouthWest().lng(),
19280
+ },
19281
+ };
19282
+ }
19283
+ function getCenter() {
19284
+ var center = gMainMap.getCenter();
19285
+ return { lat: center.lat(), lng: center.lng() };
19286
+ }
19287
+ function afterInit(doNotWait, f) {
19288
+ if (!gMainMap) return;
19289
+ if (doNotWait || typeof gMainMap.getBounds() !== "undefined") f();
19290
+ else
19291
+ addListener(
19292
+ "idle",
19293
+ function () {
19294
+ f();
19295
+ },
19296
+ true,
19297
+ );
19298
+ }
19299
+ function modalOn() {}
19300
+ function modalOff() {}
18950
19301
  function isMapDefined() {
18951
19302
  return gMainMap !== null && gMainMap !== undefined;
18952
19303
  }
18953
- function isMapVisible() {
18954
- return gMainMap !== null && gMainMap !== undefined && gMainMap.getProjection() !== null && gMainMap.getProjection() !== undefined;
19304
+ function isMapVisible() {
19305
+ return (
19306
+ gMainMap !== null &&
19307
+ gMainMap !== undefined &&
19308
+ gMainMap.getProjection() !== null &&
19309
+ gMainMap.getProjection() !== undefined
19310
+ );
18955
19311
  }
18956
- this.createMap = createMap;
18957
- this.addListener = addListener;
18958
- this.addControl = addControl;
18959
- this.flyToFixedZoom = flyToFixedZoom;
18960
- this.clearAllMarkers = clearAllMarkers;
18961
- this.callGeocoder = callGeocoder;
19312
+ this.createMap = createMap;
19313
+ this.addListener = addListener;
19314
+ this.addControl = addControl;
19315
+ this.flyToFixedZoom = flyToFixedZoom;
19316
+ this.clearAllMarkers = clearAllMarkers;
19317
+ this.callGeocoder = callGeocoder;
18962
19318
  this.getZoomAdjustedBounds = getZoomAdjustedBounds;
18963
- this.getZoom = getZoom;
18964
- this.createMarker = createMarker;
19319
+ this.getZoom = getZoom;
19320
+ this.createMarker = createMarker;
18965
19321
  this.bindPopup = bindPopup;
18966
19322
  this.addMarkerCallback = addMarkerCallback;
18967
- this.contains = contains;
18968
- this.getBounds = getBounds;
18969
- this.invalidateSize = invalidateSize;
18970
- this.fitBounds = fitBounds;
18971
- this.openMarker = openMarker;
18972
- this.isApiLoaded = isApiLoaded;
18973
- this.loadApi = loadApi;
18974
- this.createClusterLayer = createClusterLayer;
18975
- this.addClusterLayer = addClusterLayer;
18976
- this.removeClusterLayer = removeClusterLayer;
18977
- this.clickSearch = clickSearch;
18978
- this.getGeocodeCenterAndBounds = getGeocodeCenterAndBounds;
18979
- this.getGeocodingChoices = getGeocodingChoices;
18980
- this.modalOn = modalOn;
18981
- this.modalOff = modalOff;
18982
- this.removeListener = removeListener;
18983
- this.afterInit = afterInit;
18984
- this.isMapDefined = isMapDefined;
18985
- this.isMapVisible = isMapVisible;
18986
- this.getCorners = getCorners;
18987
- this.getCenter = getCenter;
18988
- this.markSearchPoint = markSearchPoint;
18989
- this.getOpenMarker = getOpenMarker;
18990
- this.calculateBoundsFromCenterAndZoom = calculateBoundsFromCenterAndZoom;
19323
+ this.contains = contains;
19324
+ this.getBounds = getBounds;
19325
+ this.invalidateSize = invalidateSize;
19326
+ this.fitBounds = fitBounds;
19327
+ this.openMarker = openMarker;
19328
+ this.isApiLoaded = isApiLoaded;
19329
+ this.loadApi = loadApi;
19330
+ this.createClusterLayer = createClusterLayer;
19331
+ this.addClusterLayer = addClusterLayer;
19332
+ this.removeClusterLayer = removeClusterLayer;
19333
+ this.clickSearch = clickSearch;
19334
+ this.getGeocodeCenterAndBounds = getGeocodeCenterAndBounds;
19335
+ this.getGeocodingChoices = getGeocodingChoices;
19336
+ this.modalOn = modalOn;
19337
+ this.modalOff = modalOff;
19338
+ this.removeListener = removeListener;
19339
+ this.afterInit = afterInit;
19340
+ this.isMapDefined = isMapDefined;
19341
+ this.isMapVisible = isMapVisible;
19342
+ this.getCorners = getCorners;
19343
+ this.getCenter = getCenter;
19344
+ this.markSearchPoint = markSearchPoint;
19345
+ this.getOpenMarker = getOpenMarker;
19346
+ this.calculateBoundsFromCenterAndZoom = calculateBoundsFromCenterAndZoom;
18991
19347
  }
18992
19348
  MapDelegate.prototype.createMap = null;
18993
19349
  MapDelegate.prototype.addListener = null;
@@ -19018,12 +19374,13 @@ MapDelegate.prototype.modalOn = null;
19018
19374
  MapDelegate.prototype.modalOff = null;
19019
19375
  MapDelegate.prototype.afterInit = null;
19020
19376
  MapDelegate.prototype.isMapDefined = null;
19021
- MapDelegate.prototype,isMapVisible = null;
19377
+ MapDelegate.prototype.isMapVisible = null;
19022
19378
  MapDelegate.prototype.getCorners = null;
19023
- MapDelegate.prototype.getCenter= null;
19379
+ MapDelegate.prototype.getCenter = null;
19024
19380
  MapDelegate.prototype.markSearchPoint = null;
19025
19381
  MapDelegate.prototype.getOpenMarker = null;
19026
19382
  MapDelegate.prototype.calculateBoundsFromCenterAndZoom = null;
19383
+
19027
19384
  var markerClusterer=function(t){"use strict";function e(t,e){var s={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(s[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(t);o<r.length;o++)e.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(t,r[o])&&(s[r[o]]=t[r[o]])}return s}class s{static isAdvancedMarkerAvailable(t){return google.maps.marker&&!0===t.getMapCapabilities().isAdvancedMarkersAvailable}static isAdvancedMarker(t){return google.maps.marker&&t instanceof google.maps.marker.AdvancedMarkerElement}static setMap(t,e){this.isAdvancedMarker(t)?t.map=e:t.setMap(e)}static getPosition(t){if(this.isAdvancedMarker(t)){if(t.position){if(t.position instanceof google.maps.LatLng)return t.position;if(t.position.lat&&t.position.lng)return new google.maps.LatLng(t.position.lat,t.position.lng)}return new google.maps.LatLng(null)}return t.getPosition()}static getVisible(t){return!!this.isAdvancedMarker(t)||t.getVisible()}}class r{constructor(t){let{markers:e,position:s}=t;this.markers=e,s&&(s instanceof google.maps.LatLng?this._position=s:this._position=new google.maps.LatLng(s))}get bounds(){if(0===this.markers.length&&!this._position)return;const t=new google.maps.LatLngBounds(this._position,this._position);for(const e of this.markers)t.extend(s.getPosition(e));return t}get position(){return this._position||this.bounds.getCenter()}get count(){return this.markers.filter((t=>s.getVisible(t))).length}push(t){this.markers.push(t)}delete(){this.marker&&(s.setMap(this.marker,null),this.marker=void 0),this.markers.length=0}}const o=(t,e,r,o)=>{const n=i(t.getBounds(),e,o);return r.filter((t=>n.contains(s.getPosition(t))))},i=(t,e,s)=>{const{northEast:r,southWest:o}=h(t,e),i=l({northEast:r,southWest:o},s);return c(i,e)},n=(t,e,s)=>{const r=i(t,e,s),o=r.getNorthEast(),n=r.getSouthWest();return[n.lng(),n.lat(),o.lng(),o.lat()]},a=(t,e)=>{const s=(e.lat-t.lat)*Math.PI/180,r=(e.lng-t.lng)*Math.PI/180,o=Math.sin(s/2),i=Math.sin(r/2),n=o*o+Math.cos(t.lat*Math.PI/180)*Math.cos(e.lat*Math.PI/180)*i*i;return 6371*(2*Math.atan2(Math.sqrt(n),Math.sqrt(1-n)))},h=(t,e)=>({northEast:e.fromLatLngToDivPixel(t.getNorthEast()),southWest:e.fromLatLngToDivPixel(t.getSouthWest())}),l=(t,e)=>{let{northEast:s,southWest:r}=t;return s.x+=e,s.y-=e,r.x-=e,r.y+=e,{northEast:s,southWest:r}},c=(t,e)=>{let{northEast:s,southWest:r}=t;const o=e.fromDivPixelToLatLng(r),i=e.fromDivPixelToLatLng(s);return new google.maps.LatLngBounds(o,i)};class u{constructor(t){let{maxZoom:e=16}=t;this.maxZoom=e}noop(t){let{markers:e}=t;return m(e)}}class p extends u{constructor(t){var{viewportPadding:s=60}=t;super(e(t,["viewportPadding"])),this.viewportPadding=60,this.viewportPadding=s}calculate(t){let{markers:e,map:s,mapCanvasProjection:r}=t;return s.getZoom()>=this.maxZoom?{clusters:this.noop({markers:e}),changed:!1}:{clusters:this.cluster({markers:o(s,r,e,this.viewportPadding),map:s,mapCanvasProjection:r})}}}const m=t=>t.map((t=>new r({position:s.getPosition(t),markers:[t]})));function d(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var g=function t(e,s){if(e===s)return!0;if(e&&s&&"object"==typeof e&&"object"==typeof s){if(e.constructor!==s.constructor)return!1;var r,o,i;if(Array.isArray(e)){if((r=e.length)!=s.length)return!1;for(o=r;0!=o--;)if(!t(e[o],s[o]))return!1;return!0}if(e.constructor===RegExp)return e.source===s.source&&e.flags===s.flags;if(e.valueOf!==Object.prototype.valueOf)return e.valueOf()===s.valueOf();if(e.toString!==Object.prototype.toString)return e.toString()===s.toString();if((r=(i=Object.keys(e)).length)!==Object.keys(s).length)return!1;for(o=r;0!=o--;)if(!Object.prototype.hasOwnProperty.call(s,i[o]))return!1;for(o=r;0!=o--;){var n=i[o];if(!t(e[n],s[n]))return!1}return!0}return e!=e&&s!=s},f=d(g);const k=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array];class w{static from(t){if(!(t instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");const[e,s]=new Uint8Array(t,0,2);if(219!==e)throw new Error("Data does not appear to be in a KDBush format.");const r=s>>4;if(1!==r)throw new Error(`Got v${r} data when expected v1.`);const o=k[15&s];if(!o)throw new Error("Unrecognized array type.");const[i]=new Uint16Array(t,2,1),[n]=new Uint32Array(t,4,1);return new w(n,i,o,t)}constructor(t,e=64,s=Float64Array,r){if(isNaN(t)||t<0)throw new Error(`Unpexpected numItems value: ${t}.`);this.numItems=+t,this.nodeSize=Math.min(Math.max(+e,2),65535),this.ArrayType=s,this.IndexArrayType=t<65536?Uint16Array:Uint32Array;const o=k.indexOf(this.ArrayType),i=2*t*this.ArrayType.BYTES_PER_ELEMENT,n=t*this.IndexArrayType.BYTES_PER_ELEMENT,a=(8-n%8)%8;if(o<0)throw new Error(`Unexpected typed array class: ${s}.`);r&&r instanceof ArrayBuffer?(this.data=r,this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+n+a,2*t),this._pos=2*t,this._finished=!0):(this.data=new ArrayBuffer(8+i+n+a),this.ids=new this.IndexArrayType(this.data,8,t),this.coords=new this.ArrayType(this.data,8+n+a,2*t),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+o]),new Uint16Array(this.data,2,1)[0]=e,new Uint32Array(this.data,4,1)[0]=t)}add(t,e){const s=this._pos>>1;return this.ids[s]=s,this.coords[this._pos++]=t,this.coords[this._pos++]=e,s}finish(){const t=this._pos>>1;if(t!==this.numItems)throw new Error(`Added ${t} items when expected ${this.numItems}.`);return y(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(t,e,s,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:o,coords:i,nodeSize:n}=this,a=[0,o.length-1,0],h=[];for(;a.length;){const l=a.pop()||0,c=a.pop()||0,u=a.pop()||0;if(c-u<=n){for(let n=u;n<=c;n++){const a=i[2*n],l=i[2*n+1];a>=t&&a<=s&&l>=e&&l<=r&&h.push(o[n])}continue}const p=u+c>>1,m=i[2*p],d=i[2*p+1];m>=t&&m<=s&&d>=e&&d<=r&&h.push(o[p]),(0===l?t<=m:e<=d)&&(a.push(u),a.push(p-1),a.push(1-l)),(0===l?s>=m:r>=d)&&(a.push(p+1),a.push(c),a.push(1-l))}return h}within(t,e,s){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");const{ids:r,coords:o,nodeSize:i}=this,n=[0,r.length-1,0],a=[],h=s*s;for(;n.length;){const l=n.pop()||0,c=n.pop()||0,u=n.pop()||0;if(c-u<=i){for(let s=u;s<=c;s++)C(o[2*s],o[2*s+1],t,e)<=h&&a.push(r[s]);continue}const p=u+c>>1,m=o[2*p],d=o[2*p+1];C(m,d,t,e)<=h&&a.push(r[p]),(0===l?t-s<=m:e-s<=d)&&(n.push(u),n.push(p-1),n.push(1-l)),(0===l?t+s>=m:e+s>=d)&&(n.push(p+1),n.push(c),n.push(1-l))}return a}}function y(t,e,s,r,o,i){if(o-r<=s)return;const n=r+o>>1;M(t,e,n,r,o,i),y(t,e,s,r,n-1,1-i),y(t,e,s,n+1,o,1-i)}function M(t,e,s,r,o,i){for(;o>r;){if(o-r>600){const n=o-r+1,a=s-r+1,h=Math.log(n),l=.5*Math.exp(2*h/3),c=.5*Math.sqrt(h*l*(n-l)/n)*(a-n/2<0?-1:1);M(t,e,s,Math.max(r,Math.floor(s-a*l/n+c)),Math.min(o,Math.floor(s+(n-a)*l/n+c)),i)}const n=e[2*s+i];let a=r,h=o;for(v(t,e,r,s),e[2*o+i]>n&&v(t,e,r,o);a<h;){for(v(t,e,a,h),a++,h--;e[2*a+i]<n;)a++;for(;e[2*h+i]>n;)h--}e[2*r+i]===n?v(t,e,r,h):(h++,v(t,e,h,o)),h<=s&&(r=h+1),s<=h&&(o=h-1)}}function v(t,e,s,r){x(t,s,r),x(e,2*s,2*r),x(e,2*s+1,2*r+1)}function x(t,e,s){const r=t[e];t[e]=t[s],t[s]=r}function C(t,e,s,r){const o=t-s,i=e-r;return o*o+i*i}const P={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:t=>t},_=Math.fround||(E=new Float32Array(1),t=>(E[0]=+t,E[0]));var E;const A=3,b=5,L=6;class O{constructor(t){this.options=Object.assign(Object.create(P),t),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(t){const{log:e,minZoom:s,maxZoom:r}=this.options;e&&console.time("total time");const o=`prepare ${t.length} points`;e&&console.time(o),this.points=t;const i=[];for(let e=0;e<t.length;e++){const s=t[e];if(!s.geometry)continue;const[r,o]=s.geometry.coordinates,n=_(T(r)),a=_(j(o));i.push(n,a,1/0,e,-1,1),this.options.reduce&&i.push(0)}let n=this.trees[r+1]=this._createTree(i);e&&console.timeEnd(o);for(let t=r;t>=s;t--){const s=+Date.now();n=this.trees[t]=this._createTree(this._cluster(n,t)),e&&console.log("z%d: %d clusters in %dms",t,n.numItems,+Date.now()-s)}return e&&console.timeEnd("total time"),this}getClusters(t,e){let s=((t[0]+180)%360+360)%360-180;const r=Math.max(-90,Math.min(90,t[1]));let o=180===t[2]?180:((t[2]+180)%360+360)%360-180;const i=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)s=-180,o=180;else if(s>o){const t=this.getClusters([s,r,180,i],e),n=this.getClusters([-180,r,o,i],e);return t.concat(n)}const n=this.trees[this._limitZoom(e)],a=n.range(T(s),j(i),T(o),j(r)),h=n.data,l=[];for(const t of a){const e=this.stride*t;l.push(h[e+b]>1?Z(h,e,this.clusterProps):this.points[h[e+A]])}return l}getChildren(t){const e=this._getOriginId(t),s=this._getOriginZoom(t),r="No cluster with the specified id.",o=this.trees[s];if(!o)throw new Error(r);const i=o.data;if(e*this.stride>=i.length)throw new Error(r);const n=this.options.radius/(this.options.extent*Math.pow(2,s-1)),a=i[e*this.stride],h=i[e*this.stride+1],l=o.within(a,h,n),c=[];for(const e of l){const s=e*this.stride;i[s+4]===t&&c.push(i[s+b]>1?Z(i,s,this.clusterProps):this.points[i[s+A]])}if(0===c.length)throw new Error(r);return c}getLeaves(t,e,s){e=e||10,s=s||0;const r=[];return this._appendLeaves(r,t,e,s,0),r}getTile(t,e,s){const r=this.trees[this._limitZoom(t)],o=Math.pow(2,t),{extent:i,radius:n}=this.options,a=n/i,h=(s-a)/o,l=(s+1+a)/o,c={features:[]};return this._addTileFeatures(r.range((e-a)/o,h,(e+1+a)/o,l),r.data,e,s,o,c),0===e&&this._addTileFeatures(r.range(1-a/o,h,1,l),r.data,o,s,o,c),e===o-1&&this._addTileFeatures(r.range(0,h,a/o,l),r.data,-1,s,o,c),c.features.length?c:null}getClusterExpansionZoom(t){let e=this._getOriginZoom(t)-1;for(;e<=this.options.maxZoom;){const s=this.getChildren(t);if(e++,1!==s.length)break;t=s[0].properties.cluster_id}return e}_appendLeaves(t,e,s,r,o){const i=this.getChildren(e);for(const e of i){const i=e.properties;if(i&&i.cluster?o+i.point_count<=r?o+=i.point_count:o=this._appendLeaves(t,i.cluster_id,s,r,o):o<r?o++:t.push(e),t.length===s)break}return o}_createTree(t){const e=new w(t.length/this.stride|0,this.options.nodeSize,Float32Array);for(let s=0;s<t.length;s+=this.stride)e.add(t[s],t[s+1]);return e.finish(),e.data=t,e}_addTileFeatures(t,e,s,r,o,i){for(const n of t){const t=n*this.stride,a=e[t+b]>1;let h,l,c;if(a)h=I(e,t,this.clusterProps),l=e[t],c=e[t+1];else{const s=this.points[e[t+A]];h=s.properties;const[r,o]=s.geometry.coordinates;l=T(r),c=j(o)}const u={type:1,geometry:[[Math.round(this.options.extent*(l*o-s)),Math.round(this.options.extent*(c*o-r))]],tags:h};let p;p=a||this.options.generateId?e[t+A]:this.points[e[t+A]].id,void 0!==p&&(u.id=p),i.features.push(u)}}_limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}_cluster(t,e){const{radius:s,extent:r,reduce:o,minPoints:i}=this.options,n=s/(r*Math.pow(2,e)),a=t.data,h=[],l=this.stride;for(let s=0;s<a.length;s+=l){if(a[s+2]<=e)continue;a[s+2]=e;const r=a[s],c=a[s+1],u=t.within(a[s],a[s+1],n),p=a[s+b];let m=p;for(const t of u){const s=t*l;a[s+2]>e&&(m+=a[s+b])}if(m>p&&m>=i){let t,i=r*p,n=c*p,d=-1;const g=((s/l|0)<<5)+(e+1)+this.points.length;for(const r of u){const h=r*l;if(a[h+2]<=e)continue;a[h+2]=e;const c=a[h+b];i+=a[h]*c,n+=a[h+1]*c,a[h+4]=g,o&&(t||(t=this._map(a,s,!0),d=this.clusterProps.length,this.clusterProps.push(t)),o(t,this._map(a,h)))}a[s+4]=g,h.push(i/m,n/m,1/0,g,-1,m),o&&h.push(d)}else{for(let t=0;t<l;t++)h.push(a[s+t]);if(m>1)for(const t of u){const s=t*l;if(!(a[s+2]<=e)){a[s+2]=e;for(let t=0;t<l;t++)h.push(a[s+t])}}}}return h}_getOriginId(t){return t-this.points.length>>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,e,s){if(t[e+b]>1){const r=this.clusterProps[t[e+L]];return s?Object.assign({},r):r}const r=this.points[t[e+A]].properties,o=this.options.map(r);return s&&o===r?Object.assign({},o):o}}function Z(t,e,s){return{type:"Feature",id:t[e+A],properties:I(t,e,s),geometry:{type:"Point",coordinates:[(r=t[e],360*(r-.5)),S(t[e+1])]}};var r}function I(t,e,s){const r=t[e+b],o=r>=1e4?`${Math.round(r/1e3)}k`:r>=1e3?Math.round(r/100)/10+"k":r,i=t[e+L],n=-1===i?{}:Object.assign({},s[i]);return Object.assign(n,{cluster:!0,cluster_id:t[e+A],point_count:r,point_count_abbreviated:o})}function T(t){return t/360+.5}function j(t){const e=Math.sin(t*Math.PI/180),s=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return s<0?0:s>1?1:s}function S(t){const e=(180-360*t)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}class z extends u{constructor(t){var{maxZoom:s,radius:r=60}=t,o=e(t,["maxZoom","radius"]);super({maxZoom:s}),this.state={zoom:-1},this.superCluster=new O(Object.assign({maxZoom:this.maxZoom,radius:r},o))}calculate(t){let e=!1;const r={zoom:t.map.getZoom()};if(!f(t.markers,this.markers)){e=!0,this.markers=[...t.markers];const r=this.markers.map((t=>{const e=s.getPosition(t);return{type:"Feature",geometry:{type:"Point",coordinates:[e.lng(),e.lat()]},properties:{marker:t}}}));this.superCluster.load(r)}return e||(this.state.zoom<=this.maxZoom||r.zoom<=this.maxZoom)&&(e=!f(this.state,r)),this.state=r,e&&(this.clusters=this.cluster(t)),{clusters:this.clusters,changed:e}}cluster(t){let{map:e}=t;return this.superCluster.getClusters([-180,-90,180,90],Math.round(e.getZoom())).map((t=>this.transformCluster(t)))}transformCluster(t){let{geometry:{coordinates:[e,o]},properties:i}=t;if(i.cluster)return new r({markers:this.superCluster.getLeaves(i.cluster_id,1/0).map((t=>t.properties.marker)),position:{lat:o,lng:e}});const n=i.marker;return new r({markers:[n],position:s.getPosition(n)})}}class U{constructor(t,e){this.markers={sum:t.length};const s=e.map((t=>t.count)),r=s.reduce(((t,e)=>t+e),0);this.clusters={count:e.length,markers:{mean:r/e.length,sum:r,min:Math.min(...s),max:Math.max(...s)}}}}class B{render(t,e,r){let{count:o,position:i}=t;const n=`<svg fill="${o>Math.max(10,e.clusters.markers.mean)?"#ff0000":"#0000ff"}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 240 240" width="50" height="50">\n<circle cx="120" cy="120" opacity=".6" r="70" />\n<circle cx="120" cy="120" opacity=".3" r="90" />\n<circle cx="120" cy="120" opacity=".2" r="110" />\n<text x="50%" y="50%" style="fill:#fff" text-anchor="middle" font-size="50" dominant-baseline="middle" font-family="roboto,arial,sans-serif">${o}</text>\n</svg>`,a=`Cluster of ${o} markers`,h=Number(google.maps.Marker.MAX_ZINDEX)+o;if(s.isAdvancedMarkerAvailable(r)){const t=(new DOMParser).parseFromString(n,"image/svg+xml").documentElement;t.setAttribute("transform","translate(0 25)");const e={map:r,position:i,zIndex:h,title:a,content:t};return new google.maps.marker.AdvancedMarkerElement(e)}const l={position:i,zIndex:h,title:a,icon:{url:`data:image/svg+xml;base64,${btoa(n)}`,anchor:new google.maps.Point(25,25)}};return new google.maps.Marker(l)}}class D{constructor(){!function(t,e){for(let s in e.prototype)t.prototype[s]=e.prototype[s]}(D,google.maps.OverlayView)}}var N;t.MarkerClustererEvents=void 0,(N=t.MarkerClustererEvents||(t.MarkerClustererEvents={})).CLUSTERING_BEGIN="clusteringbegin",N.CLUSTERING_END="clusteringend",N.CLUSTER_CLICK="click";const F=(t,e,s)=>{s.fitBounds(e.bounds)};return t.AbstractAlgorithm=u,t.AbstractViewportAlgorithm=p,t.Cluster=r,t.ClusterStats=U,t.DefaultRenderer=B,t.GridAlgorithm=class extends p{constructor(t){var{maxDistance:s=4e4,gridSize:r=40}=t;super(e(t,["maxDistance","gridSize"])),this.clusters=[],this.state={zoom:-1},this.maxDistance=s,this.gridSize=r}calculate(t){let{markers:e,map:s,mapCanvasProjection:r}=t;const i={zoom:s.getZoom()};let n=!1;return this.state.zoom>=this.maxZoom&&i.zoom>=this.maxZoom||(n=!f(this.state,i)),this.state=i,s.getZoom()>=this.maxZoom?{clusters:this.noop({markers:e}),changed:n}:{clusters:this.cluster({markers:o(s,r,e,this.viewportPadding),map:s,mapCanvasProjection:r})}}cluster(t){let{markers:e,map:s,mapCanvasProjection:r}=t;return this.clusters=[],e.forEach((t=>{this.addToClosestCluster(t,s,r)})),this.clusters}addToClosestCluster(t,e,o){let n=this.maxDistance,h=null;for(let e=0;e<this.clusters.length;e++){const r=this.clusters[e],o=a(r.bounds.getCenter().toJSON(),s.getPosition(t).toJSON());o<n&&(n=o,h=r)}if(h&&i(h.bounds,o,this.gridSize).contains(s.getPosition(t)))h.push(t);else{const e=new r({markers:[t]});this.clusters.push(e)}}},t.MarkerClusterer=class extends D{constructor(t){let{map:e,markers:s=[],algorithmOptions:r={},algorithm:o=new z(r),renderer:i=new B,onClusterClick:n=F}=t;super(),this.markers=[...s],this.clusters=[],this.algorithm=o,this.renderer=i,this.onClusterClick=n,e&&this.setMap(e)}addMarker(t,e){this.markers.includes(t)||(this.markers.push(t),e||this.render())}addMarkers(t,e){t.forEach((t=>{this.addMarker(t,!0)})),e||this.render()}removeMarker(t,e){const r=this.markers.indexOf(t);return-1!==r&&(s.setMap(t,null),this.markers.splice(r,1),e||this.render(),!0)}removeMarkers(t,e){let s=!1;return t.forEach((t=>{s=this.removeMarker(t,!0)||s})),s&&!e&&this.render(),s}clearMarkers(t){this.markers.length=0,t||this.render()}render(){const e=this.getMap();if(e instanceof google.maps.Map&&e.getProjection()){google.maps.event.trigger(this,t.MarkerClustererEvents.CLUSTERING_BEGIN,this);const{clusters:r,changed:o}=this.algorithm.calculate({markers:this.markers,map:e,mapCanvasProjection:this.getProjection()});if(o||null==o){const t=new Set;for(const e of r)1==e.markers.length&&t.add(e.markers[0]);const e=[];for(const r of this.clusters)null!=r.marker&&(1==r.markers.length?t.has(r.marker)||s.setMap(r.marker,null):e.push(r.marker));this.clusters=r,this.renderClusters(),requestAnimationFrame((()=>e.forEach((t=>s.setMap(t,null)))))}google.maps.event.trigger(this,t.MarkerClustererEvents.CLUSTERING_END,this)}}onAdd(){this.idleListener=this.getMap().addListener("idle",this.render.bind(this)),this.render()}onRemove(){google.maps.event.removeListener(this.idleListener),this.reset()}reset(){this.markers.forEach((t=>s.setMap(t,null))),this.clusters.forEach((t=>t.delete())),this.clusters=[]}renderClusters(){const e=new U(this.markers,this.clusters),r=this.getMap();this.clusters.forEach((o=>{1===o.markers.length?o.marker=o.markers[0]:(o.marker=this.renderer.render(o,e,r),o.markers.forEach((t=>s.setMap(t,null))),this.onClusterClick&&o.marker.addListener("click",(e=>{google.maps.event.trigger(this,t.MarkerClustererEvents.CLUSTER_CLICK,o),this.onClusterClick(e,o,r)}))),s.setMap(o.marker,r)}))}},t.MarkerUtils=s,t.NoopAlgorithm=class extends u{constructor(t){super(e(t,[]))}calculate(t){let{markers:e,map:s,mapCanvasProjection:r}=t;return{clusters:this.cluster({markers:e,map:s,mapCanvasProjection:r}),changed:!1}}cluster(t){return this.noop(t)}},t.SuperClusterAlgorithm=z,t.SuperClusterViewportAlgorithm=class extends p{constructor(t){var{maxZoom:s,radius:r=60,viewportPadding:o=60}=t,i=e(t,["maxZoom","radius","viewportPadding"]);super({maxZoom:s,viewportPadding:o}),this.superCluster=new O(Object.assign({maxZoom:this.maxZoom,radius:r},i)),this.state={zoom:-1,view:[0,0,0,0]}}calculate(t){const e={zoom:Math.round(t.map.getZoom()),view:n(t.map.getBounds(),t.mapCanvasProjection,this.viewportPadding)};let r=!f(this.state,e);if(!f(t.markers,this.markers)){r=!0,this.markers=[...t.markers];const e=this.markers.map((t=>{const e=s.getPosition(t);return{type:"Feature",geometry:{type:"Point",coordinates:[e.lng(),e.lat()]},properties:{marker:t}}}));this.superCluster.load(e)}return r&&(this.clusters=this.cluster(t),this.state=e),{clusters:this.clusters,changed:r}}cluster(t){let{map:e,mapCanvasProjection:s}=t;const r={zoom:Math.round(e.getZoom()),view:n(e.getBounds(),s,this.viewportPadding)};return this.superCluster.getClusters(r.view,r.zoom).map((t=>this.transformCluster(t)))}transformCluster(t){let{geometry:{coordinates:[e,o]},properties:i}=t;if(i.cluster)return new r({markers:this.superCluster.getLeaves(i.cluster_id,1/0).map((t=>t.properties.marker)),position:{lat:o,lng:e}});const n=i.marker;return new r({markers:[n],position:s.getPosition(n)})}},t.defaultOnClusterClickHandler=F,t.distanceBetweenPoints=a,t.extendBoundsToPaddedViewport=i,t.extendPixelBounds=l,t.filterMarkersToPaddedViewport=o,t.getPaddedViewport=n,t.noop=m,t.pixelBoundsToLatLngBounds=c,Object.defineProperty(t,"__esModule",{value:!0}),t}({});
19028
19385
  //# sourceMappingURL=index.min.js.map
19029
19386