azure-maps-control 3.5.0 → 3.6.1

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.
@@ -763,6 +763,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
763
763
  * @param locale The requested culture code.
764
764
  */
765
765
  Localizer.getCode = function (locale) {
766
+ // If locale is set to 'auto', use the browser's configured language.
767
+ if (locale.localeCompare("auto", undefined, { sensitivity: "base" }) === 0) {
768
+ locale = navigator.language;
769
+ }
766
770
  var code = CultureCode.parse(locale);
767
771
  // If the requested culture code includes a sensitive region simply return the original code.
768
772
  // This is to hopefully reduce the risk or providing bad content to users in a sensitive region.
@@ -886,7 +890,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
886
890
  return UserAgent;
887
891
  }());
888
892
 
889
- var version = "3.5.0";
893
+ var version = "3.6.1";
890
894
 
891
895
  /**
892
896
  * A helper class that provides methods for getting various forms of the map controls current version.
@@ -1491,10 +1495,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
1491
1495
  * language is explicitly specified when using those parts of the API.
1492
1496
  * If a Map is initialized with the language explicitly defined and
1493
1497
  * setLanguage hasn't previously been called it will automatically be called by the Map constructor.
1494
- * @param language The new default language.
1498
+ * @param language The new default language. If set to "auto", the browser's configured language will be used.
1495
1499
  */
1496
1500
  function setLanguage(language) {
1497
- // Find the best fit supported language.
1498
1501
  defaultLanguage = Localizer.getCode(language);
1499
1502
  hasSetLanguage = true;
1500
1503
  }
@@ -2254,12 +2257,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
2254
2257
  var expandGrid = function (expanded) {
2255
2258
  if (expanded) {
2256
2259
  container.classList.add("in-use");
2257
- grid.setAttribute("aria-hidden", "false");
2258
2260
  grid.classList.remove("hidden-accessible-element");
2259
2261
  }
2260
2262
  else {
2261
2263
  container.classList.remove("in-use");
2262
- grid.setAttribute("aria-hidden", "true");
2263
2264
  grid.classList.add("hidden-accessible-element");
2264
2265
  }
2265
2266
  };
@@ -2326,7 +2327,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
2326
2327
  var grid = document.createElement("div");
2327
2328
  grid.classList.add("sub-container");
2328
2329
  grid.classList.add("hidden-accessible-element");
2329
- grid.setAttribute("aria-hidden", "true");
2330
2330
  var rotationRightButton = this.constructRightRotationButton(map);
2331
2331
  var rotationLeftButton = this.constructLeftRotationButton(map);
2332
2332
  var tooltipLeft = buildAccessibleTooltip("Rotate Left");
@@ -2532,12 +2532,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
2532
2532
  var expandGrid = function (expanded) {
2533
2533
  if (expanded) {
2534
2534
  container.classList.add("in-use");
2535
- grid.setAttribute("aria-hidden", "false");
2536
2535
  grid.classList.remove("hidden-accessible-element");
2537
2536
  }
2538
2537
  else {
2539
2538
  container.classList.remove("in-use");
2540
- grid.setAttribute("aria-hidden", "true");
2541
2539
  grid.classList.add("hidden-accessible-element");
2542
2540
  }
2543
2541
  };
@@ -2622,7 +2620,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
2622
2620
  var grid = document.createElement("div");
2623
2621
  grid.classList.add("sub-container");
2624
2622
  grid.classList.add("hidden-accessible-element");
2625
- grid.setAttribute("aria-hidden", "true");
2626
2623
  this.pitchIncrementButton = this.constructPitchIncrementButton(map);
2627
2624
  this.pitchDecrementButton = this.constructPitchDecrementButton(map);
2628
2625
  var tooltipIncrement = buildAccessibleTooltip("Increase Pitch");
@@ -6439,12 +6436,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
6439
6436
  var expandGrid = function (expanded) {
6440
6437
  if (expanded) {
6441
6438
  container.classList.add(StyleControl.Css.inUse);
6442
- styleOpsGrid.setAttribute("aria-hidden", "false");
6443
6439
  styleOpsGrid.classList.remove("hidden-accessible-element");
6444
6440
  }
6445
6441
  else {
6446
6442
  container.classList.remove(StyleControl.Css.inUse);
6447
- styleOpsGrid.setAttribute("aria-hidden", "true");
6448
6443
  styleOpsGrid.classList.add("hidden-accessible-element");
6449
6444
  }
6450
6445
  };
@@ -6670,7 +6665,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
6670
6665
  }
6671
6666
  styleOpsGrid.setAttribute("aria-label", "Style Options");
6672
6667
  styleOpsGrid.classList.add("hidden-accessible-element");
6673
- styleOpsGrid.setAttribute("aria-hidden", "true");
6674
6668
  // Once the map's style definition is initialized create a map between style names and icons.
6675
6669
  // If a style is one of those to be shown by the style picker also create it's element.
6676
6670
  this.map.styles.definitions().then(function (definitions) { return __awaiter$3(_this, void 0, void 0, function () {
@@ -11919,9 +11913,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
11919
11913
  zoomInButton.setAttribute("alt", "Zoom In");
11920
11914
  zoomInButton.setAttribute("type", "button");
11921
11915
  zoomInButton.addEventListener("click", function () {
11922
- var _a;
11923
11916
  map.setCamera({
11924
- maxBounds: (_a = map._getMap().getMaxBounds()) === null || _a === void 0 ? void 0 : _a.toArray().flat(),
11925
11917
  zoom: map.getCamera().zoom + _this.options.zoomDelta,
11926
11918
  duration: ZoomControl.ZOOM_DURATION_MS,
11927
11919
  type: "ease",
@@ -11938,9 +11930,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
11938
11930
  zoomOutButton.setAttribute("alt", "Zoom Out");
11939
11931
  zoomOutButton.setAttribute("type", "button");
11940
11932
  zoomOutButton.addEventListener("click", function () {
11941
- var _a;
11942
11933
  map.setCamera({
11943
- maxBounds: (_a = map._getMap().getMaxBounds()) === null || _a === void 0 ? void 0 : _a.toArray().flat(),
11944
11934
  zoom: map.getCamera().zoom - _this.options.zoomDelta,
11945
11935
  duration: ZoomControl.ZOOM_DURATION_MS,
11946
11936
  type: "ease",
@@ -14477,7 +14467,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
14477
14467
  */
14478
14468
  ImageLayer.prototype.setOptions = function (options) {
14479
14469
  var newOptions = new ImageLayerOptions().merge(this.options, cloneDeepWith$1(options, ImageLayerOptions._cloneCustomizer));
14480
- var reloadImageTransform = (typeof options.url === "string" && options.url !== this.getOptions().url);
14470
+ var reloadImage = (typeof options.url === "string" && options.url !== this.getOptions().url);
14481
14471
  var coordChanged = (typeof options.coordinates !== "undefined" && options.coordinates !== this.getOptions().coordinates);
14482
14472
  if (this.map) {
14483
14473
  this._updateBaseProperties(newOptions, this.options);
@@ -14487,16 +14477,17 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
14487
14477
  this._updatePaintProperty("raster-brightness-max", newOptions.maxBrightness, this.options.maxBrightness);
14488
14478
  this._updatePaintProperty("raster-opacity", newOptions.opacity, this.options.opacity);
14489
14479
  this._updatePaintProperty("raster-saturation", newOptions.saturation, this.options.saturation);
14490
- // TODO: the mapbox typing file doesn't support maplibregl.ImageSource.updateImage()
14491
- // update "as any" to "as maplibregl.ImageSource" after the typing file is updated
14480
+ // Get the image source
14492
14481
  var source = this.map._getMap().getSource(this._getSourceId());
14493
- if (source) {
14482
+ // Check if the source exists and if we need to reload the image or if coordinates have changed
14483
+ if (source && (reloadImage || coordChanged)) {
14484
+ // Update the image with the new options
14494
14485
  source.updateImage(newOptions);
14495
14486
  }
14496
14487
  }
14497
14488
  this.options = newOptions;
14498
14489
  // Modified to update transform if image url or coordinates change
14499
- if (reloadImageTransform) {
14490
+ if (reloadImage) {
14500
14491
  this.reloadImage();
14501
14492
  }
14502
14493
  else if (coordChanged) {
@@ -17028,6 +17019,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
17028
17019
  ele.addEventListener("click", this.close);
17029
17020
  ele.classList.add(Popup.Css.close);
17030
17021
  ele.setAttribute("aria-label", "close");
17022
+ ele.setAttribute("type", "button");
17031
17023
  ele.setAttribute("tabindex", "0");
17032
17024
  ele.innerHTML = "×";
17033
17025
  return ele;
@@ -21481,6 +21473,12 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
21481
21473
  * @deprecated use `view` instead.
21482
21474
  */
21483
21475
  _this.userRegion = _this.view;
21476
+ /**
21477
+ * Override the default styles for the map elements.​
21478
+ * Default `undefined`
21479
+ * @default undefined
21480
+ */
21481
+ _this.styleOverrides = undefined;
21484
21482
  /**
21485
21483
  * allows substituting a default MapControl's style transformer with custom one
21486
21484
  * Default style transformer is meant to update the incoming fetched style to desired state, as well as to synchronize the SDK state with style state
@@ -21618,10 +21616,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
21618
21616
  /**
21619
21617
  * Disable telemetry collection
21620
21618
  * This option may only be set when initializing the map.
21621
- * default: false (true for the Azure Government cloud)
21622
- * @default false
21619
+ * default: true
21620
+ * @default true
21623
21621
  */
21624
- _this.disableTelemetry = getDomain() === "atlas.azure.us";
21622
+ _this.disableTelemetry = true;
21625
21623
  /**
21626
21624
  * Disable telemetry collection
21627
21625
  * This option may only be set when initializing the map.
@@ -22114,6 +22112,16 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
22114
22112
  };
22115
22113
  throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
22116
22114
  };
22115
+ /**
22116
+ * Mapping of styleOverrides options to style parameter values.
22117
+ */
22118
+ var styleOverridesMapping = {
22119
+ countryRegion: "cr|bv:0",
22120
+ adminDistrict: "ad|bv:0",
22121
+ adminDistrict2: "ds|bv:0",
22122
+ buildingFootprint: "bld|v:0_adr|lv:0",
22123
+ roadDetails: "g|rasterDetailsVisible:0"
22124
+ };
22117
22125
  /**
22118
22126
  * @private
22119
22127
  */
@@ -22624,7 +22632,31 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
22624
22632
  return targetStyleWithUserLayers;
22625
22633
  };
22626
22634
  }
22627
- this.map._getMap().setStyle(targetDefinition.url || targetDefinition.style, {
22635
+ var styleUrl = targetDefinition.url;
22636
+ if (styleUrl && (styleOptions === null || styleOptions === void 0 ? void 0 : styleOptions.styleOverrides)) {
22637
+ // Append the st parameter in the url with the mapped value.
22638
+ // We loop through the styleOverrides and join the corresponding st parameter with "_".
22639
+ var url = new URL(styleUrl);
22640
+ var params = new URLSearchParams(url.search);
22641
+ var stParams = Object.entries(styleOptions === null || styleOptions === void 0 ? void 0 : styleOptions.styleOverrides)
22642
+ .filter(function (_a) {
22643
+ var _b = __read$2(_a, 2), key = _b[0], value = _b[1];
22644
+ return key in styleOverridesMapping &&
22645
+ ( // bv stands for borderVisible
22646
+ (styleOverridesMapping[key].includes('bv') && (value === null || value === void 0 ? void 0 : value.borderVisible) === false) ||
22647
+ (!styleOverridesMapping[key].includes('bv') && (value === null || value === void 0 ? void 0 : value.visible) === false));
22648
+ })
22649
+ .map(function (_a) {
22650
+ var _b = __read$2(_a, 2), key = _b[0]; _b[1];
22651
+ return styleOverridesMapping[key];
22652
+ });
22653
+ if (stParams.length > 0) {
22654
+ params.set("st", stParams.join("_"));
22655
+ url.search = params.toString();
22656
+ styleUrl = url.toString();
22657
+ }
22658
+ }
22659
+ this.map._getMap().setStyle(styleUrl || targetDefinition.style, {
22628
22660
  diff: diff,
22629
22661
  validate: this.serviceOptions.validateStyle,
22630
22662
  transformStyle: transformStyleFunc
@@ -23396,6 +23428,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
23396
23428
  * Returns the camera's current properties.
23397
23429
  */
23398
23430
  Map.prototype.getCamera = function () {
23431
+ var _a;
23399
23432
  var southWest = this.map.getBounds().getSouthWest().toArray();
23400
23433
  var northEast = this.map.getBounds().getNorthEast().toArray();
23401
23434
  var cameraOptions = {
@@ -23405,7 +23438,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
23405
23438
  pitch: this.map.getPitch(),
23406
23439
  bounds: new BoundingBox(southWest, northEast),
23407
23440
  minZoom: this.map.getMinZoom(),
23408
- maxZoom: this.map.getMaxZoom()
23441
+ maxZoom: this.map.getMaxZoom(),
23442
+ maxBounds: (_a = this.map.getMaxBounds()) === null || _a === void 0 ? void 0 : _a.toArray().flat(),
23409
23443
  };
23410
23444
  return cameraOptions;
23411
23445
  };
@@ -763,6 +763,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
763
763
  * @param locale The requested culture code.
764
764
  */
765
765
  Localizer.getCode = function (locale) {
766
+ // If locale is set to 'auto', use the browser's configured language.
767
+ if (locale.localeCompare("auto", undefined, { sensitivity: "base" }) === 0) {
768
+ locale = navigator.language;
769
+ }
766
770
  var code = CultureCode.parse(locale);
767
771
  // If the requested culture code includes a sensitive region simply return the original code.
768
772
  // This is to hopefully reduce the risk or providing bad content to users in a sensitive region.
@@ -886,7 +890,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
886
890
  return UserAgent;
887
891
  }());
888
892
 
889
- var version$2 = "3.5.0";
893
+ var version$2 = "3.6.1";
890
894
 
891
895
  /**
892
896
  * A helper class that provides methods for getting various forms of the map controls current version.
@@ -1491,10 +1495,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
1491
1495
  * language is explicitly specified when using those parts of the API.
1492
1496
  * If a Map is initialized with the language explicitly defined and
1493
1497
  * setLanguage hasn't previously been called it will automatically be called by the Map constructor.
1494
- * @param language The new default language.
1498
+ * @param language The new default language. If set to "auto", the browser's configured language will be used.
1495
1499
  */
1496
1500
  function setLanguage(language) {
1497
- // Find the best fit supported language.
1498
1501
  defaultLanguage = Localizer.getCode(language);
1499
1502
  hasSetLanguage = true;
1500
1503
  }
@@ -2254,12 +2257,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
2254
2257
  var expandGrid = function (expanded) {
2255
2258
  if (expanded) {
2256
2259
  container.classList.add("in-use");
2257
- grid.setAttribute("aria-hidden", "false");
2258
2260
  grid.classList.remove("hidden-accessible-element");
2259
2261
  }
2260
2262
  else {
2261
2263
  container.classList.remove("in-use");
2262
- grid.setAttribute("aria-hidden", "true");
2263
2264
  grid.classList.add("hidden-accessible-element");
2264
2265
  }
2265
2266
  };
@@ -2326,7 +2327,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
2326
2327
  var grid = document.createElement("div");
2327
2328
  grid.classList.add("sub-container");
2328
2329
  grid.classList.add("hidden-accessible-element");
2329
- grid.setAttribute("aria-hidden", "true");
2330
2330
  var rotationRightButton = this.constructRightRotationButton(map);
2331
2331
  var rotationLeftButton = this.constructLeftRotationButton(map);
2332
2332
  var tooltipLeft = buildAccessibleTooltip("Rotate Left");
@@ -2532,12 +2532,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
2532
2532
  var expandGrid = function (expanded) {
2533
2533
  if (expanded) {
2534
2534
  container.classList.add("in-use");
2535
- grid.setAttribute("aria-hidden", "false");
2536
2535
  grid.classList.remove("hidden-accessible-element");
2537
2536
  }
2538
2537
  else {
2539
2538
  container.classList.remove("in-use");
2540
- grid.setAttribute("aria-hidden", "true");
2541
2539
  grid.classList.add("hidden-accessible-element");
2542
2540
  }
2543
2541
  };
@@ -2622,7 +2620,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
2622
2620
  var grid = document.createElement("div");
2623
2621
  grid.classList.add("sub-container");
2624
2622
  grid.classList.add("hidden-accessible-element");
2625
- grid.setAttribute("aria-hidden", "true");
2626
2623
  this.pitchIncrementButton = this.constructPitchIncrementButton(map);
2627
2624
  this.pitchDecrementButton = this.constructPitchDecrementButton(map);
2628
2625
  var tooltipIncrement = buildAccessibleTooltip("Increase Pitch");
@@ -6439,12 +6436,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
6439
6436
  var expandGrid = function (expanded) {
6440
6437
  if (expanded) {
6441
6438
  container.classList.add(StyleControl.Css.inUse);
6442
- styleOpsGrid.setAttribute("aria-hidden", "false");
6443
6439
  styleOpsGrid.classList.remove("hidden-accessible-element");
6444
6440
  }
6445
6441
  else {
6446
6442
  container.classList.remove(StyleControl.Css.inUse);
6447
- styleOpsGrid.setAttribute("aria-hidden", "true");
6448
6443
  styleOpsGrid.classList.add("hidden-accessible-element");
6449
6444
  }
6450
6445
  };
@@ -6670,7 +6665,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
6670
6665
  }
6671
6666
  styleOpsGrid.setAttribute("aria-label", "Style Options");
6672
6667
  styleOpsGrid.classList.add("hidden-accessible-element");
6673
- styleOpsGrid.setAttribute("aria-hidden", "true");
6674
6668
  // Once the map's style definition is initialized create a map between style names and icons.
6675
6669
  // If a style is one of those to be shown by the style picker also create it's element.
6676
6670
  this.map.styles.definitions().then(function (definitions) { return __awaiter$7(_this, void 0, void 0, function () {
@@ -11919,9 +11913,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
11919
11913
  zoomInButton.setAttribute("alt", "Zoom In");
11920
11914
  zoomInButton.setAttribute("type", "button");
11921
11915
  zoomInButton.addEventListener("click", function () {
11922
- var _a;
11923
11916
  map.setCamera({
11924
- maxBounds: (_a = map._getMap().getMaxBounds()) === null || _a === void 0 ? void 0 : _a.toArray().flat(),
11925
11917
  zoom: map.getCamera().zoom + _this.options.zoomDelta,
11926
11918
  duration: ZoomControl.ZOOM_DURATION_MS,
11927
11919
  type: "ease",
@@ -11938,9 +11930,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
11938
11930
  zoomOutButton.setAttribute("alt", "Zoom Out");
11939
11931
  zoomOutButton.setAttribute("type", "button");
11940
11932
  zoomOutButton.addEventListener("click", function () {
11941
- var _a;
11942
11933
  map.setCamera({
11943
- maxBounds: (_a = map._getMap().getMaxBounds()) === null || _a === void 0 ? void 0 : _a.toArray().flat(),
11944
11934
  zoom: map.getCamera().zoom - _this.options.zoomDelta,
11945
11935
  duration: ZoomControl.ZOOM_DURATION_MS,
11946
11936
  type: "ease",
@@ -14477,7 +14467,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
14477
14467
  */
14478
14468
  ImageLayer.prototype.setOptions = function (options) {
14479
14469
  var newOptions = new ImageLayerOptions().merge(this.options, cloneDeepWith$1(options, ImageLayerOptions._cloneCustomizer));
14480
- var reloadImageTransform = (typeof options.url === "string" && options.url !== this.getOptions().url);
14470
+ var reloadImage = (typeof options.url === "string" && options.url !== this.getOptions().url);
14481
14471
  var coordChanged = (typeof options.coordinates !== "undefined" && options.coordinates !== this.getOptions().coordinates);
14482
14472
  if (this.map) {
14483
14473
  this._updateBaseProperties(newOptions, this.options);
@@ -14487,16 +14477,17 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
14487
14477
  this._updatePaintProperty("raster-brightness-max", newOptions.maxBrightness, this.options.maxBrightness);
14488
14478
  this._updatePaintProperty("raster-opacity", newOptions.opacity, this.options.opacity);
14489
14479
  this._updatePaintProperty("raster-saturation", newOptions.saturation, this.options.saturation);
14490
- // TODO: the mapbox typing file doesn't support maplibregl.ImageSource.updateImage()
14491
- // update "as any" to "as maplibregl.ImageSource" after the typing file is updated
14480
+ // Get the image source
14492
14481
  var source = this.map._getMap().getSource(this._getSourceId());
14493
- if (source) {
14482
+ // Check if the source exists and if we need to reload the image or if coordinates have changed
14483
+ if (source && (reloadImage || coordChanged)) {
14484
+ // Update the image with the new options
14494
14485
  source.updateImage(newOptions);
14495
14486
  }
14496
14487
  }
14497
14488
  this.options = newOptions;
14498
14489
  // Modified to update transform if image url or coordinates change
14499
- if (reloadImageTransform) {
14490
+ if (reloadImage) {
14500
14491
  this.reloadImage();
14501
14492
  }
14502
14493
  else if (coordChanged) {
@@ -17028,6 +17019,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
17028
17019
  ele.addEventListener("click", this.close);
17029
17020
  ele.classList.add(Popup.Css.close);
17030
17021
  ele.setAttribute("aria-label", "close");
17022
+ ele.setAttribute("type", "button");
17031
17023
  ele.setAttribute("tabindex", "0");
17032
17024
  ele.innerHTML = "×";
17033
17025
  return ele;
@@ -45142,6 +45134,12 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
45142
45134
  * @deprecated use `view` instead.
45143
45135
  */
45144
45136
  _this.userRegion = _this.view;
45137
+ /**
45138
+ * Override the default styles for the map elements.​
45139
+ * Default `undefined`
45140
+ * @default undefined
45141
+ */
45142
+ _this.styleOverrides = undefined;
45145
45143
  /**
45146
45144
  * allows substituting a default MapControl's style transformer with custom one
45147
45145
  * Default style transformer is meant to update the incoming fetched style to desired state, as well as to synchronize the SDK state with style state
@@ -45279,10 +45277,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
45279
45277
  /**
45280
45278
  * Disable telemetry collection
45281
45279
  * This option may only be set when initializing the map.
45282
- * default: false (true for the Azure Government cloud)
45283
- * @default false
45280
+ * default: true
45281
+ * @default true
45284
45282
  */
45285
- _this.disableTelemetry = getDomain() === "atlas.azure.us";
45283
+ _this.disableTelemetry = true;
45286
45284
  /**
45287
45285
  * Disable telemetry collection
45288
45286
  * This option may only be set when initializing the map.
@@ -45775,6 +45773,16 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
45775
45773
  };
45776
45774
  throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
45777
45775
  };
45776
+ /**
45777
+ * Mapping of styleOverrides options to style parameter values.
45778
+ */
45779
+ var styleOverridesMapping = {
45780
+ countryRegion: "cr|bv:0",
45781
+ adminDistrict: "ad|bv:0",
45782
+ adminDistrict2: "ds|bv:0",
45783
+ buildingFootprint: "bld|v:0_adr|lv:0",
45784
+ roadDetails: "g|rasterDetailsVisible:0"
45785
+ };
45778
45786
  /**
45779
45787
  * @private
45780
45788
  */
@@ -46285,7 +46293,31 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
46285
46293
  return targetStyleWithUserLayers;
46286
46294
  };
46287
46295
  }
46288
- this.map._getMap().setStyle(targetDefinition.url || targetDefinition.style, {
46296
+ var styleUrl = targetDefinition.url;
46297
+ if (styleUrl && (styleOptions === null || styleOptions === void 0 ? void 0 : styleOptions.styleOverrides)) {
46298
+ // Append the st parameter in the url with the mapped value.
46299
+ // We loop through the styleOverrides and join the corresponding st parameter with "_".
46300
+ var url = new URL(styleUrl);
46301
+ var params = new URLSearchParams(url.search);
46302
+ var stParams = Object.entries(styleOptions === null || styleOptions === void 0 ? void 0 : styleOptions.styleOverrides)
46303
+ .filter(function (_a) {
46304
+ var _b = __read$2(_a, 2), key = _b[0], value = _b[1];
46305
+ return key in styleOverridesMapping &&
46306
+ ( // bv stands for borderVisible
46307
+ (styleOverridesMapping[key].includes('bv') && (value === null || value === void 0 ? void 0 : value.borderVisible) === false) ||
46308
+ (!styleOverridesMapping[key].includes('bv') && (value === null || value === void 0 ? void 0 : value.visible) === false));
46309
+ })
46310
+ .map(function (_a) {
46311
+ var _b = __read$2(_a, 2), key = _b[0]; _b[1];
46312
+ return styleOverridesMapping[key];
46313
+ });
46314
+ if (stParams.length > 0) {
46315
+ params.set("st", stParams.join("_"));
46316
+ url.search = params.toString();
46317
+ styleUrl = url.toString();
46318
+ }
46319
+ }
46320
+ this.map._getMap().setStyle(styleUrl || targetDefinition.style, {
46289
46321
  diff: diff,
46290
46322
  validate: this.serviceOptions.validateStyle,
46291
46323
  transformStyle: transformStyleFunc
@@ -47063,6 +47095,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
47063
47095
  * Returns the camera's current properties.
47064
47096
  */
47065
47097
  Map.prototype.getCamera = function () {
47098
+ var _a;
47066
47099
  var southWest = this.map.getBounds().getSouthWest().toArray();
47067
47100
  var northEast = this.map.getBounds().getNorthEast().toArray();
47068
47101
  var cameraOptions = {
@@ -47072,7 +47105,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
47072
47105
  pitch: this.map.getPitch(),
47073
47106
  bounds: new BoundingBox(southWest, northEast),
47074
47107
  minZoom: this.map.getMinZoom(),
47075
- maxZoom: this.map.getMaxZoom()
47108
+ maxZoom: this.map.getMaxZoom(),
47109
+ maxBounds: (_a = this.map.getMaxBounds()) === null || _a === void 0 ? void 0 : _a.toArray().flat(),
47076
47110
  };
47077
47111
  return cameraOptions;
47078
47112
  };