azure-maps-control 2.3.3 → 2.3.4

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.
@@ -265,7 +265,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
265
265
  return Url;
266
266
  }());
267
267
 
268
- var version = "2.3.3";
268
+ var version = "2.3.4";
269
269
 
270
270
  /**
271
271
  * A helper class that provides methods for getting various forms of the map controls current version.
@@ -18359,7 +18359,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
18359
18359
  return undefined;
18360
18360
  };
18361
18361
  /**
18362
- * Removes all user added layers from the map.
18362
+ * Removes all layers from the map.
18363
18363
  */
18364
18364
  LayerManager.prototype.clear = function () {
18365
18365
  for (var layerIndexIndex = this.layerIndex.length - 1; layerIndexIndex >= 0; layerIndexIndex--) {
@@ -21185,6 +21185,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
21185
21185
  params.url = targetUrl.href;
21186
21186
  }
21187
21187
  (_a = this.map.authentication) === null || _a === void 0 ? void 0 : _a.signRequest(params);
21188
+ // Delete auth token for static assets to allow AFD caching
21189
+ this._deleteAuthTokenForStaticAssets(params);
21188
21190
  }
21189
21191
  };
21190
21192
  /**
@@ -21212,6 +21214,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
21212
21214
  requestParams = this.serviceOptions.transformRequest(requestParams.url, resourceType);
21213
21215
  }
21214
21216
  (_a = this.map.authentication) === null || _a === void 0 ? void 0 : _a.signRequest(requestParams);
21217
+ // Delete auth token for static assets to allow AFD caching
21218
+ this._deleteAuthTokenForStaticAssets(requestParams);
21215
21219
  fetchOptions = {
21216
21220
  method: "GET",
21217
21221
  mode: "cors",
@@ -21234,19 +21238,20 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
21234
21238
  });
21235
21239
  };
21236
21240
  /**
21237
- * A basic helper function to generate a hash from an input string.
21241
+ * Delete auth token for static assets to allow AFD caching.
21238
21242
  */
21239
- StyleManager._hashCode = function (str) {
21240
- if (str === void 0) { str = ""; }
21241
- var chr, hash = 0;
21242
- if (!str)
21243
- return hash;
21244
- for (var i = 0; i < str.length; i++) {
21245
- chr = str.charCodeAt(i);
21246
- hash = (hash << 5) - hash + chr;
21247
- hash |= 0; // Convert to 32bit integer
21243
+ StyleManager.prototype._deleteAuthTokenForStaticAssets = function (params) {
21244
+ // The following resources are considered as static assets.
21245
+ // StyleSet /styling/styles
21246
+ // Style /styling/styles/*
21247
+ // Thumbnail /styling/styles/*/thumbnail.png
21248
+ // Sprite PNG /styling/sprites/*/sprite@2x.png
21249
+ // Sprite JSON /styling/sprites/*/sprite@2x.json
21250
+ // Glyph /styling/glyphs/*/0-255.pbf
21251
+ if (params.url.startsWith("https://" + this.serviceOptions.staticAssetsDomain + "/" + constants.stylePath)) {
21252
+ delete params.headers[constants.msClientIdHeaderName];
21253
+ delete params.headers[constants.authorizationHeaderName];
21248
21254
  }
21249
- return hash;
21250
21255
  };
21251
21256
  return StyleManager;
21252
21257
  }());
@@ -22432,7 +22437,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
22432
22437
  this.dispose();
22433
22438
  };
22434
22439
  /**
22435
- * Removes all user added sources, layers, markers, and popups from the map.
22440
+ * Removes all sources, layers, markers, and popups from the map.
22436
22441
  * User added images are preserved.
22437
22442
  */
22438
22443
  Map.prototype.clear = function () {
@@ -265,7 +265,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
265
265
  return Url;
266
266
  }());
267
267
 
268
- var version = "2.3.3";
268
+ var version = "2.3.4";
269
269
 
270
270
  /**
271
271
  * A helper class that provides methods for getting various forms of the map controls current version.
@@ -26081,7 +26081,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
26081
26081
  return undefined;
26082
26082
  };
26083
26083
  /**
26084
- * Removes all user added layers from the map.
26084
+ * Removes all layers from the map.
26085
26085
  */
26086
26086
  LayerManager.prototype.clear = function () {
26087
26087
  for (var layerIndexIndex = this.layerIndex.length - 1; layerIndexIndex >= 0; layerIndexIndex--) {
@@ -28907,6 +28907,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
28907
28907
  params.url = targetUrl.href;
28908
28908
  }
28909
28909
  (_a = this.map.authentication) === null || _a === void 0 ? void 0 : _a.signRequest(params);
28910
+ // Delete auth token for static assets to allow AFD caching
28911
+ this._deleteAuthTokenForStaticAssets(params);
28910
28912
  }
28911
28913
  };
28912
28914
  /**
@@ -28934,6 +28936,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
28934
28936
  requestParams = this.serviceOptions.transformRequest(requestParams.url, resourceType);
28935
28937
  }
28936
28938
  (_a = this.map.authentication) === null || _a === void 0 ? void 0 : _a.signRequest(requestParams);
28939
+ // Delete auth token for static assets to allow AFD caching
28940
+ this._deleteAuthTokenForStaticAssets(requestParams);
28937
28941
  fetchOptions = {
28938
28942
  method: "GET",
28939
28943
  mode: "cors",
@@ -28956,19 +28960,20 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
28956
28960
  });
28957
28961
  };
28958
28962
  /**
28959
- * A basic helper function to generate a hash from an input string.
28963
+ * Delete auth token for static assets to allow AFD caching.
28960
28964
  */
28961
- StyleManager._hashCode = function (str) {
28962
- if (str === void 0) { str = ""; }
28963
- var chr, hash = 0;
28964
- if (!str)
28965
- return hash;
28966
- for (var i = 0; i < str.length; i++) {
28967
- chr = str.charCodeAt(i);
28968
- hash = (hash << 5) - hash + chr;
28969
- hash |= 0; // Convert to 32bit integer
28965
+ StyleManager.prototype._deleteAuthTokenForStaticAssets = function (params) {
28966
+ // The following resources are considered as static assets.
28967
+ // StyleSet /styling/styles
28968
+ // Style /styling/styles/*
28969
+ // Thumbnail /styling/styles/*/thumbnail.png
28970
+ // Sprite PNG /styling/sprites/*/sprite@2x.png
28971
+ // Sprite JSON /styling/sprites/*/sprite@2x.json
28972
+ // Glyph /styling/glyphs/*/0-255.pbf
28973
+ if (params.url.startsWith("https://" + this.serviceOptions.staticAssetsDomain + "/" + constants.stylePath)) {
28974
+ delete params.headers[constants.msClientIdHeaderName];
28975
+ delete params.headers[constants.authorizationHeaderName];
28970
28976
  }
28971
- return hash;
28972
28977
  };
28973
28978
  return StyleManager;
28974
28979
  }());
@@ -30160,7 +30165,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
30160
30165
  this.dispose();
30161
30166
  };
30162
30167
  /**
30163
- * Removes all user added sources, layers, markers, and popups from the map.
30168
+ * Removes all sources, layers, markers, and popups from the map.
30164
30169
  * User added images are preserved.
30165
30170
  */
30166
30171
  Map.prototype.clear = function () {