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.
@@ -52094,6 +52094,10 @@ uniform ${precision} ${type} u_${name};
52094
52094
  * @param locale The requested culture code.
52095
52095
  */
52096
52096
  Localizer.getCode = function (locale) {
52097
+ // If locale is set to 'auto', use the browser's configured language.
52098
+ if (locale.localeCompare("auto", undefined, { sensitivity: "base" }) === 0) {
52099
+ locale = navigator.language;
52100
+ }
52097
52101
  var code = CultureCode.parse(locale);
52098
52102
  // If the requested culture code includes a sensitive region simply return the original code.
52099
52103
  // This is to hopefully reduce the risk or providing bad content to users in a sensitive region.
@@ -52217,7 +52221,7 @@ uniform ${precision} ${type} u_${name};
52217
52221
  return UserAgent;
52218
52222
  }());
52219
52223
 
52220
- var version = "3.5.0";
52224
+ var version = "3.6.1";
52221
52225
 
52222
52226
  /**
52223
52227
  * A helper class that provides methods for getting various forms of the map controls current version.
@@ -52822,10 +52826,9 @@ uniform ${precision} ${type} u_${name};
52822
52826
  * language is explicitly specified when using those parts of the API.
52823
52827
  * If a Map is initialized with the language explicitly defined and
52824
52828
  * setLanguage hasn't previously been called it will automatically be called by the Map constructor.
52825
- * @param language The new default language.
52829
+ * @param language The new default language. If set to "auto", the browser's configured language will be used.
52826
52830
  */
52827
52831
  function setLanguage(language) {
52828
- // Find the best fit supported language.
52829
52832
  defaultLanguage = Localizer.getCode(language);
52830
52833
  hasSetLanguage = true;
52831
52834
  }
@@ -53585,12 +53588,10 @@ uniform ${precision} ${type} u_${name};
53585
53588
  var expandGrid = function (expanded) {
53586
53589
  if (expanded) {
53587
53590
  container.classList.add("in-use");
53588
- grid.setAttribute("aria-hidden", "false");
53589
53591
  grid.classList.remove("hidden-accessible-element");
53590
53592
  }
53591
53593
  else {
53592
53594
  container.classList.remove("in-use");
53593
- grid.setAttribute("aria-hidden", "true");
53594
53595
  grid.classList.add("hidden-accessible-element");
53595
53596
  }
53596
53597
  };
@@ -53657,7 +53658,6 @@ uniform ${precision} ${type} u_${name};
53657
53658
  var grid = document.createElement("div");
53658
53659
  grid.classList.add("sub-container");
53659
53660
  grid.classList.add("hidden-accessible-element");
53660
- grid.setAttribute("aria-hidden", "true");
53661
53661
  var rotationRightButton = this.constructRightRotationButton(map);
53662
53662
  var rotationLeftButton = this.constructLeftRotationButton(map);
53663
53663
  var tooltipLeft = buildAccessibleTooltip("Rotate Left");
@@ -53863,12 +53863,10 @@ uniform ${precision} ${type} u_${name};
53863
53863
  var expandGrid = function (expanded) {
53864
53864
  if (expanded) {
53865
53865
  container.classList.add("in-use");
53866
- grid.setAttribute("aria-hidden", "false");
53867
53866
  grid.classList.remove("hidden-accessible-element");
53868
53867
  }
53869
53868
  else {
53870
53869
  container.classList.remove("in-use");
53871
- grid.setAttribute("aria-hidden", "true");
53872
53870
  grid.classList.add("hidden-accessible-element");
53873
53871
  }
53874
53872
  };
@@ -53953,7 +53951,6 @@ uniform ${precision} ${type} u_${name};
53953
53951
  var grid = document.createElement("div");
53954
53952
  grid.classList.add("sub-container");
53955
53953
  grid.classList.add("hidden-accessible-element");
53956
- grid.setAttribute("aria-hidden", "true");
53957
53954
  this.pitchIncrementButton = this.constructPitchIncrementButton(map);
53958
53955
  this.pitchDecrementButton = this.constructPitchDecrementButton(map);
53959
53956
  var tooltipIncrement = buildAccessibleTooltip("Increase Pitch");
@@ -57770,12 +57767,10 @@ uniform ${precision} ${type} u_${name};
57770
57767
  var expandGrid = function (expanded) {
57771
57768
  if (expanded) {
57772
57769
  container.classList.add(StyleControl.Css.inUse);
57773
- styleOpsGrid.setAttribute("aria-hidden", "false");
57774
57770
  styleOpsGrid.classList.remove("hidden-accessible-element");
57775
57771
  }
57776
57772
  else {
57777
57773
  container.classList.remove(StyleControl.Css.inUse);
57778
- styleOpsGrid.setAttribute("aria-hidden", "true");
57779
57774
  styleOpsGrid.classList.add("hidden-accessible-element");
57780
57775
  }
57781
57776
  };
@@ -58001,7 +57996,6 @@ uniform ${precision} ${type} u_${name};
58001
57996
  }
58002
57997
  styleOpsGrid.setAttribute("aria-label", "Style Options");
58003
57998
  styleOpsGrid.classList.add("hidden-accessible-element");
58004
- styleOpsGrid.setAttribute("aria-hidden", "true");
58005
57999
  // Once the map's style definition is initialized create a map between style names and icons.
58006
58000
  // If a style is one of those to be shown by the style picker also create it's element.
58007
58001
  this.map.styles.definitions().then(function (definitions) { return __awaiter$3(_this, void 0, void 0, function () {
@@ -63250,9 +63244,7 @@ uniform ${precision} ${type} u_${name};
63250
63244
  zoomInButton.setAttribute("alt", "Zoom In");
63251
63245
  zoomInButton.setAttribute("type", "button");
63252
63246
  zoomInButton.addEventListener("click", function () {
63253
- var _a;
63254
63247
  map.setCamera({
63255
- maxBounds: (_a = map._getMap().getMaxBounds()) === null || _a === void 0 ? void 0 : _a.toArray().flat(),
63256
63248
  zoom: map.getCamera().zoom + _this.options.zoomDelta,
63257
63249
  duration: ZoomControl.ZOOM_DURATION_MS,
63258
63250
  type: "ease",
@@ -63269,9 +63261,7 @@ uniform ${precision} ${type} u_${name};
63269
63261
  zoomOutButton.setAttribute("alt", "Zoom Out");
63270
63262
  zoomOutButton.setAttribute("type", "button");
63271
63263
  zoomOutButton.addEventListener("click", function () {
63272
- var _a;
63273
63264
  map.setCamera({
63274
- maxBounds: (_a = map._getMap().getMaxBounds()) === null || _a === void 0 ? void 0 : _a.toArray().flat(),
63275
63265
  zoom: map.getCamera().zoom - _this.options.zoomDelta,
63276
63266
  duration: ZoomControl.ZOOM_DURATION_MS,
63277
63267
  type: "ease",
@@ -65808,7 +65798,7 @@ uniform ${precision} ${type} u_${name};
65808
65798
  */
65809
65799
  ImageLayer.prototype.setOptions = function (options) {
65810
65800
  var newOptions = new ImageLayerOptions().merge(this.options, cloneDeepWith$1(options, ImageLayerOptions._cloneCustomizer));
65811
- var reloadImageTransform = (typeof options.url === "string" && options.url !== this.getOptions().url);
65801
+ var reloadImage = (typeof options.url === "string" && options.url !== this.getOptions().url);
65812
65802
  var coordChanged = (typeof options.coordinates !== "undefined" && options.coordinates !== this.getOptions().coordinates);
65813
65803
  if (this.map) {
65814
65804
  this._updateBaseProperties(newOptions, this.options);
@@ -65818,16 +65808,17 @@ uniform ${precision} ${type} u_${name};
65818
65808
  this._updatePaintProperty("raster-brightness-max", newOptions.maxBrightness, this.options.maxBrightness);
65819
65809
  this._updatePaintProperty("raster-opacity", newOptions.opacity, this.options.opacity);
65820
65810
  this._updatePaintProperty("raster-saturation", newOptions.saturation, this.options.saturation);
65821
- // TODO: the mapbox typing file doesn't support maplibregl.ImageSource.updateImage()
65822
- // update "as any" to "as maplibregl.ImageSource" after the typing file is updated
65811
+ // Get the image source
65823
65812
  var source = this.map._getMap().getSource(this._getSourceId());
65824
- if (source) {
65813
+ // Check if the source exists and if we need to reload the image or if coordinates have changed
65814
+ if (source && (reloadImage || coordChanged)) {
65815
+ // Update the image with the new options
65825
65816
  source.updateImage(newOptions);
65826
65817
  }
65827
65818
  }
65828
65819
  this.options = newOptions;
65829
65820
  // Modified to update transform if image url or coordinates change
65830
- if (reloadImageTransform) {
65821
+ if (reloadImage) {
65831
65822
  this.reloadImage();
65832
65823
  }
65833
65824
  else if (coordChanged) {
@@ -68359,6 +68350,7 @@ uniform ${precision} ${type} u_${name};
68359
68350
  ele.addEventListener("click", this.close);
68360
68351
  ele.classList.add(Popup.Css.close);
68361
68352
  ele.setAttribute("aria-label", "close");
68353
+ ele.setAttribute("type", "button");
68362
68354
  ele.setAttribute("tabindex", "0");
68363
68355
  ele.innerHTML = "×";
68364
68356
  return ele;
@@ -72812,6 +72804,12 @@ uniform ${precision} ${type} u_${name};
72812
72804
  * @deprecated use `view` instead.
72813
72805
  */
72814
72806
  _this.userRegion = _this.view;
72807
+ /**
72808
+ * Override the default styles for the map elements.​
72809
+ * Default `undefined`
72810
+ * @default undefined
72811
+ */
72812
+ _this.styleOverrides = undefined;
72815
72813
  /**
72816
72814
  * allows substituting a default MapControl's style transformer with custom one
72817
72815
  * 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
@@ -72949,10 +72947,10 @@ uniform ${precision} ${type} u_${name};
72949
72947
  /**
72950
72948
  * Disable telemetry collection
72951
72949
  * This option may only be set when initializing the map.
72952
- * default: false (true for the Azure Government cloud)
72953
- * @default false
72950
+ * default: true
72951
+ * @default true
72954
72952
  */
72955
- _this.disableTelemetry = getDomain() === "atlas.azure.us";
72953
+ _this.disableTelemetry = true;
72956
72954
  /**
72957
72955
  * Disable telemetry collection
72958
72956
  * This option may only be set when initializing the map.
@@ -73445,6 +73443,16 @@ uniform ${precision} ${type} u_${name};
73445
73443
  };
73446
73444
  throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
73447
73445
  };
73446
+ /**
73447
+ * Mapping of styleOverrides options to style parameter values.
73448
+ */
73449
+ var styleOverridesMapping = {
73450
+ countryRegion: "cr|bv:0",
73451
+ adminDistrict: "ad|bv:0",
73452
+ adminDistrict2: "ds|bv:0",
73453
+ buildingFootprint: "bld|v:0_adr|lv:0",
73454
+ roadDetails: "g|rasterDetailsVisible:0"
73455
+ };
73448
73456
  /**
73449
73457
  * @private
73450
73458
  */
@@ -73955,7 +73963,31 @@ uniform ${precision} ${type} u_${name};
73955
73963
  return targetStyleWithUserLayers;
73956
73964
  };
73957
73965
  }
73958
- this.map._getMap().setStyle(targetDefinition.url || targetDefinition.style, {
73966
+ var styleUrl = targetDefinition.url;
73967
+ if (styleUrl && (styleOptions === null || styleOptions === void 0 ? void 0 : styleOptions.styleOverrides)) {
73968
+ // Append the st parameter in the url with the mapped value.
73969
+ // We loop through the styleOverrides and join the corresponding st parameter with "_".
73970
+ var url = new URL(styleUrl);
73971
+ var params = new URLSearchParams(url.search);
73972
+ var stParams = Object.entries(styleOptions === null || styleOptions === void 0 ? void 0 : styleOptions.styleOverrides)
73973
+ .filter(function (_a) {
73974
+ var _b = __read$2(_a, 2), key = _b[0], value = _b[1];
73975
+ return key in styleOverridesMapping &&
73976
+ ( // bv stands for borderVisible
73977
+ (styleOverridesMapping[key].includes('bv') && (value === null || value === void 0 ? void 0 : value.borderVisible) === false) ||
73978
+ (!styleOverridesMapping[key].includes('bv') && (value === null || value === void 0 ? void 0 : value.visible) === false));
73979
+ })
73980
+ .map(function (_a) {
73981
+ var _b = __read$2(_a, 2), key = _b[0]; _b[1];
73982
+ return styleOverridesMapping[key];
73983
+ });
73984
+ if (stParams.length > 0) {
73985
+ params.set("st", stParams.join("_"));
73986
+ url.search = params.toString();
73987
+ styleUrl = url.toString();
73988
+ }
73989
+ }
73990
+ this.map._getMap().setStyle(styleUrl || targetDefinition.style, {
73959
73991
  diff: diff,
73960
73992
  validate: this.serviceOptions.validateStyle,
73961
73993
  transformStyle: transformStyleFunc
@@ -74727,6 +74759,7 @@ uniform ${precision} ${type} u_${name};
74727
74759
  * Returns the camera's current properties.
74728
74760
  */
74729
74761
  Map.prototype.getCamera = function () {
74762
+ var _a;
74730
74763
  var southWest = this.map.getBounds().getSouthWest().toArray();
74731
74764
  var northEast = this.map.getBounds().getNorthEast().toArray();
74732
74765
  var cameraOptions = {
@@ -74736,7 +74769,8 @@ uniform ${precision} ${type} u_${name};
74736
74769
  pitch: this.map.getPitch(),
74737
74770
  bounds: new BoundingBox(southWest, northEast),
74738
74771
  minZoom: this.map.getMinZoom(),
74739
- maxZoom: this.map.getMaxZoom()
74772
+ maxZoom: this.map.getMaxZoom(),
74773
+ maxBounds: (_a = this.map.getMaxBounds()) === null || _a === void 0 ? void 0 : _a.toArray().flat(),
74740
74774
  };
74741
74775
  return cameraOptions;
74742
74776
  };
@@ -52094,6 +52094,10 @@ uniform ${precision} ${type} u_${name};
52094
52094
  * @param locale The requested culture code.
52095
52095
  */
52096
52096
  Localizer.getCode = function (locale) {
52097
+ // If locale is set to 'auto', use the browser's configured language.
52098
+ if (locale.localeCompare("auto", undefined, { sensitivity: "base" }) === 0) {
52099
+ locale = navigator.language;
52100
+ }
52097
52101
  var code = CultureCode.parse(locale);
52098
52102
  // If the requested culture code includes a sensitive region simply return the original code.
52099
52103
  // This is to hopefully reduce the risk or providing bad content to users in a sensitive region.
@@ -52217,7 +52221,7 @@ uniform ${precision} ${type} u_${name};
52217
52221
  return UserAgent;
52218
52222
  }());
52219
52223
 
52220
- var version$2 = "3.5.0";
52224
+ var version$2 = "3.6.1";
52221
52225
 
52222
52226
  /**
52223
52227
  * A helper class that provides methods for getting various forms of the map controls current version.
@@ -52822,10 +52826,9 @@ uniform ${precision} ${type} u_${name};
52822
52826
  * language is explicitly specified when using those parts of the API.
52823
52827
  * If a Map is initialized with the language explicitly defined and
52824
52828
  * setLanguage hasn't previously been called it will automatically be called by the Map constructor.
52825
- * @param language The new default language.
52829
+ * @param language The new default language. If set to "auto", the browser's configured language will be used.
52826
52830
  */
52827
52831
  function setLanguage(language) {
52828
- // Find the best fit supported language.
52829
52832
  defaultLanguage = Localizer.getCode(language);
52830
52833
  hasSetLanguage = true;
52831
52834
  }
@@ -53585,12 +53588,10 @@ uniform ${precision} ${type} u_${name};
53585
53588
  var expandGrid = function (expanded) {
53586
53589
  if (expanded) {
53587
53590
  container.classList.add("in-use");
53588
- grid.setAttribute("aria-hidden", "false");
53589
53591
  grid.classList.remove("hidden-accessible-element");
53590
53592
  }
53591
53593
  else {
53592
53594
  container.classList.remove("in-use");
53593
- grid.setAttribute("aria-hidden", "true");
53594
53595
  grid.classList.add("hidden-accessible-element");
53595
53596
  }
53596
53597
  };
@@ -53657,7 +53658,6 @@ uniform ${precision} ${type} u_${name};
53657
53658
  var grid = document.createElement("div");
53658
53659
  grid.classList.add("sub-container");
53659
53660
  grid.classList.add("hidden-accessible-element");
53660
- grid.setAttribute("aria-hidden", "true");
53661
53661
  var rotationRightButton = this.constructRightRotationButton(map);
53662
53662
  var rotationLeftButton = this.constructLeftRotationButton(map);
53663
53663
  var tooltipLeft = buildAccessibleTooltip("Rotate Left");
@@ -53863,12 +53863,10 @@ uniform ${precision} ${type} u_${name};
53863
53863
  var expandGrid = function (expanded) {
53864
53864
  if (expanded) {
53865
53865
  container.classList.add("in-use");
53866
- grid.setAttribute("aria-hidden", "false");
53867
53866
  grid.classList.remove("hidden-accessible-element");
53868
53867
  }
53869
53868
  else {
53870
53869
  container.classList.remove("in-use");
53871
- grid.setAttribute("aria-hidden", "true");
53872
53870
  grid.classList.add("hidden-accessible-element");
53873
53871
  }
53874
53872
  };
@@ -53953,7 +53951,6 @@ uniform ${precision} ${type} u_${name};
53953
53951
  var grid = document.createElement("div");
53954
53952
  grid.classList.add("sub-container");
53955
53953
  grid.classList.add("hidden-accessible-element");
53956
- grid.setAttribute("aria-hidden", "true");
53957
53954
  this.pitchIncrementButton = this.constructPitchIncrementButton(map);
53958
53955
  this.pitchDecrementButton = this.constructPitchDecrementButton(map);
53959
53956
  var tooltipIncrement = buildAccessibleTooltip("Increase Pitch");
@@ -57770,12 +57767,10 @@ uniform ${precision} ${type} u_${name};
57770
57767
  var expandGrid = function (expanded) {
57771
57768
  if (expanded) {
57772
57769
  container.classList.add(StyleControl.Css.inUse);
57773
- styleOpsGrid.setAttribute("aria-hidden", "false");
57774
57770
  styleOpsGrid.classList.remove("hidden-accessible-element");
57775
57771
  }
57776
57772
  else {
57777
57773
  container.classList.remove(StyleControl.Css.inUse);
57778
- styleOpsGrid.setAttribute("aria-hidden", "true");
57779
57774
  styleOpsGrid.classList.add("hidden-accessible-element");
57780
57775
  }
57781
57776
  };
@@ -58001,7 +57996,6 @@ uniform ${precision} ${type} u_${name};
58001
57996
  }
58002
57997
  styleOpsGrid.setAttribute("aria-label", "Style Options");
58003
57998
  styleOpsGrid.classList.add("hidden-accessible-element");
58004
- styleOpsGrid.setAttribute("aria-hidden", "true");
58005
57999
  // Once the map's style definition is initialized create a map between style names and icons.
58006
58000
  // If a style is one of those to be shown by the style picker also create it's element.
58007
58001
  this.map.styles.definitions().then(function (definitions) { return __awaiter$7(_this, void 0, void 0, function () {
@@ -63250,9 +63244,7 @@ uniform ${precision} ${type} u_${name};
63250
63244
  zoomInButton.setAttribute("alt", "Zoom In");
63251
63245
  zoomInButton.setAttribute("type", "button");
63252
63246
  zoomInButton.addEventListener("click", function () {
63253
- var _a;
63254
63247
  map.setCamera({
63255
- maxBounds: (_a = map._getMap().getMaxBounds()) === null || _a === void 0 ? void 0 : _a.toArray().flat(),
63256
63248
  zoom: map.getCamera().zoom + _this.options.zoomDelta,
63257
63249
  duration: ZoomControl.ZOOM_DURATION_MS,
63258
63250
  type: "ease",
@@ -63269,9 +63261,7 @@ uniform ${precision} ${type} u_${name};
63269
63261
  zoomOutButton.setAttribute("alt", "Zoom Out");
63270
63262
  zoomOutButton.setAttribute("type", "button");
63271
63263
  zoomOutButton.addEventListener("click", function () {
63272
- var _a;
63273
63264
  map.setCamera({
63274
- maxBounds: (_a = map._getMap().getMaxBounds()) === null || _a === void 0 ? void 0 : _a.toArray().flat(),
63275
63265
  zoom: map.getCamera().zoom - _this.options.zoomDelta,
63276
63266
  duration: ZoomControl.ZOOM_DURATION_MS,
63277
63267
  type: "ease",
@@ -65808,7 +65798,7 @@ uniform ${precision} ${type} u_${name};
65808
65798
  */
65809
65799
  ImageLayer.prototype.setOptions = function (options) {
65810
65800
  var newOptions = new ImageLayerOptions().merge(this.options, cloneDeepWith$1(options, ImageLayerOptions._cloneCustomizer));
65811
- var reloadImageTransform = (typeof options.url === "string" && options.url !== this.getOptions().url);
65801
+ var reloadImage = (typeof options.url === "string" && options.url !== this.getOptions().url);
65812
65802
  var coordChanged = (typeof options.coordinates !== "undefined" && options.coordinates !== this.getOptions().coordinates);
65813
65803
  if (this.map) {
65814
65804
  this._updateBaseProperties(newOptions, this.options);
@@ -65818,16 +65808,17 @@ uniform ${precision} ${type} u_${name};
65818
65808
  this._updatePaintProperty("raster-brightness-max", newOptions.maxBrightness, this.options.maxBrightness);
65819
65809
  this._updatePaintProperty("raster-opacity", newOptions.opacity, this.options.opacity);
65820
65810
  this._updatePaintProperty("raster-saturation", newOptions.saturation, this.options.saturation);
65821
- // TODO: the mapbox typing file doesn't support maplibregl.ImageSource.updateImage()
65822
- // update "as any" to "as maplibregl.ImageSource" after the typing file is updated
65811
+ // Get the image source
65823
65812
  var source = this.map._getMap().getSource(this._getSourceId());
65824
- if (source) {
65813
+ // Check if the source exists and if we need to reload the image or if coordinates have changed
65814
+ if (source && (reloadImage || coordChanged)) {
65815
+ // Update the image with the new options
65825
65816
  source.updateImage(newOptions);
65826
65817
  }
65827
65818
  }
65828
65819
  this.options = newOptions;
65829
65820
  // Modified to update transform if image url or coordinates change
65830
- if (reloadImageTransform) {
65821
+ if (reloadImage) {
65831
65822
  this.reloadImage();
65832
65823
  }
65833
65824
  else if (coordChanged) {
@@ -68359,6 +68350,7 @@ uniform ${precision} ${type} u_${name};
68359
68350
  ele.addEventListener("click", this.close);
68360
68351
  ele.classList.add(Popup.Css.close);
68361
68352
  ele.setAttribute("aria-label", "close");
68353
+ ele.setAttribute("type", "button");
68362
68354
  ele.setAttribute("tabindex", "0");
68363
68355
  ele.innerHTML = "×";
68364
68356
  return ele;
@@ -96473,6 +96465,12 @@ uniform ${precision} ${type} u_${name};
96473
96465
  * @deprecated use `view` instead.
96474
96466
  */
96475
96467
  _this.userRegion = _this.view;
96468
+ /**
96469
+ * Override the default styles for the map elements.​
96470
+ * Default `undefined`
96471
+ * @default undefined
96472
+ */
96473
+ _this.styleOverrides = undefined;
96476
96474
  /**
96477
96475
  * allows substituting a default MapControl's style transformer with custom one
96478
96476
  * 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
@@ -96610,10 +96608,10 @@ uniform ${precision} ${type} u_${name};
96610
96608
  /**
96611
96609
  * Disable telemetry collection
96612
96610
  * This option may only be set when initializing the map.
96613
- * default: false (true for the Azure Government cloud)
96614
- * @default false
96611
+ * default: true
96612
+ * @default true
96615
96613
  */
96616
- _this.disableTelemetry = getDomain() === "atlas.azure.us";
96614
+ _this.disableTelemetry = true;
96617
96615
  /**
96618
96616
  * Disable telemetry collection
96619
96617
  * This option may only be set when initializing the map.
@@ -97106,6 +97104,16 @@ uniform ${precision} ${type} u_${name};
97106
97104
  };
97107
97105
  throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
97108
97106
  };
97107
+ /**
97108
+ * Mapping of styleOverrides options to style parameter values.
97109
+ */
97110
+ var styleOverridesMapping = {
97111
+ countryRegion: "cr|bv:0",
97112
+ adminDistrict: "ad|bv:0",
97113
+ adminDistrict2: "ds|bv:0",
97114
+ buildingFootprint: "bld|v:0_adr|lv:0",
97115
+ roadDetails: "g|rasterDetailsVisible:0"
97116
+ };
97109
97117
  /**
97110
97118
  * @private
97111
97119
  */
@@ -97616,7 +97624,31 @@ uniform ${precision} ${type} u_${name};
97616
97624
  return targetStyleWithUserLayers;
97617
97625
  };
97618
97626
  }
97619
- this.map._getMap().setStyle(targetDefinition.url || targetDefinition.style, {
97627
+ var styleUrl = targetDefinition.url;
97628
+ if (styleUrl && (styleOptions === null || styleOptions === void 0 ? void 0 : styleOptions.styleOverrides)) {
97629
+ // Append the st parameter in the url with the mapped value.
97630
+ // We loop through the styleOverrides and join the corresponding st parameter with "_".
97631
+ var url = new URL(styleUrl);
97632
+ var params = new URLSearchParams(url.search);
97633
+ var stParams = Object.entries(styleOptions === null || styleOptions === void 0 ? void 0 : styleOptions.styleOverrides)
97634
+ .filter(function (_a) {
97635
+ var _b = __read$2(_a, 2), key = _b[0], value = _b[1];
97636
+ return key in styleOverridesMapping &&
97637
+ ( // bv stands for borderVisible
97638
+ (styleOverridesMapping[key].includes('bv') && (value === null || value === void 0 ? void 0 : value.borderVisible) === false) ||
97639
+ (!styleOverridesMapping[key].includes('bv') && (value === null || value === void 0 ? void 0 : value.visible) === false));
97640
+ })
97641
+ .map(function (_a) {
97642
+ var _b = __read$2(_a, 2), key = _b[0]; _b[1];
97643
+ return styleOverridesMapping[key];
97644
+ });
97645
+ if (stParams.length > 0) {
97646
+ params.set("st", stParams.join("_"));
97647
+ url.search = params.toString();
97648
+ styleUrl = url.toString();
97649
+ }
97650
+ }
97651
+ this.map._getMap().setStyle(styleUrl || targetDefinition.style, {
97620
97652
  diff: diff,
97621
97653
  validate: this.serviceOptions.validateStyle,
97622
97654
  transformStyle: transformStyleFunc
@@ -98394,6 +98426,7 @@ uniform ${precision} ${type} u_${name};
98394
98426
  * Returns the camera's current properties.
98395
98427
  */
98396
98428
  Map.prototype.getCamera = function () {
98429
+ var _a;
98397
98430
  var southWest = this.map.getBounds().getSouthWest().toArray();
98398
98431
  var northEast = this.map.getBounds().getNorthEast().toArray();
98399
98432
  var cameraOptions = {
@@ -98403,7 +98436,8 @@ uniform ${precision} ${type} u_${name};
98403
98436
  pitch: this.map.getPitch(),
98404
98437
  bounds: new BoundingBox(southWest, northEast),
98405
98438
  minZoom: this.map.getMinZoom(),
98406
- maxZoom: this.map.getMaxZoom()
98439
+ maxZoom: this.map.getMaxZoom(),
98440
+ maxBounds: (_a = this.map.getMaxBounds()) === null || _a === void 0 ? void 0 : _a.toArray().flat(),
98407
98441
  };
98408
98442
  return cameraOptions;
98409
98443
  };