azure-maps-control 3.0.1 → 3.0.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.
@@ -263,7 +263,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
263
263
  return Url;
264
264
  }());
265
265
 
266
- var version = "3.0.1";
266
+ var version = "3.0.2";
267
267
 
268
268
  /**
269
269
  * A helper class that provides methods for getting various forms of the map controls current version.
@@ -19521,7 +19521,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
19521
19521
  return undefined;
19522
19522
  };
19523
19523
  /**
19524
- * Removes all user added layers from the map.
19524
+ * Removes all layers from the map.
19525
19525
  */
19526
19526
  LayerManager.prototype.clear = function () {
19527
19527
  for (var layerIndexIndex = this.layerIndex.length - 1; layerIndexIndex >= 0; layerIndexIndex--) {
@@ -22355,6 +22355,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
22355
22355
  params.url = targetUrl.href;
22356
22356
  }
22357
22357
  (_a = this.map.authentication) === null || _a === void 0 ? void 0 : _a.signRequest(params);
22358
+ // Delete auth token for static assets to allow AFD caching
22359
+ this._deleteAuthTokenForStaticAssets(params);
22358
22360
  }
22359
22361
  };
22360
22362
  /**
@@ -22382,6 +22384,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
22382
22384
  requestParams = this.serviceOptions.transformRequest(requestParams.url, resourceType);
22383
22385
  }
22384
22386
  (_a = this.map.authentication) === null || _a === void 0 ? void 0 : _a.signRequest(requestParams);
22387
+ // Delete auth token for static assets to allow AFD caching
22388
+ this._deleteAuthTokenForStaticAssets(requestParams);
22385
22389
  fetchOptions = {
22386
22390
  method: "GET",
22387
22391
  mode: "cors",
@@ -22404,19 +22408,20 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
22404
22408
  });
22405
22409
  };
22406
22410
  /**
22407
- * A basic helper function to generate a hash from an input string.
22411
+ * Delete auth token for static assets to allow AFD caching.
22408
22412
  */
22409
- StyleManager._hashCode = function (str) {
22410
- if (str === void 0) { str = ""; }
22411
- var chr, hash = 0;
22412
- if (!str)
22413
- return hash;
22414
- for (var i = 0; i < str.length; i++) {
22415
- chr = str.charCodeAt(i);
22416
- hash = (hash << 5) - hash + chr;
22417
- hash |= 0; // Convert to 32bit integer
22413
+ StyleManager.prototype._deleteAuthTokenForStaticAssets = function (params) {
22414
+ // The following resources are considered as static assets.
22415
+ // StyleSet /styling/styles
22416
+ // Style /styling/styles/*
22417
+ // Thumbnail /styling/styles/*/thumbnail.png
22418
+ // Sprite PNG /styling/sprites/*/sprite@2x.png
22419
+ // Sprite JSON /styling/sprites/*/sprite@2x.json
22420
+ // Glyph /styling/glyphs/*/0-255.pbf
22421
+ if (params.url.startsWith("https://".concat(this.serviceOptions.staticAssetsDomain, "/").concat(constants.stylePath))) {
22422
+ delete params.headers[constants.msClientIdHeaderName];
22423
+ delete params.headers[constants.authorizationHeaderName];
22418
22424
  }
22419
- return hash;
22420
22425
  };
22421
22426
  return StyleManager;
22422
22427
  }());
@@ -23618,7 +23623,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
23618
23623
  this.dispose();
23619
23624
  };
23620
23625
  /**
23621
- * Removes all user added sources, layers, markers, and popups from the map.
23626
+ * Removes all sources, layers, markers, and popups from the map.
23622
23627
  * User added images are preserved.
23623
23628
  */
23624
23629
  Map.prototype.clear = function () {
@@ -263,7 +263,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
263
263
  return Url;
264
264
  }());
265
265
 
266
- var version$2 = "3.0.1";
266
+ var version$2 = "3.0.2";
267
267
 
268
268
  /**
269
269
  * A helper class that provides methods for getting various forms of the map controls current version.
@@ -43125,7 +43125,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
43125
43125
  return undefined;
43126
43126
  };
43127
43127
  /**
43128
- * Removes all user added layers from the map.
43128
+ * Removes all layers from the map.
43129
43129
  */
43130
43130
  LayerManager.prototype.clear = function () {
43131
43131
  for (var layerIndexIndex = this.layerIndex.length - 1; layerIndexIndex >= 0; layerIndexIndex--) {
@@ -45959,6 +45959,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
45959
45959
  params.url = targetUrl.href;
45960
45960
  }
45961
45961
  (_a = this.map.authentication) === null || _a === void 0 ? void 0 : _a.signRequest(params);
45962
+ // Delete auth token for static assets to allow AFD caching
45963
+ this._deleteAuthTokenForStaticAssets(params);
45962
45964
  }
45963
45965
  };
45964
45966
  /**
@@ -45986,6 +45988,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
45986
45988
  requestParams = this.serviceOptions.transformRequest(requestParams.url, resourceType);
45987
45989
  }
45988
45990
  (_a = this.map.authentication) === null || _a === void 0 ? void 0 : _a.signRequest(requestParams);
45991
+ // Delete auth token for static assets to allow AFD caching
45992
+ this._deleteAuthTokenForStaticAssets(requestParams);
45989
45993
  fetchOptions = {
45990
45994
  method: "GET",
45991
45995
  mode: "cors",
@@ -46008,19 +46012,20 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
46008
46012
  });
46009
46013
  };
46010
46014
  /**
46011
- * A basic helper function to generate a hash from an input string.
46015
+ * Delete auth token for static assets to allow AFD caching.
46012
46016
  */
46013
- StyleManager._hashCode = function (str) {
46014
- if (str === void 0) { str = ""; }
46015
- var chr, hash = 0;
46016
- if (!str)
46017
- return hash;
46018
- for (var i = 0; i < str.length; i++) {
46019
- chr = str.charCodeAt(i);
46020
- hash = (hash << 5) - hash + chr;
46021
- hash |= 0; // Convert to 32bit integer
46017
+ StyleManager.prototype._deleteAuthTokenForStaticAssets = function (params) {
46018
+ // The following resources are considered as static assets.
46019
+ // StyleSet /styling/styles
46020
+ // Style /styling/styles/*
46021
+ // Thumbnail /styling/styles/*/thumbnail.png
46022
+ // Sprite PNG /styling/sprites/*/sprite@2x.png
46023
+ // Sprite JSON /styling/sprites/*/sprite@2x.json
46024
+ // Glyph /styling/glyphs/*/0-255.pbf
46025
+ if (params.url.startsWith("https://".concat(this.serviceOptions.staticAssetsDomain, "/").concat(constants.stylePath))) {
46026
+ delete params.headers[constants.msClientIdHeaderName];
46027
+ delete params.headers[constants.authorizationHeaderName];
46022
46028
  }
46023
- return hash;
46024
46029
  };
46025
46030
  return StyleManager;
46026
46031
  }());
@@ -47228,7 +47233,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
47228
47233
  this.dispose();
47229
47234
  };
47230
47235
  /**
47231
- * Removes all user added sources, layers, markers, and popups from the map.
47236
+ * Removes all sources, layers, markers, and popups from the map.
47232
47237
  * User added images are preserved.
47233
47238
  */
47234
47239
  Map.prototype.clear = function () {