azure-maps-control 3.4.0 → 3.6.0

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.
@@ -324,7 +324,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
324
324
  return Options;
325
325
  }());
326
326
 
327
- var __extends$1l = (window && window.__extends) || (function () {
327
+ var __extends$1n = (window && window.__extends) || (function () {
328
328
  var extendStatics = function (d, b) {
329
329
  extendStatics = Object.setPrototypeOf ||
330
330
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -359,7 +359,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
359
359
  * @private
360
360
  */
361
361
  var UrlOptions = /** @class */ (function (_super) {
362
- __extends$1l(UrlOptions, _super);
362
+ __extends$1n(UrlOptions, _super);
363
363
  function UrlOptions() {
364
364
  var _this = _super !== null && _super.apply(this, arguments) || this;
365
365
  _this.domain = undefined;
@@ -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.4.0";
893
+ var version$2 = "3.6.0";
890
894
 
891
895
  /**
892
896
  * A helper class that provides methods for getting various forms of the map controls current version.
@@ -918,7 +922,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
918
922
  return Version;
919
923
  }());
920
924
 
921
- var __extends$1k = (window && window.__extends) || (function () {
925
+ var __extends$1m = (window && window.__extends) || (function () {
922
926
  var extendStatics = function (d, b) {
923
927
  extendStatics = Object.setPrototypeOf ||
924
928
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -992,7 +996,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
992
996
  * Options for specifying how the map control should authenticate with the Azure Maps services.
993
997
  */
994
998
  var AuthenticationOptions = /** @class */ (function (_super) {
995
- __extends$1k(AuthenticationOptions, _super);
999
+ __extends$1m(AuthenticationOptions, _super);
996
1000
  function AuthenticationOptions() {
997
1001
  var _this = _super !== null && _super.apply(this, arguments) || this;
998
1002
  /**
@@ -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
  }
@@ -1848,7 +1851,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
1848
1851
  eventTarget.addEventListener("keydown", dismissTooltip);
1849
1852
  };
1850
1853
 
1851
- var __extends$1j = (window && window.__extends) || (function () {
1854
+ var __extends$1l = (window && window.__extends) || (function () {
1852
1855
  var extendStatics = function (d, b) {
1853
1856
  extendStatics = Object.setPrototypeOf ||
1854
1857
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -1898,7 +1901,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
1898
1901
  * The options for adding a control to the map.
1899
1902
  */
1900
1903
  var ControlOptions = /** @class */ (function (_super) {
1901
- __extends$1j(ControlOptions, _super);
1904
+ __extends$1l(ControlOptions, _super);
1902
1905
  function ControlOptions() {
1903
1906
  var _this = _super !== null && _super.apply(this, arguments) || this;
1904
1907
  /**
@@ -2042,7 +2045,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
2042
2045
  EventEmitter: EventEmitter
2043
2046
  });
2044
2047
 
2045
- var __extends$1i = (window && window.__extends) || (function () {
2048
+ var __extends$1k = (window && window.__extends) || (function () {
2046
2049
  var extendStatics = function (d, b) {
2047
2050
  extendStatics = Object.setPrototypeOf ||
2048
2051
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -2062,7 +2065,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
2062
2065
  * Implements control interface and provides support for automatic styling based on the map style.
2063
2066
  */
2064
2067
  var ControlBase = /** @class */ (function (_super) {
2065
- __extends$1i(ControlBase, _super);
2068
+ __extends$1k(ControlBase, _super);
2066
2069
  function ControlBase() {
2067
2070
  var _this = _super !== null && _super.apply(this, arguments) || this;
2068
2071
  /**
@@ -2164,7 +2167,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
2164
2167
  return ControlBase;
2165
2168
  }(EventEmitter));
2166
2169
 
2167
- var __extends$1h = (window && window.__extends) || (function () {
2170
+ var __extends$1j = (window && window.__extends) || (function () {
2168
2171
  var extendStatics = function (d, b) {
2169
2172
  extendStatics = Object.setPrototypeOf ||
2170
2173
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -2183,7 +2186,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
2183
2186
  * The options for a CompassControl object.
2184
2187
  */
2185
2188
  var CompassControlOptions = /** @class */ (function (_super) {
2186
- __extends$1h(CompassControlOptions, _super);
2189
+ __extends$1j(CompassControlOptions, _super);
2187
2190
  function CompassControlOptions() {
2188
2191
  var _this = _super !== null && _super.apply(this, arguments) || this;
2189
2192
  /**
@@ -2208,7 +2211,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
2208
2211
  return CompassControlOptions;
2209
2212
  }(Options));
2210
2213
 
2211
- var __extends$1g = (window && window.__extends) || (function () {
2214
+ var __extends$1i = (window && window.__extends) || (function () {
2212
2215
  var extendStatics = function (d, b) {
2213
2216
  extendStatics = Object.setPrototypeOf ||
2214
2217
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -2227,7 +2230,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
2227
2230
  * A control for changing the rotation of the map.
2228
2231
  */
2229
2232
  var CompassControl = /** @class */ (function (_super) {
2230
- __extends$1g(CompassControl, _super);
2233
+ __extends$1i(CompassControl, _super);
2231
2234
  /**
2232
2235
  * Constructs a CompassControl.
2233
2236
  * @param options The options for the control.
@@ -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");
@@ -2412,7 +2412,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
2412
2412
  return CompassControl;
2413
2413
  }(ControlBase));
2414
2414
 
2415
- var __extends$1f = (window && window.__extends) || (function () {
2415
+ var __extends$1h = (window && window.__extends) || (function () {
2416
2416
  var extendStatics = function (d, b) {
2417
2417
  extendStatics = Object.setPrototypeOf ||
2418
2418
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -2431,7 +2431,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
2431
2431
  * The options for a PitchControl object.
2432
2432
  */
2433
2433
  var PitchControlOptions = /** @class */ (function (_super) {
2434
- __extends$1f(PitchControlOptions, _super);
2434
+ __extends$1h(PitchControlOptions, _super);
2435
2435
  function PitchControlOptions() {
2436
2436
  var _this = _super !== null && _super.apply(this, arguments) || this;
2437
2437
  /**
@@ -2456,7 +2456,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
2456
2456
  return PitchControlOptions;
2457
2457
  }(Options));
2458
2458
 
2459
- var __extends$1e = (window && window.__extends) || (function () {
2459
+ var __extends$1g = (window && window.__extends) || (function () {
2460
2460
  var extendStatics = function (d, b) {
2461
2461
  extendStatics = Object.setPrototypeOf ||
2462
2462
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -2475,7 +2475,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
2475
2475
  * A control for changing the pitch of the map.
2476
2476
  */
2477
2477
  var PitchControl = /** @class */ (function (_super) {
2478
- __extends$1e(PitchControl, _super);
2478
+ __extends$1g(PitchControl, _super);
2479
2479
  /**
2480
2480
  * Constructs a PitchControl.
2481
2481
  * @param options The options for the control.
@@ -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");
@@ -2703,7 +2700,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
2703
2700
  return PitchControl;
2704
2701
  }(ControlBase));
2705
2702
 
2706
- var __extends$1d = (window && window.__extends) || (function () {
2703
+ var __extends$1f = (window && window.__extends) || (function () {
2707
2704
  var extendStatics = function (d, b) {
2708
2705
  extendStatics = Object.setPrototypeOf ||
2709
2706
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -2722,7 +2719,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
2722
2719
  * A control to display a scale bar on the map.
2723
2720
  */
2724
2721
  var ScaleControl = /** @class */ (function (_super) {
2725
- __extends$1d(ScaleControl, _super);
2722
+ __extends$1f(ScaleControl, _super);
2726
2723
  /**
2727
2724
  * A control to displays a scale bar relative to the pixel resolution at the center of the map.
2728
2725
  * @param options Options for defining how the control is rendered and functions.
@@ -6240,7 +6237,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
6240
6237
 
6241
6238
  var merge$1 = /*@__PURE__*/getDefaultExportFromCjs(merge_1);
6242
6239
 
6243
- var __extends$1c = (window && window.__extends) || (function () {
6240
+ var __extends$1e = (window && window.__extends) || (function () {
6244
6241
  var extendStatics = function (d, b) {
6245
6242
  extendStatics = Object.setPrototypeOf ||
6246
6243
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -6259,7 +6256,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
6259
6256
  * The options for a StyleControl object.
6260
6257
  */
6261
6258
  var StyleControlOptions = /** @class */ (function (_super) {
6262
- __extends$1c(StyleControlOptions, _super);
6259
+ __extends$1e(StyleControlOptions, _super);
6263
6260
  function StyleControlOptions() {
6264
6261
  var _this = _super !== null && _super.apply(this, arguments) || this;
6265
6262
  /**
@@ -6304,7 +6301,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
6304
6301
  return StyleControlOptions;
6305
6302
  }(Options));
6306
6303
 
6307
- var __extends$1b = (window && window.__extends) || (function () {
6304
+ var __extends$1d = (window && window.__extends) || (function () {
6308
6305
  var extendStatics = function (d, b) {
6309
6306
  extendStatics = Object.setPrototypeOf ||
6310
6307
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -6375,7 +6372,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
6375
6372
  * A control for changing the style of the map.
6376
6373
  */
6377
6374
  var StyleControl = /** @class */ (function (_super) {
6378
- __extends$1b(StyleControl, _super);
6375
+ __extends$1d(StyleControl, _super);
6379
6376
  /**
6380
6377
  * Constructs a StyleControl.
6381
6378
  * @param options The options for the control.
@@ -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 () {
@@ -6740,7 +6734,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
6740
6734
  return StyleControl;
6741
6735
  }(ControlBase));
6742
6736
 
6743
- var __extends$1a = (window && window.__extends) || (function () {
6737
+ var __extends$1c = (window && window.__extends) || (function () {
6744
6738
  var extendStatics = function (d, b) {
6745
6739
  extendStatics = Object.setPrototypeOf ||
6746
6740
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -6759,7 +6753,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
6759
6753
  * The options for setting traffic on the map.
6760
6754
  */
6761
6755
  var TrafficOptions = /** @class */ (function (_super) {
6762
- __extends$1a(TrafficOptions, _super);
6756
+ __extends$1c(TrafficOptions, _super);
6763
6757
  function TrafficOptions() {
6764
6758
  var _this = _super !== null && _super.apply(this, arguments) || this;
6765
6759
  /**
@@ -6784,7 +6778,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
6784
6778
  return TrafficOptions;
6785
6779
  }(Options));
6786
6780
 
6787
- var __extends$19 = (window && window.__extends) || (function () {
6781
+ var __extends$1b = (window && window.__extends) || (function () {
6788
6782
  var extendStatics = function (d, b) {
6789
6783
  extendStatics = Object.setPrototypeOf ||
6790
6784
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -6803,7 +6797,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
6803
6797
  * The options for a TrafficControl object.
6804
6798
  */
6805
6799
  var TrafficControlOptions = /** @class */ (function (_super) {
6806
- __extends$19(TrafficControlOptions, _super);
6800
+ __extends$1b(TrafficControlOptions, _super);
6807
6801
  function TrafficControlOptions() {
6808
6802
  var _this = _super !== null && _super.apply(this, arguments) || this;
6809
6803
  /**
@@ -6823,7 +6817,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
6823
6817
  return TrafficControlOptions;
6824
6818
  }(TrafficOptions));
6825
6819
 
6826
- var __extends$18 = (window && window.__extends) || (function () {
6820
+ var __extends$1a = (window && window.__extends) || (function () {
6827
6821
  var extendStatics = function (d, b) {
6828
6822
  extendStatics = Object.setPrototypeOf ||
6829
6823
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -6842,7 +6836,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
6842
6836
  * A control that toggles traffic data on the map.
6843
6837
  */
6844
6838
  var TrafficControl = /** @class */ (function (_super) {
6845
- __extends$18(TrafficControl, _super);
6839
+ __extends$1a(TrafficControl, _super);
6846
6840
  /**
6847
6841
  * Constructs a TrafficControl
6848
6842
  * @param options The options for the control.
@@ -6969,7 +6963,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
6969
6963
  return TrafficControl;
6970
6964
  }(ControlBase));
6971
6965
 
6972
- var __extends$17 = (window && window.__extends) || (function () {
6966
+ var __extends$19 = (window && window.__extends) || (function () {
6973
6967
  var extendStatics = function (d, b) {
6974
6968
  extendStatics = Object.setPrototypeOf ||
6975
6969
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -6999,7 +6993,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
6999
6993
  * A control that display traffic legend on the map.
7000
6994
  */
7001
6995
  var TrafficLegendControl = /** @class */ (function (_super) {
7002
- __extends$17(TrafficLegendControl, _super);
6996
+ __extends$19(TrafficLegendControl, _super);
7003
6997
  /**
7004
6998
  * Construct a traffic legend control
7005
6999
  */
@@ -7733,7 +7727,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
7733
7727
  return Feature;
7734
7728
  }());
7735
7729
 
7736
- var __extends$16 = (window && window.__extends) || (function () {
7730
+ var __extends$18 = (window && window.__extends) || (function () {
7737
7731
  var extendStatics = function (d, b) {
7738
7732
  extendStatics = Object.setPrototypeOf ||
7739
7733
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -7752,7 +7746,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
7752
7746
  * Represent a pixel coordinate or offset. Extends an array of [x, y].
7753
7747
  */
7754
7748
  var Pixel = /** @class */ (function (_super) {
7755
- __extends$16(Pixel, _super);
7749
+ __extends$18(Pixel, _super);
7756
7750
  /**
7757
7751
  * Constructs a Pixel object and initializes it with the specified x and y coordinates.
7758
7752
  * @param x The horizontal pixel offset.
@@ -9972,7 +9966,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
9972
9966
  return result;
9973
9967
  }
9974
9968
 
9975
- var __extends$15 = (window && window.__extends) || (function () {
9969
+ var __extends$17 = (window && window.__extends) || (function () {
9976
9970
  var extendStatics = function (d, b) {
9977
9971
  extendStatics = Object.setPrototypeOf ||
9978
9972
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -9992,7 +9986,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
9992
9986
  * full description is detailed in [RFC 7946]{@link https://tools.ietf.org/html/rfc7946#section-3.1.1}.
9993
9987
  */
9994
9988
  var Position = /** @class */ (function (_super) {
9995
- __extends$15(Position, _super);
9989
+ __extends$17(Position, _super);
9996
9990
  /**
9997
9991
  * Constructs a Position.
9998
9992
  * @param longitude The position's longitude.
@@ -10184,7 +10178,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
10184
10178
  return Polygon;
10185
10179
  }());
10186
10180
 
10187
- var __extends$14 = (window && window.__extends) || (function () {
10181
+ var __extends$16 = (window && window.__extends) || (function () {
10188
10182
  var extendStatics = function (d, b) {
10189
10183
  extendStatics = Object.setPrototypeOf ||
10190
10184
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -10214,7 +10208,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
10214
10208
  * A helper class that wraps a Geometry or Feature and makes it easy to update and maintain.
10215
10209
  */
10216
10210
  var Shape = /** @class */ (function (_super) {
10217
- __extends$14(Shape, _super);
10211
+ __extends$16(Shape, _super);
10218
10212
  function Shape(data, id, properties) {
10219
10213
  var _this = _super.call(this) || this;
10220
10214
  var geometry;
@@ -10510,7 +10504,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
10510
10504
  return Shape;
10511
10505
  }(EventEmitter));
10512
10506
 
10513
- var __extends$13 = (window && window.__extends) || (function () {
10507
+ var __extends$15 = (window && window.__extends) || (function () {
10514
10508
  var extendStatics = function (d, b) {
10515
10509
  extendStatics = Object.setPrototypeOf ||
10516
10510
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -10543,7 +10537,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
10543
10537
  * [RFC 7946]{@link https://tools.ietf.org/html/rfc7946#section-5}.
10544
10538
  */
10545
10539
  var BoundingBox = /** @class */ (function (_super) {
10546
- __extends$13(BoundingBox, _super);
10540
+ __extends$15(BoundingBox, _super);
10547
10541
  function BoundingBox(southwestPositionOrPositions, northeastPosition) {
10548
10542
  var _this = this;
10549
10543
  if (southwestPositionOrPositions && northeastPosition) {
@@ -11260,7 +11254,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
11260
11254
  return MultiPolygon;
11261
11255
  }());
11262
11256
 
11263
- var __extends$12 = (window && window.__extends) || (function () {
11257
+ var __extends$14 = (window && window.__extends) || (function () {
11264
11258
  var extendStatics = function (d, b) {
11265
11259
  extendStatics = Object.setPrototypeOf ||
11266
11260
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -11291,7 +11285,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
11291
11285
  * The `z` dimension of `MercatorPoint` is conformal. A cube in the mercator coordinate space would be rendered as a cube.
11292
11286
  */
11293
11287
  var MercatorPoint = /** @class */ (function (_super) {
11294
- __extends$12(MercatorPoint, _super);
11288
+ __extends$14(MercatorPoint, _super);
11295
11289
  /**
11296
11290
  * Constructs a MercatorPoint.
11297
11291
  * @param x A points x position in mercator units.
@@ -11780,7 +11774,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
11780
11774
  simplify: simplify
11781
11775
  });
11782
11776
 
11783
- var __extends$11 = (window && window.__extends) || (function () {
11777
+ var __extends$13 = (window && window.__extends) || (function () {
11784
11778
  var extendStatics = function (d, b) {
11785
11779
  extendStatics = Object.setPrototypeOf ||
11786
11780
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -11799,7 +11793,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
11799
11793
  * The options for a ZoomControl object.
11800
11794
  */
11801
11795
  var ZoomControlOptions = /** @class */ (function (_super) {
11802
- __extends$11(ZoomControlOptions, _super);
11796
+ __extends$13(ZoomControlOptions, _super);
11803
11797
  function ZoomControlOptions() {
11804
11798
  var _this = _super !== null && _super.apply(this, arguments) || this;
11805
11799
  /**
@@ -11819,7 +11813,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
11819
11813
  return ZoomControlOptions;
11820
11814
  }(Options));
11821
11815
 
11822
- var __extends$10 = (window && window.__extends) || (function () {
11816
+ var __extends$12 = (window && window.__extends) || (function () {
11823
11817
  var extendStatics = function (d, b) {
11824
11818
  extendStatics = Object.setPrototypeOf ||
11825
11819
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -11838,7 +11832,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
11838
11832
  * A control for changing the zoom of the map.
11839
11833
  */
11840
11834
  var ZoomControl = /** @class */ (function (_super) {
11841
- __extends$10(ZoomControl, _super);
11835
+ __extends$12(ZoomControl, _super);
11842
11836
  /**
11843
11837
  * Constructs a ZoomControl.
11844
11838
  * @param options The options for the control.
@@ -11952,10 +11946,169 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
11952
11946
  return ZoomControl;
11953
11947
  }(ControlBase));
11954
11948
 
11949
+ var __extends$11 = (window && window.__extends) || (function () {
11950
+ var extendStatics = function (d, b) {
11951
+ extendStatics = Object.setPrototypeOf ||
11952
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
11953
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
11954
+ return extendStatics(d, b);
11955
+ };
11956
+ return function (d, b) {
11957
+ if (typeof b !== "function" && b !== null)
11958
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11959
+ extendStatics(d, b);
11960
+ function __() { this.constructor = d; }
11961
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
11962
+ };
11963
+ })();
11964
+ /**
11965
+ * The options for a FullscreenControl object.
11966
+ */
11967
+ var FullscreenControlOptions = /** @class */ (function (_super) {
11968
+ __extends$11(FullscreenControlOptions, _super);
11969
+ function FullscreenControlOptions() {
11970
+ var _this = _super !== null && _super.apply(this, arguments) || this;
11971
+ /**
11972
+ * The style of the control.
11973
+ * Default `ControlStyle.light`
11974
+ * @default ControlStyle.light
11975
+ */
11976
+ _this.style = exports.ControlStyle.light;
11977
+ /**
11978
+ * Indicates if the control should be hidden if the browser does not support fullscreen mode.
11979
+ * Default `false`
11980
+ * @default false
11981
+ */
11982
+ _this.hideIfUnsupported = false;
11983
+ /**
11984
+ * The HTML element which should be made full screen.
11985
+ * If not specified, the map container element will be used.
11986
+ */
11987
+ _this.container = undefined;
11988
+ return _this;
11989
+ }
11990
+ return FullscreenControlOptions;
11991
+ }(Options));
11992
+
11993
+ var __extends$10 = (window && window.__extends) || (function () {
11994
+ var extendStatics = function (d, b) {
11995
+ extendStatics = Object.setPrototypeOf ||
11996
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
11997
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
11998
+ return extendStatics(d, b);
11999
+ };
12000
+ return function (d, b) {
12001
+ if (typeof b !== "function" && b !== null)
12002
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12003
+ extendStatics(d, b);
12004
+ function __() { this.constructor = d; }
12005
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12006
+ };
12007
+ })();
12008
+ /**
12009
+ * A control to make the map or a specified element fullscreen.
12010
+ */
12011
+ var FullscreenControl = /** @class */ (function (_super) {
12012
+ __extends$10(FullscreenControl, _super);
12013
+ /**
12014
+ * A control to make the map or a specified element fullscreen.
12015
+ * @param options Options for defining how the control is rendered and the container to be made fullscreen.
12016
+ */
12017
+ function FullscreenControl(options) {
12018
+ var _this = _super.call(this) || this;
12019
+ _this.map = null;
12020
+ _this.isFullscreenState = false;
12021
+ _this.options = new FullscreenControlOptions().merge(options);
12022
+ _this.control = new maplibregl.FullscreenControl({
12023
+ container: _this.options.container,
12024
+ });
12025
+ return _this;
12026
+ }
12027
+ /**
12028
+ * Initialization method for the control which is called when added to the map.
12029
+ * @param map The map that the control will be added to.
12030
+ * @param options The ControlOptions for this control.
12031
+ * @return An HTMLElement to be placed on the map for the control.
12032
+ */
12033
+ FullscreenControl.prototype.onAdd = function (map) {
12034
+ var _this = this;
12035
+ var _a, _b;
12036
+ this.map = map;
12037
+ (_b = (_a = this.map) === null || _a === void 0 ? void 0 : _a._getMap()) === null || _b === void 0 ? void 0 : _b.addControl(this.control);
12038
+ var container = this.buildContainer(map, this.options.style, "Fullscreen Control");
12039
+ var fullscreenButton = this.control._fullscreenButton;
12040
+ if (fullscreenButton) {
12041
+ var icon_1 = fullscreenButton.querySelector("span");
12042
+ if (icon_1) {
12043
+ var tooltip_1 = buildAccessibleTooltip("Enter Fullscreen");
12044
+ container.appendChild(fullscreenButton);
12045
+ // Add classes for styling.
12046
+ fullscreenButton.classList.add("azure-maps-control-button", "fullscreen");
12047
+ icon_1.classList.add("fullscreen-icon", "fullscreen-end");
12048
+ // Add the tooltip and prevent the default one set by Maplibre.
12049
+ fullscreenButton.removeAttribute("title"); // A title attribute will be converted to a tooltip by the browser.
12050
+ container.appendChild(tooltip_1);
12051
+ positionTooltip(tooltip_1, fullscreenButton);
12052
+ // Update the icon and the tooltip based on the fullscreen state.
12053
+ this.control.on("fullscreenstart", function () {
12054
+ // Remove the title attribute added automatically whenever fullscreen event is fired
12055
+ fullscreenButton.removeAttribute("title");
12056
+ icon_1.classList.remove("fullscreen-end");
12057
+ icon_1.classList.add("fullscreen-start");
12058
+ tooltip_1.innerText = "Exit Fullscreen";
12059
+ _this.isFullscreenState = true;
12060
+ });
12061
+ this.control.on("fullscreenend", function () {
12062
+ fullscreenButton.removeAttribute("title");
12063
+ icon_1.classList.remove("fullscreen-start");
12064
+ icon_1.classList.add("fullscreen-end");
12065
+ tooltip_1.innerText = "Enter Fullscreen";
12066
+ _this.isFullscreenState = false;
12067
+ });
12068
+ }
12069
+ }
12070
+ // Invisiblize the control if the browser does not support fullscreen mode.
12071
+ if (this.options.hideIfUnsupported && !FullscreenControl.isSupported()) {
12072
+ container.style.display = "none";
12073
+ }
12074
+ return container;
12075
+ };
12076
+ /**
12077
+ * Method that is called when the control is removed from the map. Should perform any necessary cleanup for the
12078
+ * control.
12079
+ */
12080
+ FullscreenControl.prototype.onRemove = function () {
12081
+ var _a, _b;
12082
+ _super.prototype.onRemove.call(this);
12083
+ (_b = (_a = this.map) === null || _a === void 0 ? void 0 : _a._getMap()) === null || _b === void 0 ? void 0 : _b.removeControl(this.control);
12084
+ this.map = null;
12085
+ };
12086
+ /**
12087
+ * Gets the current fullscreen state of the map.
12088
+ * @returns A boolean indicating if the map is in fullscreen mode.
12089
+ */
12090
+ FullscreenControl.prototype.isFullscreen = function () {
12091
+ return this.isFullscreenState;
12092
+ };
12093
+ /**
12094
+ * Checks to see if the browser supports going into fullscreen mode.
12095
+ * @returns A boolean indicating if the browser supports fullscreen mode.
12096
+ */
12097
+ FullscreenControl.isSupported = function () {
12098
+ var d = document;
12099
+ return d['fullscreenEnabled'] ||
12100
+ d['msFullscreenEnabled'] ||
12101
+ d['mozFullScreenEnabled'] ||
12102
+ d['webkitFullscreenEnabled'];
12103
+ };
12104
+ return FullscreenControl;
12105
+ }(ControlBase));
12106
+
11955
12107
  var index$2 = /*#__PURE__*/Object.freeze({
11956
12108
  __proto__: null,
11957
12109
  CompassControl: CompassControl,
11958
12110
  ControlBase: ControlBase,
12111
+ FullscreenControl: FullscreenControl,
11959
12112
  PitchControl: PitchControl,
11960
12113
  ScaleControl: ScaleControl,
11961
12114
  StyleControl: StyleControl,
@@ -14318,7 +14471,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
14318
14471
  */
14319
14472
  ImageLayer.prototype.setOptions = function (options) {
14320
14473
  var newOptions = new ImageLayerOptions().merge(this.options, cloneDeepWith$1(options, ImageLayerOptions._cloneCustomizer));
14321
- var reloadImageTransform = (typeof options.url === "string" && options.url !== this.getOptions().url);
14474
+ var reloadImage = (typeof options.url === "string" && options.url !== this.getOptions().url);
14322
14475
  var coordChanged = (typeof options.coordinates !== "undefined" && options.coordinates !== this.getOptions().coordinates);
14323
14476
  if (this.map) {
14324
14477
  this._updateBaseProperties(newOptions, this.options);
@@ -14328,16 +14481,17 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
14328
14481
  this._updatePaintProperty("raster-brightness-max", newOptions.maxBrightness, this.options.maxBrightness);
14329
14482
  this._updatePaintProperty("raster-opacity", newOptions.opacity, this.options.opacity);
14330
14483
  this._updatePaintProperty("raster-saturation", newOptions.saturation, this.options.saturation);
14331
- // TODO: the mapbox typing file doesn't support maplibregl.ImageSource.updateImage()
14332
- // update "as any" to "as maplibregl.ImageSource" after the typing file is updated
14484
+ // Get the image source
14333
14485
  var source = this.map._getMap().getSource(this._getSourceId());
14334
- if (source) {
14486
+ // Check if the source exists and if we need to reload the image or if coordinates have changed
14487
+ if (source && (reloadImage || coordChanged)) {
14488
+ // Update the image with the new options
14335
14489
  source.updateImage(newOptions);
14336
14490
  }
14337
14491
  }
14338
14492
  this.options = newOptions;
14339
14493
  // Modified to update transform if image url or coordinates change
14340
- if (reloadImageTransform) {
14494
+ if (reloadImage) {
14341
14495
  this.reloadImage();
14342
14496
  }
14343
14497
  else if (coordChanged) {
@@ -16869,6 +17023,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
16869
17023
  ele.addEventListener("click", this.close);
16870
17024
  ele.classList.add(Popup.Css.close);
16871
17025
  ele.setAttribute("aria-label", "close");
17026
+ ele.setAttribute("type", "button");
16872
17027
  ele.setAttribute("tabindex", "0");
16873
17028
  ele.innerHTML = "×";
16874
17029
  return ele;
@@ -44983,6 +45138,12 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
44983
45138
  * @deprecated use `view` instead.
44984
45139
  */
44985
45140
  _this.userRegion = _this.view;
45141
+ /**
45142
+ * Override the default styles for the map elements.​
45143
+ * Default `undefined`
45144
+ * @default undefined
45145
+ */
45146
+ _this.styleOverrides = undefined;
44986
45147
  /**
44987
45148
  * allows substituting a default MapControl's style transformer with custom one
44988
45149
  * 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
@@ -45120,10 +45281,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
45120
45281
  /**
45121
45282
  * Disable telemetry collection
45122
45283
  * This option may only be set when initializing the map.
45123
- * default: false (true for the Azure Government cloud)
45124
- * @default false
45284
+ * default: true
45285
+ * @default true
45125
45286
  */
45126
- _this.disableTelemetry = getDomain() === "atlas.azure.us";
45287
+ _this.disableTelemetry = true;
45127
45288
  /**
45128
45289
  * Disable telemetry collection
45129
45290
  * This option may only be set when initializing the map.
@@ -45616,6 +45777,16 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
45616
45777
  };
45617
45778
  throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
45618
45779
  };
45780
+ /**
45781
+ * Mapping of styleOverrides options to style parameter values.
45782
+ */
45783
+ var styleOverridesMapping = {
45784
+ countryRegion: "cr|bv:0",
45785
+ adminDistrict: "ad|bv:0",
45786
+ adminDistrict2: "ds|bv:0",
45787
+ buildingFootprint: "bld|v:0_adr|lv:0",
45788
+ roadDetails: "g|rasterDetailsVisible:0"
45789
+ };
45619
45790
  /**
45620
45791
  * @private
45621
45792
  */
@@ -46126,7 +46297,31 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
46126
46297
  return targetStyleWithUserLayers;
46127
46298
  };
46128
46299
  }
46129
- this.map._getMap().setStyle(targetDefinition.url || targetDefinition.style, {
46300
+ var styleUrl = targetDefinition.url;
46301
+ if (styleUrl && (styleOptions === null || styleOptions === void 0 ? void 0 : styleOptions.styleOverrides)) {
46302
+ // Append the st parameter in the url with the mapped value.
46303
+ // We loop through the styleOverrides and join the corresponding st parameter with "_".
46304
+ var url = new URL(styleUrl);
46305
+ var params = new URLSearchParams(url.search);
46306
+ var stParams = Object.entries(styleOptions === null || styleOptions === void 0 ? void 0 : styleOptions.styleOverrides)
46307
+ .filter(function (_a) {
46308
+ var _b = __read$2(_a, 2), key = _b[0], value = _b[1];
46309
+ return key in styleOverridesMapping &&
46310
+ ( // bv stands for borderVisible
46311
+ (styleOverridesMapping[key].includes('bv') && (value === null || value === void 0 ? void 0 : value.borderVisible) === false) ||
46312
+ (!styleOverridesMapping[key].includes('bv') && (value === null || value === void 0 ? void 0 : value.visible) === false));
46313
+ })
46314
+ .map(function (_a) {
46315
+ var _b = __read$2(_a, 2), key = _b[0]; _b[1];
46316
+ return styleOverridesMapping[key];
46317
+ });
46318
+ if (stParams.length > 0) {
46319
+ params.set("st", stParams.join("_"));
46320
+ url.search = params.toString();
46321
+ styleUrl = url.toString();
46322
+ }
46323
+ }
46324
+ this.map._getMap().setStyle(styleUrl || targetDefinition.style, {
46130
46325
  diff: diff,
46131
46326
  validate: this.serviceOptions.validateStyle,
46132
46327
  transformStyle: transformStyleFunc