azure-maps-control 3.7.1 → 3.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/atlas.css CHANGED
@@ -1529,18 +1529,18 @@
1529
1529
  overflow: auto;
1530
1530
  position: absolute;
1531
1531
  }
1532
- .atlas-map .top-left .azure-maps-control-container > .style-options.list,
1533
- .atlas-map .bottom-left .azure-maps-control-container > .style-options.list {
1532
+ .atlas-map .top-left .azure-maps-control-container > .style-options.list:not(.azure-maps-control-dropdown),
1533
+ .atlas-map .bottom-left .azure-maps-control-container > .style-options.list:not(.azure-maps-control-dropdown) {
1534
1534
  left: 100%;
1535
1535
  padding-left: 1px;
1536
1536
  }
1537
- .atlas-map .top-right .azure-maps-control-container > .style-options.list,
1538
- .atlas-map .bottom-right .azure-maps-control-container > .style-options.list {
1537
+ .atlas-map .top-right .azure-maps-control-container > .style-options.list:not(.azure-maps-control-dropdown),
1538
+ .atlas-map .bottom-right .azure-maps-control-container > .style-options.list:not(.azure-maps-control-dropdown) {
1539
1539
  right: 100%;
1540
1540
  padding-right: 1px;
1541
1541
  }
1542
- .atlas-map .bottom-right .azure-maps-control-container > .style-options.list,
1543
- .atlas-map .bottom-left .azure-maps-control-container > .style-options.list {
1542
+ .atlas-map .bottom-right .azure-maps-control-container > .style-options.list:not(.azure-maps-control-dropdown),
1543
+ .atlas-map .bottom-left .azure-maps-control-container > .style-options.list:not(.azure-maps-control-dropdown) {
1544
1544
  bottom: 0px;
1545
1545
  }
1546
1546
  .atlas-map .azure-maps-control-container > .style-options.list button {
package/dist/atlas.js CHANGED
@@ -51797,7 +51797,7 @@ uniform ${precision} ${type} u_${name};
51797
51797
  * Contains real information about the available/supported locales.
51798
51798
  */
51799
51799
  var localeIndex = {
51800
- localizationsPath: "locs/mapcontrol/2019-3-12",
51800
+ localizationsPath: "locs/mapcontrol/2025-11-05",
51801
51801
  sensitiveUserRegions: ["il", "kr", "pk", "in", "cn", "ar", "bh", "eg", "jo", "sa", "kw", "om", "qa", "ma", "ae"],
51802
51802
  locales: {
51803
51803
  defaultLanguage: {
@@ -51813,37 +51813,49 @@ uniform ${precision} ${type} u_${name};
51813
51813
  ar: {
51814
51814
  defaultRegion: {
51815
51815
  code: "ar",
51816
- strings: "ar-sa/resource.json"
51816
+ strings: "ar-SA/resource.json"
51817
51817
  }
51818
51818
  },
51819
51819
  bg: {
51820
51820
  defaultRegion: {
51821
51821
  code: "bg-BG",
51822
- strings: "bg-bg/resource.json"
51822
+ strings: "bg-BG/resource.json"
51823
+ }
51824
+ },
51825
+ ca: {
51826
+ defaultRegion: {
51827
+ code: "ca-ES",
51828
+ strings: "ca-ES/resource.json"
51823
51829
  }
51824
51830
  },
51825
51831
  cs: {
51826
51832
  defaultRegion: {
51827
51833
  code: "cs-CZ",
51828
- strings: "cs-cz/resource.json"
51834
+ strings: "cs-CZ/resource.json"
51829
51835
  }
51830
51836
  },
51831
51837
  da: {
51832
51838
  defaultRegion: {
51833
51839
  code: "da-DK",
51834
- strings: "da-dk/resource.json"
51840
+ strings: "da-DK/resource.json"
51835
51841
  }
51836
51842
  },
51837
51843
  de: {
51838
51844
  defaultRegion: {
51839
51845
  code: "de-DE",
51840
- strings: "de-de/resource.json"
51846
+ strings: "de-DE/resource.json"
51847
+ }
51848
+ },
51849
+ et: {
51850
+ defaultRegion: {
51851
+ code: "et-EE",
51852
+ strings: "et-EE/resource.json"
51841
51853
  }
51842
51854
  },
51843
51855
  el: {
51844
51856
  defaultRegion: {
51845
51857
  code: "el-GR",
51846
- strings: "el-gr/resource.json"
51858
+ strings: "el-GR/resource.json"
51847
51859
  }
51848
51860
  },
51849
51861
  en: {
@@ -51871,123 +51883,199 @@ uniform ${precision} ${type} u_${name};
51871
51883
  es: {
51872
51884
  defaultRegion: {
51873
51885
  code: "es-ES",
51874
- strings: "es-es/resource.json"
51886
+ strings: "es-ES/resource.json"
51875
51887
  },
51876
51888
  mx: {
51877
51889
  code: "es-MX",
51878
- strings: "es-mx/resource.json"
51890
+ strings: "es-MX/resource.json"
51891
+ }
51892
+ },
51893
+ eu: {
51894
+ defaultRegion: {
51895
+ code: "eu-ES",
51896
+ strings: "eu-ES/resource.json"
51879
51897
  }
51880
51898
  },
51881
51899
  fi: {
51882
51900
  defaultRegion: {
51883
51901
  code: "fi-FI",
51884
- strings: "fi-fi/resource.json"
51902
+ strings: "fi-FI/resource.json"
51885
51903
  }
51886
51904
  },
51887
51905
  fr: {
51888
51906
  defaultRegion: {
51889
51907
  code: "fr-FR",
51890
- strings: "fr-fr/resource.json"
51908
+ strings: "fr-FR/resource.json"
51909
+ }
51910
+ },
51911
+ gl: {
51912
+ defaultRegion: {
51913
+ code: "gl-ES",
51914
+ strings: "gl-ES/resource.json"
51915
+ }
51916
+ },
51917
+ he: {
51918
+ defaultRegion: {
51919
+ code: "he-IL",
51920
+ strings: "he-IL/resource.json"
51921
+ }
51922
+ },
51923
+ hi: {
51924
+ defaultRegion: {
51925
+ code: "hi-IN",
51926
+ strings: "hi-IN/resource.json"
51927
+ }
51928
+ },
51929
+ hr: {
51930
+ defaultRegion: {
51931
+ code: "hr-HR",
51932
+ strings: "hr-HR/resource.json"
51891
51933
  }
51892
51934
  },
51893
51935
  hu: {
51894
51936
  defaultRegion: {
51895
51937
  code: "hu-HU",
51896
- strings: "hu-hu/resource.json"
51938
+ strings: "hu-HU/resource.json"
51897
51939
  }
51898
51940
  },
51899
51941
  id: {
51900
51942
  defaultRegion: {
51901
51943
  code: "id-ID",
51902
- strings: "id-id/resource.json"
51944
+ strings: "id-ID/resource.json"
51903
51945
  }
51904
51946
  },
51905
51947
  it: {
51906
51948
  defaultRegion: {
51907
51949
  code: "it-IT",
51908
- strings: "it-it/resource.json"
51950
+ strings: "it-IT/resource.json"
51951
+ }
51952
+ },
51953
+ ja: {
51954
+ defaultRegion: {
51955
+ code: "ja-JP",
51956
+ strings: "ja-JP/resource.json"
51957
+ }
51958
+ },
51959
+ kk: {
51960
+ defaultRegion: {
51961
+ code: "kk-KZ",
51962
+ strings: "kk-KZ/resource.json"
51909
51963
  }
51910
51964
  },
51911
51965
  ko: {
51912
51966
  defaultRegion: {
51913
51967
  code: "ko-KR",
51914
- strings: "ko-kr/resource.json"
51968
+ strings: "ko-KR/resource.json"
51915
51969
  }
51916
51970
  },
51917
51971
  lt: {
51918
51972
  defaultRegion: {
51919
51973
  code: "lt-LT",
51920
- strings: "lt-lt/resource.json"
51974
+ strings: "lt-LT/resource.json"
51975
+ }
51976
+ },
51977
+ lv: {
51978
+ defaultRegion: {
51979
+ code: "lv-LV",
51980
+ strings: "lv-LV/resource.json"
51921
51981
  }
51922
51982
  },
51923
51983
  ms: {
51924
51984
  defaultRegion: {
51925
51985
  code: "ms-MY",
51926
- strings: "ms-my/resource.json"
51986
+ strings: "ms-MY/resource.json"
51927
51987
  }
51928
51988
  },
51929
51989
  nb: {
51930
51990
  defaultRegion: {
51931
51991
  code: "nb-NO",
51932
- strings: "nb-no/resource.json"
51992
+ strings: "nb-NO/resource.json"
51933
51993
  }
51934
51994
  },
51935
51995
  nl: {
51936
51996
  defaultRegion: {
51937
51997
  code: "nl-NL",
51938
- strings: "nl-nl/resource.json"
51998
+ strings: "nl-NL/resource.json"
51939
51999
  }
51940
52000
  },
51941
52001
  pl: {
51942
52002
  defaultRegion: {
51943
52003
  code: "pl-PL",
51944
- strings: "pl-pl/resource.json"
52004
+ strings: "pl-PL/resource.json"
51945
52005
  }
51946
52006
  },
51947
52007
  pt: {
51948
52008
  defaultRegion: {
51949
52009
  code: "pt-PT",
51950
- strings: "pt-pt/resource.json"
52010
+ strings: "pt-PT/resource.json"
51951
52011
  },
51952
52012
  br: {
51953
52013
  code: "pt-BR",
51954
- strings: "pt-br/resource.json"
52014
+ strings: "pt-BR/resource.json"
52015
+ }
52016
+ },
52017
+ ro: {
52018
+ defaultRegion: {
52019
+ code: "ro-RO",
52020
+ strings: "ro-RO/resource.json"
51955
52021
  }
51956
52022
  },
51957
52023
  ru: {
51958
52024
  defaultRegion: {
51959
52025
  code: "ru-RU",
51960
- strings: "ru-ru/resource.json"
52026
+ strings: "ru-RU/resource.json"
51961
52027
  }
51962
52028
  },
51963
52029
  sk: {
51964
52030
  defaultRegion: {
51965
52031
  code: "sk-SK",
51966
- strings: "sk-sk/resource.json"
52032
+ strings: "sk-SK/resource.json"
51967
52033
  }
51968
52034
  },
51969
52035
  sl: {
51970
52036
  defaultRegion: {
51971
52037
  code: "sl-SL",
51972
- strings: "sl-sl/resource.json"
52038
+ strings: "sl/resource.json"
52039
+ }
52040
+ },
52041
+ sr: {
52042
+ defaultRegion: {
52043
+ code: "sr-CYRL-RS",
52044
+ strings: "sr-CYRL-RS/resource.json"
52045
+ },
52046
+ latn: {
52047
+ code: "sr-LATN-RS",
52048
+ strings: "sr-LATN-RS/resource.json"
51973
52049
  }
51974
52050
  },
51975
52051
  sv: {
51976
52052
  defaultRegion: {
51977
52053
  code: "sv-SE",
51978
- strings: "sv-se/resource.json"
52054
+ strings: "sv-SE/resource.json"
51979
52055
  }
51980
52056
  },
51981
52057
  th: {
51982
52058
  defaultRegion: {
51983
52059
  code: "th-TH",
51984
- strings: "th-th/resource.json"
52060
+ strings: "th-TH/resource.json"
51985
52061
  }
51986
52062
  },
51987
52063
  tr: {
51988
52064
  defaultRegion: {
51989
52065
  code: "tr-TR",
51990
- strings: "tr-tr/resource.json"
52066
+ strings: "tr-TR/resource.json"
52067
+ }
52068
+ },
52069
+ uk: {
52070
+ defaultRegion: {
52071
+ code: "uk-UA",
52072
+ strings: "uk-UA/resource.json"
52073
+ }
52074
+ },
52075
+ vi: {
52076
+ defaultRegion: {
52077
+ code: "vi-VN",
52078
+ strings: "vi-VN/resource.json"
51991
52079
  }
51992
52080
  },
51993
52081
  zh: {
@@ -52016,7 +52104,7 @@ uniform ${precision} ${type} u_${name};
52016
52104
  },
52017
52105
  tw: {
52018
52106
  code: "zh-Hant-TW",
52019
- strings: "zh-tw/resource.json"
52107
+ strings: "zh-TW/resource.json"
52020
52108
  }
52021
52109
  }
52022
52110
  }
@@ -52079,10 +52167,6 @@ uniform ${precision} ${type} u_${name};
52079
52167
  * A localized version of `"Detour"`.
52080
52168
  */
52081
52169
  this.Detour = "Detour";
52082
- /**
52083
- * A localized version of `"Dummy"`.
52084
- */
52085
- this.Dummy = "Dummy";
52086
52170
  }
52087
52171
  return LocalizedStrings;
52088
52172
  }());
@@ -52225,7 +52309,7 @@ uniform ${precision} ${type} u_${name};
52225
52309
  return UserAgent;
52226
52310
  }());
52227
52311
 
52228
- var version$3 = "3.7.1";
52312
+ var version$3 = "3.7.4";
52229
52313
 
52230
52314
  /**
52231
52315
  * A helper class that provides methods for getting various forms of the map controls current version.
@@ -53191,6 +53275,7 @@ uniform ${precision} ${type} u_${name};
53191
53275
  }
53192
53276
  };
53193
53277
  eventTarget.addEventListener("mouseover", positionTooltip);
53278
+ eventTarget.addEventListener("touchend", positionTooltip);
53194
53279
  eventTarget.addEventListener("focusin", positionTooltip);
53195
53280
  eventTarget.addEventListener("keydown", dismissTooltip);
53196
53281
  };
@@ -57781,12 +57866,43 @@ uniform ${precision} ${type} u_${name};
57781
57866
  if (expanded) {
57782
57867
  container.classList.add(StyleControl.Css.inUse);
57783
57868
  styleOpsGrid.classList.remove("hidden-accessible-element");
57869
+ // Dynamically cap max-height to fit within the map container
57870
+ if (_this.options.layout === "list") {
57871
+ var mapContainer = _this.map.getMapContainer();
57872
+ var mapRect = mapContainer.getBoundingClientRect();
57873
+ var btnRect = currStyleButton.getBoundingClientRect();
57874
+ var btnOffsetTop = Math.max(0, btnRect.top - mapRect.top);
57875
+ var btnHeight = currStyleButton.offsetHeight ||
57876
+ btnRect.height ||
57877
+ 0;
57878
+ var mapHeight = mapContainer.clientHeight;
57879
+ var padding = 8;
57880
+ var isBottomPosition = (options === null || options === void 0 ? void 0 : options.position) === exports.ControlPosition.BottomLeft ||
57881
+ (options === null || options === void 0 ? void 0 : options.position) === exports.ControlPosition.BottomRight;
57882
+ var availableHeight = isBottomPosition
57883
+ ? Math.max(0, btnOffsetTop - padding) // space above button
57884
+ : Math.max(0, mapHeight - (btnOffsetTop + btnHeight + padding)); // space below button
57885
+ var maxHeight = Math.max(100, Math.floor(availableHeight));
57886
+ styleOpsGrid.style.maxHeight = "".concat(maxHeight, "px");
57887
+ }
57784
57888
  }
57785
57889
  else {
57786
57890
  container.classList.remove(StyleControl.Css.inUse);
57787
57891
  styleOpsGrid.classList.add("hidden-accessible-element");
57788
57892
  }
57789
57893
  };
57894
+ var onStyleButtonClick = function () {
57895
+ if (container.classList.contains(StyleControl.Css.inUse)) {
57896
+ expandGrid(false);
57897
+ }
57898
+ else {
57899
+ expandGrid(true);
57900
+ // clicking on a reveal button should move the focus to the first styleOpsGrid button
57901
+ if (styleOpsGrid.firstElementChild) {
57902
+ styleOpsGrid.firstElementChild.focus();
57903
+ }
57904
+ }
57905
+ };
57790
57906
  styleOpsGrid.classList.add(options ? options.position || 'top-right' : 'top-right');
57791
57907
  container.addEventListener("mouseover", function () {
57792
57908
  _this.hasMouse = true;
@@ -57826,17 +57942,12 @@ uniform ${precision} ${type} u_${name};
57826
57942
  }
57827
57943
  }
57828
57944
  });
57945
+ currStyleButton.addEventListener("touchend", function (event) {
57946
+ event.preventDefault();
57947
+ onStyleButtonClick();
57948
+ });
57829
57949
  currStyleButton.addEventListener("click", function (event) {
57830
- if (container.classList.contains(StyleControl.Css.inUse)) {
57831
- expandGrid(false);
57832
- }
57833
- else {
57834
- expandGrid(true);
57835
- // clicking on a reveal button should move the focus to the first styleOpsGrid button
57836
- if (styleOpsGrid.firstElementChild) {
57837
- styleOpsGrid.firstElementChild.focus();
57838
- }
57839
- }
57950
+ onStyleButtonClick();
57840
57951
  });
57841
57952
  if (options && StyleControl.InvertOrderPositions.includes(options.position)) {
57842
57953
  container.appendChild(styleOpsGrid);
@@ -57927,7 +58038,7 @@ uniform ${precision} ${type} u_${name};
57927
58038
  return _this.thumbnailCache.blob.get(response.url);
57928
58039
  }
57929
58040
  else {
57930
- // we need the response.clone() to allow reading over body multiple times since response objects are cached
58041
+ // we need the response.clone() to allow reading over body multiple times since response objects are cached
57931
58042
  // and can be reused across multiple invocations
57932
58043
  var blobPromise = response.clone().blob();
57933
58044
  _this.thumbnailCache.blob.set(response.url, blobPromise);
@@ -57981,7 +58092,7 @@ uniform ${precision} ${type} u_${name};
57981
58092
  };
57982
58093
  StyleControl.prototype.buildCurrStyleBtn = function () {
57983
58094
  var selectCurrButton = document.createElement("button");
57984
- if (this.options.layout == 'icons') {
58095
+ if (this.options.layout === "icons") {
57985
58096
  selectCurrButton.classList.add(StyleControl.Css.button);
57986
58097
  }
57987
58098
  else {
@@ -58000,11 +58111,9 @@ uniform ${precision} ${type} u_${name};
58000
58111
  StyleControl.prototype.buildStyleOpsGrid = function () {
58001
58112
  var _this = this;
58002
58113
  var styleOpsGrid = document.createElement("div");
58003
- styleOpsGrid.classList.add(StyleControl.Css.styleOptions);
58004
- if (this.options.layout === 'icons') {
58005
- styleOpsGrid.classList.add(this.options.layout);
58006
- }
58007
- else {
58114
+ var layoutClass = this.options.layout === "icons" ? "icons" : "list";
58115
+ styleOpsGrid.classList.add(StyleControl.Css.styleOptions, layoutClass);
58116
+ if (layoutClass === "list") {
58008
58117
  styleOpsGrid.classList.add(StyleControl.Css.dropdown);
58009
58118
  }
58010
58119
  styleOpsGrid.setAttribute("aria-label", "Style Options");
@@ -115284,8 +115393,12 @@ uniform ${precision} ${type} u_${name};
115284
115393
  */
115285
115394
  StyleManager.prototype._transformStyleRequest = function (url, params) {
115286
115395
  var _a;
115396
+ var domain = (Url.protoRegEx.test(this.serviceOptions.domain) ?
115397
+ this.serviceOptions.domain.slice(this.serviceOptions.domain.indexOf("\/\/") + 2) :
115398
+ this.serviceOptions.domain)
115399
+ .replace(/\/+$/, "");
115287
115400
  if (url.includes(constants.domainPlaceHolder)) {
115288
- params.url = params.url.replace(constants.domainPlaceHolder, this.serviceOptions.domain);
115401
+ params.url = params.url.replace(constants.domainPlaceHolder, domain);
115289
115402
  }
115290
115403
  if (url.includes(constants.stylePathHolder)) {
115291
115404
  params.url = params.url.replace(constants.stylePathHolder, constants.stylePath);
@@ -115293,7 +115406,7 @@ uniform ${precision} ${type} u_${name};
115293
115406
  if (url.includes(constants.styleResourcePlaceholder)) {
115294
115407
  params.url = params.url.replace(constants.styleResourcePlaceholder, constants.styleResourcePath);
115295
115408
  }
115296
- if (params.url.toLocaleLowerCase().includes(this.serviceOptions.domain.toLocaleLowerCase()) ||
115409
+ if (params.url.toLocaleLowerCase().includes(domain.toLocaleLowerCase()) ||
115297
115410
  params.url.toLocaleLowerCase().includes(this.serviceOptions.staticAssetsDomain.toLocaleLowerCase())) {
115298
115411
  // Only add API version param for Azure maps domain requests
115299
115412
  var targetUrl = new URL(params.url);
@@ -116755,9 +116868,10 @@ uniform ${precision} ${type} u_${name};
116755
116868
  Map.prototype._rebuildStyle = function (diff) {
116756
116869
  if (diff === void 0) { diff = true; }
116757
116870
  return __awaiter(this, void 0, void 0, function () {
116871
+ var _this = this;
116758
116872
  return __generator(this, function (_a) {
116759
116873
  this.styles.setStyle(this.styleOptions, diff);
116760
- this.imageSprite._restoreImages();
116874
+ this.events.addOnce("stylechanged", function () { return _this.imageSprite._restoreImages(); });
116761
116875
  return [2 /*return*/];
116762
116876
  });
116763
116877
  });