azure-maps-control 2.3.0 → 2.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/atlas.js CHANGED
@@ -77,7 +77,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
77
77
  }
78
78
 
79
79
  var azuremapsMaplibreGlUnminified = createCommonjsModule(function (module, exports) {
80
- /* The Azure Maps fork of MapLibre GL JS is licensed under the 3-Clause BSD License. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v1.16.0/LICENSE.txt */
80
+ /* The Azure Maps fork of MapLibre GL JS is licensed under the 3-Clause BSD License. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v1.16.1/LICENSE.txt */
81
81
  (function (global, factory) {
82
82
  module.exports = factory() ;
83
83
  }(commonjsGlobal, (function () {
@@ -109,7 +109,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
109
109
  return module = { exports: {} }, fn(module, module.exports), module.exports;
110
110
  }
111
111
 
112
- var version = "1.16.0";
112
+ var version = "1.16.1";
113
113
 
114
114
  var unitbezier = UnitBezier;
115
115
  function UnitBezier(p1x, p1y, p2x, p2y) {
@@ -441,7 +441,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
441
441
  }
442
442
  function uuid() {
443
443
  function b(a) {
444
- return a ? (a ^ Math.random() * 16 >> a / 4).toString(16) : ([10000000] + -[1000] + -4000 + -8000 + -100000000000).replace(/[018]/g, b);
444
+ var rand = window$1.crypto.getRandomValues(new Uint32Array(1))[0] / Math.pow(2, 32);
445
+ return a ? (a ^ rand * 16 >> a / 4).toString(16) : ([10000000] + -[1000] + -4000 + -8000 + -100000000000).replace(/[018]/g, b);
445
446
  }
446
447
  return b();
447
448
  }
@@ -43476,7 +43477,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
43476
43477
  return Url;
43477
43478
  }());
43478
43479
 
43479
- var version = "2.3.0";
43480
+ var version = "2.3.2";
43480
43481
 
43481
43482
  /**
43482
43483
  * A helper class that provides methods for getting various forms of the map controls current version.
@@ -53245,7 +53246,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
53245
53246
  zoomInButton.setAttribute("alt", "Zoom In");
53246
53247
  zoomInButton.setAttribute("type", "button");
53247
53248
  zoomInButton.addEventListener("click", function () {
53249
+ var _a;
53248
53250
  map.setCamera({
53251
+ maxBounds: (_a = map._getMap().getMaxBounds()) === null || _a === void 0 ? void 0 : _a.toArray().flat(),
53249
53252
  zoom: map.getCamera().zoom + _this.options.zoomDelta,
53250
53253
  duration: ZoomControl.ZOOM_DURATION_MS,
53251
53254
  type: "ease",
@@ -53262,7 +53265,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
53262
53265
  zoomOutButton.setAttribute("alt", "Zoom Out");
53263
53266
  zoomOutButton.setAttribute("type", "button");
53264
53267
  zoomOutButton.addEventListener("click", function () {
53268
+ var _a;
53265
53269
  map.setCamera({
53270
+ maxBounds: (_a = map._getMap().getMaxBounds()) === null || _a === void 0 ? void 0 : _a.toArray().flat(),
53266
53271
  zoom: map.getCamera().zoom - _this.options.zoomDelta,
53267
53272
  duration: ZoomControl.ZOOM_DURATION_MS,
53268
53273
  type: "ease",
@@ -56377,6 +56382,13 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
56377
56382
  * @default "auto"
56378
56383
  */
56379
56384
  _this.pitchAlignment = "auto";
56385
+ /**
56386
+ * Radial offset of text, in the direction of the symbol's anchor. Useful in combination
56387
+ * with `variableAnchor`, which defaults to using the two-dimensional `offset` if present.
56388
+ * Default: `undefined`
56389
+ * @default undefined
56390
+ */
56391
+ _this.radialOffset = undefined;
56380
56392
  /**
56381
56393
  * The amount to rotate the text clockwise in degrees.
56382
56394
  * Default `0`
@@ -56396,6 +56408,25 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
56396
56408
  * @default "auto"
56397
56409
  */
56398
56410
  _this.rotationAlignment = "auto";
56411
+ /**
56412
+ * List of potential anchor locations, to increase the chance of placing high-priority
56413
+ * labels on the map. The renderer will attempt to place the label at each location,
56414
+ * in order, before moving onto the next label. Use `justify: "auto"` to choose text
56415
+ * justification based on anchor position. To apply an offset use the `radialOffset` or
56416
+ * two-dimensional `offset` options.
56417
+ * <p>`"center"`: The center of the icon is placed closest to the anchor.</p>
56418
+ * <p>`"left"`: The left side of the icon is placed closest to the anchor.</p>
56419
+ * <p>`"right"`: The right side of the icon is placed closest to the anchor.</p>
56420
+ * <p>`"top"`: The top of the icon is placed closest to the anchor.</p>
56421
+ * <p>`"bottom"`: The bottom of the icon is placed closest to the anchor.</p>
56422
+ * <p>`"top-left"`: The top left corner of the icon is placed closest to the anchor.</p>
56423
+ * <p>`"top-right"`: The top right corner of the icon is placed closest to the anchor.</p>
56424
+ * <p>`"bottom-left"`: The bottom left corner of the icon is placed closest to the anchor.</p>
56425
+ * <p>`"bottom-right"`: The bottom right corner of the icon is placed closest to the anchor.</p>
56426
+ * Default: `undefined`
56427
+ * @default undefined
56428
+ */
56429
+ _this.variableAnchor = undefined;
56399
56430
  /**
56400
56431
  * The size of the font in pixels.
56401
56432
  * Must be a number greater or equal to 0.
@@ -56494,6 +56525,13 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
56494
56525
  * @default "point"
56495
56526
  */
56496
56527
  _this.placement = "point";
56528
+ /**
56529
+ * Sorts features in ascending order based on this value. Features with
56530
+ * lower sort keys are drawn and placed first.
56531
+ * Default `undefined`.
56532
+ * @default undefined
56533
+ */
56534
+ _this.sortKey = undefined;
56497
56535
  /**
56498
56536
  * Determines whether overlapping symbols in the same layer are rendered in the order
56499
56537
  * that they appear in the data source, or by their y position relative to the viewport.
@@ -71174,6 +71212,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
71174
71212
  function AccessibleMapDelegate(map) {
71175
71213
  var _this = this;
71176
71214
  this.addToMap = function () {
71215
+ if (_this.mapViewDesc != null) {
71216
+ // AccessibleMapDelegate is already initialized and added to the map.
71217
+ return;
71218
+ }
71177
71219
  _this.initializeMapLiveStateInfo();
71178
71220
  _this.initializeMapStyleInfo();
71179
71221
  _this.createMapKeyBindingInfo();
@@ -81877,7 +81919,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
81877
81919
  };
81878
81920
  if (!this.serviceOptions.mapConfiguration) {
81879
81921
  var ensureAuthentication = this.map.authentication ? this.map.authentication.initialize() : Promise.resolve();
81880
- newPromise = new HijackablePromise(ensureAuthentication.then(function () { return _this._request(_this.serviceOptions.staticAssetsDomain, constants.stylePath + "/" + constants.styleResourcePath, "StyleDefinitions", { version: _this.serviceOptions.styleDefinitionsVersion }).then(function (definitions) { return ({
81922
+ newPromise = new HijackablePromise(ensureAuthentication.then(function () { return _this._request(_this.serviceOptions.staticAssetsDomain, constants.stylePath + "/" + constants.styleResourcePath, "StyleDefinitions", {
81923
+ version: _this.serviceOptions.styleDefinitionsVersion,
81924
+ // add MapControlVersion to make sure we have different local cache between map control versions
81925
+ mcv: version.replace(/\./g, ''),
81926
+ }).then(function (definitions) { return ({
81881
81927
  version: isNaN(definitions.version) ? 0 : parseFloat(definitions.version),
81882
81928
  defaultConfiguration: definitions.defaultStyle,
81883
81929
  configurations: definitions.styles
@@ -81909,9 +81955,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
81909
81955
  // This is needed for flight testing the 2023-01-01 style version.
81910
81956
  styleVersion: definitions.version !== undefined && definitions.version !== null
81911
81957
  ? definitions.version
81912
- : _this.serviceOptions.styleDefinitionsVersion
81958
+ : _this.serviceOptions.styleDefinitionsVersion,
81913
81959
  // thus far we don't need to differentiate based on parameter here, as stylePatch will be called on cached styles as well
81914
81960
  //language: styleOptions.language
81961
+ // add MapControlVersion to make sure we have different local cache between map control versions
81962
+ mcv: version.replace(/\./g, '')
81915
81963
  },
81916
81964
  protocol: "https"
81917
81965
  }).toString(),
@@ -83621,9 +83669,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
83621
83669
  Map.prototype._rebuildStyle = function (diff) {
83622
83670
  if (diff === void 0) { diff = true; }
83623
83671
  return __awaiter$5(this, void 0, void 0, function () {
83672
+ var _this = this;
83624
83673
  return __generator$5(this, function (_a) {
83625
83674
  this.styles.setStyle(this.styleOptions, diff);
83626
- this.imageSprite._restoreImages();
83675
+ this.events.addOnce("stylechanged", function () { return _this.imageSprite._restoreImages(); });
83627
83676
  return [2 /*return*/];
83628
83677
  });
83629
83678
  });