azure-maps-control 2.3.3 → 2.3.5

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
@@ -43477,7 +43477,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
43477
43477
  return Url;
43478
43478
  }());
43479
43479
 
43480
- var version = "2.3.3";
43480
+ var version = "2.3.5";
43481
43481
 
43482
43482
  /**
43483
43483
  * A helper class that provides methods for getting various forms of the map controls current version.
@@ -69830,8 +69830,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
69830
69830
  var domain = this.map.getServiceOptions().domain;
69831
69831
  var urlOptions = {
69832
69832
  domain: domain,
69833
- path: "search/address/reverse/json",
69834
- queryParams: __assign$4({ "api-version": "1.0", "language": options.style.language, "limit": 1, "query": normalizeLatitude(options.position[1]) + "," + normalizeLongitude(options.position[0]) }, (options.style.view && { view: options.style.view }))
69833
+ path: "reverseGeocode",
69834
+ queryParams: __assign$4({ "api-version": "2023-06-01", "coordinates": normalizeLongitude(options.position[0]) + "," + normalizeLatitude(options.position[1]) }, (options.style.view && { view: options.style.view })),
69835
+ headers: {
69836
+ "Accept-Language": options.style.language
69837
+ }
69835
69838
  };
69836
69839
  return new Url(((_a = this.map.authentication) === null || _a === void 0 ? void 0 : _a.signRequest(urlOptions)) || urlOptions).get();
69837
69840
  };
@@ -71032,12 +71035,13 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
71032
71035
  position: cam.center,
71033
71036
  style: style
71034
71037
  }).then(function (r) {
71038
+ var _a, _b, _c;
71035
71039
  var info = {};
71036
- if (r && r.addresses && r.addresses.length > 0) {
71037
- if (r.addresses[0].address) {
71038
- var a = r.addresses[0].address;
71039
- if (a.country) {
71040
- info.country = a.country;
71040
+ if (r && r.features && r.features.length > 0) {
71041
+ if ((_b = (_a = r.features[0]) === null || _a === void 0 ? void 0 : _a.properties) === null || _b === void 0 ? void 0 : _b.address) {
71042
+ var a = r.features[0].properties.address;
71043
+ if (a.countryRegion) {
71044
+ info.country = a.countryRegion.name;
71041
71045
  MapViewDescriptor._labelCache.cache(info.country, {
71042
71046
  source: [],
71043
71047
  labelType: "country",
@@ -71045,8 +71049,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
71045
71049
  minZoom: 0
71046
71050
  }, cam.center, style.language);
71047
71051
  }
71048
- if (a.countrySubdivision) {
71049
- info.state = a.countrySubdivision;
71052
+ if (a.adminDistricts) {
71053
+ info.state = (_c = a.adminDistricts[0]) === null || _c === void 0 ? void 0 : _c.shortName;
71050
71054
  MapViewDescriptor._labelCache.cache(info.state, {
71051
71055
  source: [],
71052
71056
  labelType: "state",
@@ -71054,20 +71058,17 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
71054
71058
  minZoom: 4
71055
71059
  }, cam.center, style.language);
71056
71060
  }
71057
- if (a.municipality) {
71058
- info.city = a.municipality;
71059
- MapViewDescriptor._labelCache.cache(info.state, {
71061
+ if (a.locality) {
71062
+ info.city = a.locality;
71063
+ MapViewDescriptor._labelCache.cache(info.city, {
71060
71064
  source: [],
71061
71065
  labelType: "city",
71062
71066
  radius: 1000,
71063
71067
  minZoom: 10
71064
71068
  }, cam.center, style.language);
71065
71069
  }
71066
- if (a.streetNameAndNumber) {
71067
- info.road = a.streetNameAndNumber;
71068
- }
71069
- else if (a.street) {
71070
- info.road = a.street;
71070
+ if (a.addressLine) {
71071
+ info.road = a.addressLine;
71071
71072
  }
71072
71073
  }
71073
71074
  }
@@ -79456,7 +79457,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
79456
79457
  return undefined;
79457
79458
  };
79458
79459
  /**
79459
- * Removes all user added layers from the map.
79460
+ * Removes all layers from the map.
79460
79461
  */
79461
79462
  LayerManager.prototype.clear = function () {
79462
79463
  for (var layerIndexIndex = this.layerIndex.length - 1; layerIndexIndex >= 0; layerIndexIndex--) {
@@ -81282,8 +81283,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
81282
81283
  */
81283
81284
  _this.styleSet = undefined;
81284
81285
  /**
81285
- * Enable accessibility
81286
- * default: true
81286
+ * Enable the accessibility feature to provide screen reader support for users who have difficulty visualizing the web application.
81287
+ * This property is set to true by default.
81287
81288
  * @default true
81288
81289
  */
81289
81290
  _this.enableAccessibility = true;
@@ -82282,6 +82283,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
82282
82283
  params.url = targetUrl.href;
82283
82284
  }
82284
82285
  (_a = this.map.authentication) === null || _a === void 0 ? void 0 : _a.signRequest(params);
82286
+ // Delete auth token for static assets to allow AFD caching
82287
+ this._deleteAuthTokenForStaticAssets(params);
82285
82288
  }
82286
82289
  };
82287
82290
  /**
@@ -82309,6 +82312,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
82309
82312
  requestParams = this.serviceOptions.transformRequest(requestParams.url, resourceType);
82310
82313
  }
82311
82314
  (_a = this.map.authentication) === null || _a === void 0 ? void 0 : _a.signRequest(requestParams);
82315
+ // Delete auth token for static assets to allow AFD caching
82316
+ this._deleteAuthTokenForStaticAssets(requestParams);
82312
82317
  fetchOptions = {
82313
82318
  method: "GET",
82314
82319
  mode: "cors",
@@ -82331,19 +82336,20 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
82331
82336
  });
82332
82337
  };
82333
82338
  /**
82334
- * A basic helper function to generate a hash from an input string.
82339
+ * Delete auth token for static assets to allow AFD caching.
82335
82340
  */
82336
- StyleManager._hashCode = function (str) {
82337
- if (str === void 0) { str = ""; }
82338
- var chr, hash = 0;
82339
- if (!str)
82340
- return hash;
82341
- for (var i = 0; i < str.length; i++) {
82342
- chr = str.charCodeAt(i);
82343
- hash = (hash << 5) - hash + chr;
82344
- hash |= 0; // Convert to 32bit integer
82345
- }
82346
- return hash;
82341
+ StyleManager.prototype._deleteAuthTokenForStaticAssets = function (params) {
82342
+ // The following resources are considered as static assets.
82343
+ // StyleSet /styling/styles
82344
+ // Style /styling/styles/*
82345
+ // Thumbnail /styling/styles/*/thumbnail.png
82346
+ // Sprite PNG /styling/sprites/*/sprite@2x.png
82347
+ // Sprite JSON /styling/sprites/*/sprite@2x.json
82348
+ // Glyph /styling/glyphs/*/0-255.pbf
82349
+ if (params.url.startsWith("https://" + this.serviceOptions.staticAssetsDomain + "/" + constants.stylePath)) {
82350
+ delete params.headers[constants.msClientIdHeaderName];
82351
+ delete params.headers[constants.authorizationHeaderName];
82352
+ }
82347
82353
  };
82348
82354
  return StyleManager;
82349
82355
  }());
@@ -83538,7 +83544,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
83538
83544
  this.dispose();
83539
83545
  };
83540
83546
  /**
83541
- * Removes all user added sources, layers, markers, and popups from the map.
83547
+ * Removes all sources, layers, markers, and popups from the map.
83542
83548
  * User added images are preserved.
83543
83549
  */
83544
83550
  Map.prototype.clear = function () {