azure-maps-control 2.2.3 → 2.2.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.
@@ -43619,7 +43619,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
43619
43619
  return Url;
43620
43620
  }());
43621
43621
 
43622
- var version = "2.2.3";
43622
+ var version = "2.2.4";
43623
43623
 
43624
43624
  /**
43625
43625
  * A helper class that provides methods for getting various forms of the map controls current version.
@@ -43660,27 +43660,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
43660
43660
  var tooltipContent = document.createElement("span");
43661
43661
  tooltipContent.innerText = name;
43662
43662
  tooltipContent.classList.add('tooltiptext');
43663
- // mimics default edge tooltip theming
43664
- if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
43665
- tooltipContent.classList.add('dark');
43666
- }
43667
- var themeQuery = window.matchMedia('(prefers-color-scheme: dark)');
43668
- var onThemeChange = function (e) {
43669
- var isDark = e.matches;
43670
- if (isDark && !tooltipContent.classList.contains('dark')) {
43671
- tooltipContent.classList.add('dark');
43672
- }
43673
- else if (!isDark && tooltipContent.classList.contains('dark')) {
43674
- tooltipContent.classList.remove('dark');
43675
- }
43676
- };
43677
- // compensate for browsers where MediaQueryList is not derived from EventTarget (pre iOS13 Safari)
43678
- if (typeof themeQuery.addEventListener === 'function') {
43679
- themeQuery.addEventListener('change', function (e) { return onThemeChange(e); });
43680
- }
43681
- else if (typeof themeQuery.addListener === 'function') {
43682
- themeQuery.addListener(function (e) { return onThemeChange(e); });
43683
- }
43684
43663
  if (navigator.userAgent.indexOf('Edg') != -1) {
43685
43664
  tooltipContent.classList.add('edge');
43686
43665
  }
@@ -47850,6 +47829,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
47850
47829
  }
47851
47830
  });
47852
47831
  container.addEventListener("focusout", function (event) {
47832
+ if (event.target === currStyleButton) {
47833
+ // on focusout from reveal button -> reset the tabIndex on the styleOpsGrid elements that could have been set to -1 on esc key press
47834
+ Array.from(styleOpsGrid.children).forEach(function (e) { return e.removeAttribute('tabIndex'); });
47835
+ }
47853
47836
  if (!(event.relatedTarget instanceof Node && container.contains(event.relatedTarget))) {
47854
47837
  _this.hasFocus = false;
47855
47838
  if (!_this.hasMouse) {
@@ -47864,6 +47847,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
47864
47847
  if (event.keyCode === 27) {
47865
47848
  event.stopPropagation();
47866
47849
  currStyleButton.focus();
47850
+ Array.from(styleOpsGrid.children).forEach(function (e) { return e.setAttribute('tabIndex', "-1"); });
47867
47851
  if (container.classList.contains(StyleControl.Css.inUse)) {
47868
47852
  container.classList.remove(StyleControl.Css.inUse);
47869
47853
  styleOpsGrid.classList.add("hidden-accessible-element");
@@ -59445,11 +59429,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
59445
59429
  // Translations for oceans: https://en.wikipedia.org/wiki/List_of_alternative_names_for_oceans
59446
59430
  this._preloadedCache.add(lang);
59447
59431
  var oceanConfig = {
59448
- source: ["Ocean label", "Ocean name"],
59432
+ source: [],
59449
59433
  labelType: "water",
59450
59434
  minZoom: 0,
59451
59435
  radius: 3950000,
59452
- polygonSources: ["Ocean", "Ocean or sea"]
59436
+ polygonSources: [] // doesn't affect the cache key
59453
59437
  };
59454
59438
  var shortLang = lang;
59455
59439
  var index = shortLang.indexOf("-");
@@ -59545,6 +59529,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
59545
59529
  }
59546
59530
  return ar;
59547
59531
  };
59532
+ var __spreadArray$2 = (window && window.__spreadArray) || function (to, from) {
59533
+ for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
59534
+ to[j] = from[i];
59535
+ return to;
59536
+ };
59548
59537
  /**
59549
59538
  * This class analyizes the current view of a map and provides a description for use by accessibilty tools.
59550
59539
  * TODO: Use services when in GeoPol regions. (Kasmir) or when user region sensitive.
@@ -59603,7 +59592,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
59603
59592
  * Vector Tile source layers: https://developer.tomtom.com/maps-api/maps-api-documentation-vector/tile
59604
59593
  */
59605
59594
  // Configuration for label extraction.
59606
- this._lableConfig = [
59595
+ this._labelConfig = [
59607
59596
  // Water labels
59608
59597
  {
59609
59598
  source: ["Ocean label", "Ocean name"],
@@ -59737,10 +59726,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
59737
59726
  polygonSources: ["Reservation"]
59738
59727
  }
59739
59728
  ];
59740
- // Name of all polygon layers in which we want to do an intersection test with.
59741
- this._polygonStyleLayer = ["National or state park", "National park", "Reservation", "Airport",
59742
- "Runway", "Stadium", "University", "Zoo", "Shopping", "Hospital", "Amusement park", "Ocean", "Sea",
59743
- "Ocean or sea"];
59744
59729
  // Name of all label types to cache.
59745
59730
  this._labelCache = new Set(["city", "state", "country", "water", "majorPoi"]);
59746
59731
  // Name of all road source layers.
@@ -60004,6 +59989,18 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
60004
59989
  _this._updateCam(true);
60005
59990
  // Find the id of the vector tile source being used.
60006
59991
  _this._baseVectorTileSourceId = MapViewDescriptor._baseVectorTileSourceIds.find(function (id) { return _this._map.sources.getById(id); });
59992
+ // Set the label config based on the vector tile source.
59993
+ if (_this._baseVectorTileSourceId === "bing-mvt") {
59994
+ _this._labelConfig = MapViewDescriptor._labelConfigBing;
59995
+ _this._roadLayers = MapViewDescriptor._roadLayersBing;
59996
+ }
59997
+ // Derive polygon layers from the label config.
59998
+ _this._polygonStyleLayer = _this._labelConfig.reduce(function (acc, cur) {
59999
+ if (cur.polygonSources) {
60000
+ acc.push.apply(acc, __spreadArray$2([], __read$6(cur.polygonSources)));
60001
+ }
60002
+ return acc;
60003
+ }, []);
60007
60004
  // Add event listeners directly to mapbox because we will be using custom event data.
60008
60005
  // We don't automatically forward all properties of a mapbox event, so the custom data would be lost.
60009
60006
  var baseMap = _this._map._getMap();
@@ -60113,8 +60110,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
60113
60110
  }
60114
60111
  intersectingType_1 = null;
60115
60112
  // Loop through each label config and try and retireve details about the map view.
60116
- for (i = 0, cnt = this._lableConfig.length; i < cnt; i++) {
60117
- layerInfo = this._lableConfig[i];
60113
+ for (i = 0, cnt = this._labelConfig.length; i < cnt; i++) {
60114
+ layerInfo = this._labelConfig[i];
60118
60115
  if (cam.zoom >= layerInfo.minZoom) {
60119
60116
  // If the layer info has polygons defined, do an intersection test for matching.
60120
60117
  if (layerInfo.polygonSources) {
@@ -60214,7 +60211,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
60214
60211
  // Loop through the label sources.
60215
60212
  for (var i = 0, len = layerInfo.source.length; i < len; i++) {
60216
60213
  var params = {
60217
- sourceLayer: layerInfo.source[i]
60214
+ sourceLayer: layerInfo.source[i],
60215
+ filter: ["has", "name"]
60218
60216
  };
60219
60217
  var labels = this._map._getMap().querySourceFeatures(this._baseVectorTileSourceId, params);
60220
60218
  var closest = null;
@@ -60291,21 +60289,22 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
60291
60289
  }
60292
60290
  if (closestRoad) {
60293
60291
  // Capture state and country codes from the closest road to ensure we have the most accurate values.
60294
- if (!info.country) {
60292
+ // Note: bing tiles do not have country_code and country_subdivision in road features.
60293
+ if (!info.country && closestRoad.properties.country_code) {
60295
60294
  info.country = closestRoad.properties.country_code;
60296
60295
  info.countryDis = 0;
60297
60296
  MapViewDescriptor._labelCache.cache(info.country, {
60298
- source: ["Country name"],
60297
+ source: [],
60299
60298
  labelType: "country",
60300
60299
  radius: 5000,
60301
60300
  minZoom: 0
60302
60301
  }, cPoint.geometry.coordinates, lang);
60303
60302
  }
60304
- if (!info.state) {
60303
+ if (!info.state && closestRoad.properties.country_subdivision) {
60305
60304
  info.state = closestRoad.properties.country_subdivision;
60306
60305
  info.stateDis = 0;
60307
60306
  MapViewDescriptor._labelCache.cache(info.state, {
60308
- source: ["State name"],
60307
+ source: [],
60309
60308
  labelType: "state",
60310
60309
  radius: 5000,
60311
60310
  minZoom: 4
@@ -60560,7 +60559,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
60560
60559
  if (a.country) {
60561
60560
  info.country = a.country;
60562
60561
  MapViewDescriptor._labelCache.cache(info.country, {
60563
- source: ["Country name"],
60562
+ source: [],
60564
60563
  labelType: "country",
60565
60564
  radius: 5000,
60566
60565
  minZoom: 0
@@ -60569,7 +60568,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
60569
60568
  if (a.countrySubdivision) {
60570
60569
  info.state = a.countrySubdivision;
60571
60570
  MapViewDescriptor._labelCache.cache(info.state, {
60572
- source: ["State name"],
60571
+ source: [],
60573
60572
  labelType: "state",
60574
60573
  radius: 5000,
60575
60574
  minZoom: 4
@@ -60578,7 +60577,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
60578
60577
  if (a.municipality) {
60579
60578
  info.city = a.municipality;
60580
60579
  MapViewDescriptor._labelCache.cache(info.state, {
60581
- source: ["Small city"],
60580
+ source: [],
60582
60581
  labelType: "city",
60583
60582
  radius: 1000,
60584
60583
  minZoom: 10
@@ -60613,6 +60612,116 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
60613
60612
  };
60614
60613
  // Ids of vector tile sources for different style APIs.
60615
60614
  MapViewDescriptor._baseVectorTileSourceIds = ["microsoft.base", "vectorTiles", "bing-mvt"];
60615
+ // Configuration for label extraction of Bing tiles.
60616
+ MapViewDescriptor._labelConfigBing = [
60617
+ // Water labels
60618
+ {
60619
+ source: ["water_feature"],
60620
+ labelType: "water",
60621
+ minZoom: 0,
60622
+ radius: 3950000,
60623
+ polygonSources: ["generic_water_fill"]
60624
+ },
60625
+ {
60626
+ source: ["water_feature"],
60627
+ labelType: "water",
60628
+ minZoom: 3,
60629
+ radius: 1000000,
60630
+ polygonSources: ["generic_water_fill"]
60631
+ },
60632
+ // Country labels
60633
+ {
60634
+ source: ["country_region"],
60635
+ labelType: "country",
60636
+ minZoom: 0,
60637
+ maxZoom: 5,
60638
+ radius: 300000
60639
+ },
60640
+ // State labels
60641
+ {
60642
+ source: ["admin_division1"],
60643
+ labelType: "state",
60644
+ minZoom: 4,
60645
+ maxZoom: 7,
60646
+ radius: 300000
60647
+ },
60648
+ // City labels
60649
+ {
60650
+ source: ["populated_place"],
60651
+ labelType: "city",
60652
+ minZoom: 8,
60653
+ radius: 40000
60654
+ },
60655
+ // Neighbourhood labels
60656
+ {
60657
+ source: ["neighborhood"],
60658
+ labelType: "neighbourhood",
60659
+ minZoom: 12,
60660
+ radius: 6000
60661
+ },
60662
+ // POI labels
60663
+ {
60664
+ source: ["amusement_park"],
60665
+ labelType: "poi",
60666
+ minZoom: 14,
60667
+ radius: 2000,
60668
+ polygonSources: ["amusement_park_fill"]
60669
+ },
60670
+ {
60671
+ source: ["hospital"],
60672
+ labelType: "poi",
60673
+ minZoom: 14,
60674
+ radius: 1000,
60675
+ polygonSources: ["hospital_fill"]
60676
+ },
60677
+ {
60678
+ source: ["shopping_center"],
60679
+ labelType: "poi",
60680
+ minZoom: 14,
60681
+ radius: 1000,
60682
+ polygonSources: ["shopping_center_fill"]
60683
+ },
60684
+ {
60685
+ source: ["stadium"],
60686
+ labelType: "poi",
60687
+ minZoom: 14,
60688
+ radius: 1000,
60689
+ polygonSources: ["stadium_fill"]
60690
+ },
60691
+ {
60692
+ source: ["higher_education_facility", "school"],
60693
+ labelType: "poi",
60694
+ minZoom: 14,
60695
+ radius: 1000,
60696
+ polygonSources: ["higher_education_facility_fill", "school_fill"]
60697
+ },
60698
+ {
60699
+ source: ["zoo"],
60700
+ labelType: "poi",
60701
+ minZoom: 14,
60702
+ radius: 1000,
60703
+ polygonSources: ["zoo_fill"]
60704
+ },
60705
+ // Major Poi labels
60706
+ {
60707
+ source: ["airport", "airport_terminal"],
60708
+ labelType: "majorPoi",
60709
+ minZoom: 11,
60710
+ radius: 3000,
60711
+ polygonSources: ["airport_terminal_fill", "airport_fill-merged7", "airport_runway_fill"]
60712
+ },
60713
+ {
60714
+ source: ["reserve"],
60715
+ labelType: "majorPoi",
60716
+ minZoom: 7,
60717
+ radius: 15000,
60718
+ polygonSources: ["generic_reserve_fill", "land_cover_forest_fill"]
60719
+ }
60720
+ ];
60721
+ // Name of all road source layers of Bing tiles.
60722
+ MapViewDescriptor._roadLayersBing = new Set([
60723
+ "road"
60724
+ ]);
60616
60725
  return MapViewDescriptor;
60617
60726
  }());
60618
60727
 
@@ -64370,7 +64479,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
64370
64479
  }
64371
64480
  return ar;
64372
64481
  };
64373
- var __spreadArray$2 = (window && window.__spreadArray) || function (to, from) {
64482
+ var __spreadArray$3 = (window && window.__spreadArray) || function (to, from) {
64374
64483
  for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
64375
64484
  to[j] = from[i];
64376
64485
  return to;
@@ -64388,7 +64497,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
64388
64497
  'data-azure-maps-attribution-order',
64389
64498
  'data-azure-maps-attribution-dynamic'
64390
64499
  ];
64391
- var allowedAttributionAttributes = __spreadArray$2([
64500
+ var allowedAttributionAttributes = __spreadArray$3([
64392
64501
  'href'
64393
64502
  ], __read$7(attributionRuleAttributes));
64394
64503
  var AttributionRuleProxy = /** @class */ (function () {
@@ -64613,7 +64722,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
64613
64722
  };
64614
64723
  AttributionRuleProxy.prototype.applyAttributionResponse = function (attributions) {
64615
64724
  var _this = this;
64616
- var copyrights = attributions.map(function (resp) { return resp.copyrights || []; }).reduce(function (flat, copyrights) { return __spreadArray$2(__spreadArray$2([], __read$7(flat)), __read$7(copyrights)); }, []);
64725
+ var copyrights = attributions.map(function (resp) { return resp.copyrights || []; }).reduce(function (flat, copyrights) { return __spreadArray$3(__spreadArray$3([], __read$7(flat)), __read$7(copyrights)); }, []);
64617
64726
  if (copyrights.length == 0) {
64618
64727
  // no attribution for a provided tileset/bbox/z
64619
64728
  return;
@@ -64678,7 +64787,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
64678
64787
  }
64679
64788
  return ar;
64680
64789
  };
64681
- var __spreadArray$3 = (window && window.__spreadArray) || function (to, from) {
64790
+ var __spreadArray$4 = (window && window.__spreadArray) || function (to, from) {
64682
64791
  for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
64683
64792
  to[j] = from[i];
64684
64793
  return to;
@@ -64799,10 +64908,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
64799
64908
  }, function () { return document.createElement('span'); });
64800
64909
  });
64801
64910
  var registeredRuleSet = new Set(Object.values(registeredRules));
64802
- var redundantRules = new Set(__spreadArray$3([], __read$8(allRules)).filter(function (rule) { return !registeredRuleSet.has(rule); }));
64803
- var redundantElements = new Set(__spreadArray$3([], __read$8(redundantRules)).map(function (rule) { return rule.getElement(); }));
64911
+ var redundantRules = new Set(__spreadArray$4([], __read$8(allRules)).filter(function (rule) { return !registeredRuleSet.has(rule); }));
64912
+ var redundantElements = new Set(__spreadArray$4([], __read$8(redundantRules)).map(function (rule) { return rule.getElement(); }));
64804
64913
  // eject redundant rules associated elements altogether
64805
- __spreadArray$3([], __read$8(redundantElements)).filter(function (elem) { return elem.parentElement !== null; })
64914
+ __spreadArray$4([], __read$8(redundantElements)).filter(function (elem) { return elem.parentElement !== null; })
64806
64915
  .forEach(function (elem) { return elem.parentElement.removeChild(elem); });
64807
64916
  _this.rules = Object.values(registeredRules);
64808
64917
  var attributionsToApply = attributions
@@ -64838,7 +64947,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
64838
64947
  var visibleTextNodes = function (elem) {
64839
64948
  return Array.from(elem.style.display != 'none' ? elem.children : [])
64840
64949
  .map(function (elem) { return visibleTextNodes(elem); })
64841
- .reduce(function (flattened, nodes) { return __spreadArray$3(__spreadArray$3([], __read$8(flattened)), __read$8(nodes)); }, Array.from(elem.style.display != 'none' ? elem.childNodes : []).filter(function (node) { return node.nodeType == node.TEXT_NODE; }));
64950
+ .reduce(function (flattened, nodes) { return __spreadArray$4(__spreadArray$4([], __read$8(flattened)), __read$8(nodes)); }, Array.from(elem.style.display != 'none' ? elem.childNodes : []).filter(function (node) { return node.nodeType == node.TEXT_NODE; }));
64842
64951
  };
64843
64952
  var newRenderContext = _this.virtualContext.cloneNode(true);
64844
64953
  var visibleNodes = visibleTextNodes(newRenderContext);
@@ -64853,7 +64962,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
64853
64962
  // }
64854
64963
  // });
64855
64964
  // strip all predefined keywords
64856
- visibleNodes.forEach(function (node) { return node.textContent = __spreadArray$3([], __read$8(attributionFilters)).reduce(function (target, filter) { return target.replace(filter, '').trim(); }, node.textContent); });
64965
+ visibleNodes.forEach(function (node) { return node.textContent = __spreadArray$4([], __read$8(attributionFilters)).reduce(function (target, filter) { return target.replace(filter, '').trim(); }, node.textContent); });
64857
64966
  // strip year from each node
64858
64967
  // visibleNodes.forEach(node => node.textContent = node.textContent.replace(copyrightYearPattern, '').trim());
64859
64968
  // deduplicate attribution text
@@ -67079,6 +67188,15 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
67079
67188
  }
67080
67189
  return this.initPromise;
67081
67190
  };
67191
+ /**
67192
+ * Cleans up any resources used by the authentication manager.
67193
+ */
67194
+ AuthenticationManager.prototype.dispose = function () {
67195
+ if (this.tokenTimeOutHandle) {
67196
+ clearTimeout(this.tokenTimeOutHandle);
67197
+ this.tokenTimeOutHandle = null;
67198
+ }
67199
+ };
67082
67200
  /**
67083
67201
  * Gets the default auth context to be shared between maps without one specified to them.
67084
67202
  */
@@ -68563,7 +68681,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
68563
68681
  }
68564
68682
  return ar;
68565
68683
  };
68566
- var __spreadArray$4 = (window && window.__spreadArray) || function (to, from) {
68684
+ var __spreadArray$5 = (window && window.__spreadArray) || function (to, from) {
68567
68685
  for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
68568
68686
  to[j] = from[i];
68569
68687
  return to;
@@ -68999,7 +69117,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
68999
69117
  // If a specified layer hasn't been added to the map throw an error.
69000
69118
  var index = this_1.layerIndex.findIndex(function (l) { return l.getId() === layerId; });
69001
69119
  if (index > -1) {
69002
- layerIds.push.apply(layerIds, __spreadArray$4([], __read$a(this_1.layerIndex[index]._getLayerIds()
69120
+ layerIds.push.apply(layerIds, __spreadArray$5([], __read$a(this_1.layerIndex[index]._getLayerIds()
69003
69121
  .filter(function (id) { return !!_this.map._getMap().getLayer(id); }))));
69004
69122
  }
69005
69123
  else {
@@ -69758,7 +69876,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
69758
69876
  }
69759
69877
  return ar;
69760
69878
  };
69761
- var __spreadArray$5 = (window && window.__spreadArray) || function (to, from) {
69879
+ var __spreadArray$6 = (window && window.__spreadArray) || function (to, from) {
69762
69880
  for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
69763
69881
  to[j] = from[i];
69764
69882
  return to;
@@ -69833,7 +69951,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
69833
69951
  }
69834
69952
  finally { if (e_1) throw e_1.error; }
69835
69953
  }
69836
- return _super.prototype.merge.apply(this, __spreadArray$5([], __read$b(valuesList)));
69954
+ return _super.prototype.merge.apply(this, __spreadArray$6([], __read$b(valuesList)));
69837
69955
  };
69838
69956
  return CameraBoundsOptions;
69839
69957
  }(Options));
@@ -70322,7 +70440,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
70322
70440
  }
70323
70441
  return ar;
70324
70442
  };
70325
- var __spreadArray$6 = (window && window.__spreadArray) || function (to, from) {
70443
+ var __spreadArray$7 = (window && window.__spreadArray) || function (to, from) {
70326
70444
  for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
70327
70445
  to[j] = from[i];
70328
70446
  return to;
@@ -70481,7 +70599,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
70481
70599
  finally { if (e_1) throw e_1.error; }
70482
70600
  }
70483
70601
  // Then execute the standard merge behavior.
70484
- return _super.prototype.merge.apply(this, __spreadArray$6([], __read$c(valueList)));
70602
+ return _super.prototype.merge.apply(this, __spreadArray$7([], __read$c(valueList)));
70485
70603
  };
70486
70604
  return StyleOptions;
70487
70605
  }(Options));
@@ -70539,7 +70657,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
70539
70657
  }
70540
70658
  return ar;
70541
70659
  };
70542
- var __spreadArray$7 = (window && window.__spreadArray) || function (to, from) {
70660
+ var __spreadArray$8 = (window && window.__spreadArray) || function (to, from) {
70543
70661
  for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
70544
70662
  to[j] = from[i];
70545
70663
  return to;
@@ -70774,10 +70892,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
70774
70892
  // won't change default behavior in Options as usually that's what desired
70775
70893
  // instead capture it here and reassign.
70776
70894
  var currentTransforms = this._transformers;
70777
- var transformersToMerge = valueList ? valueList.filter(function (value) { return value !== undefined; }).reduce(function (flattened, value) { return __spreadArray$7(__spreadArray$7([], __read$d(flattened)), __read$d(value._transformers || [])); }, []) : [];
70895
+ var transformersToMerge = valueList ? valueList.filter(function (value) { return value !== undefined; }).reduce(function (flattened, value) { return __spreadArray$8(__spreadArray$8([], __read$d(flattened)), __read$d(value._transformers || [])); }, []) : [];
70778
70896
  // Then execute the standard merge behavior.
70779
70897
  // If subscription key auth method isn't being used then the subscription key property should be undefined.
70780
- var merged = _super.prototype.merge.apply(this, __spreadArray$7([], __read$d(valueList)));
70898
+ var merged = _super.prototype.merge.apply(this, __spreadArray$8([], __read$d(valueList)));
70781
70899
  if (merged.authOptions.authType !== exports.AuthenticationType.subscriptionKey) {
70782
70900
  merged["subscription-key"] = merged.subscriptionKey = undefined;
70783
70901
  }
@@ -70789,7 +70907,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
70789
70907
  if (merged.mapConfiguration && typeof merged.mapConfiguration !== 'string') {
70790
70908
  merged.mapConfiguration = __assign$7(__assign$7({}, merged.mapConfiguration), { defaultConfiguration: merged.mapConfiguration.defaultConfiguration || merged.mapConfiguration['defaultStyle'], configurations: merged.mapConfiguration.configurations || merged.mapConfiguration['styles'] });
70791
70909
  }
70792
- this._transformers = __spreadArray$7(__spreadArray$7([], __read$d(currentTransforms || [])), __read$d(transformersToMerge.filter(function (toMerge) { return !currentTransforms.includes(toMerge); })));
70910
+ this._transformers = __spreadArray$8(__spreadArray$8([], __read$d(currentTransforms || [])), __read$d(transformersToMerge.filter(function (toMerge) { return !currentTransforms.includes(toMerge); })));
70793
70911
  if (this.transformRequest && !this._transformers.includes(this.transformRequest)) {
70794
70912
  this._transformers.push(this.transformRequest);
70795
70913
  }
@@ -71037,7 +71155,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
71037
71155
  }
71038
71156
  return ar;
71039
71157
  };
71040
- var __spreadArray$8 = (window && window.__spreadArray) || function (to, from) {
71158
+ var __spreadArray$9 = (window && window.__spreadArray) || function (to, from) {
71041
71159
  for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
71042
71160
  to[j] = from[i];
71043
71161
  return to;
@@ -71090,7 +71208,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
71090
71208
  var deferredLayers = Object.entries(layerGroupLayers).reduce(function (deferred, _a) {
71091
71209
  var _b = __read$e(_a, 2), groupName = _b[0], layers = _b[1];
71092
71210
  var isInInitialLayerGroup = validInitLayerGroups.includes(groupName);
71093
- return __spreadArray$8(__spreadArray$8([], __read$e(deferred)), __read$e(layers.filter(function (layer) {
71211
+ return __spreadArray$9(__spreadArray$9([], __read$e(deferred)), __read$e(layers.filter(function (layer) {
71094
71212
  var _a;
71095
71213
  // Exclude custom layers
71096
71214
  if (layer.type === 'custom')
@@ -71282,7 +71400,12 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
71282
71400
  domain: _this.serviceOptions.staticAssetsDomain,
71283
71401
  path: constants.stylePath + "/" + constants.styleResourcePath + "/" + style.name,
71284
71402
  queryParams: {
71285
- styleVersion: _this.serviceOptions.styleDefinitionsVersion,
71403
+ // Use the style version from the API response if it's available,
71404
+ // otherwise fallback to the version specified in the serviceOptions.
71405
+ // This is needed for flight testing the 2023-01-01 style version.
71406
+ styleVersion: definitions.version !== undefined && definitions.version !== null
71407
+ ? definitions.version
71408
+ : _this.serviceOptions.styleDefinitionsVersion
71286
71409
  // thus far we don't need to differentiate based on parameter here, as stylePatch will be called on cached styles as well
71287
71410
  //language: styleOptions.language
71288
71411
  },
@@ -71573,27 +71696,30 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
71573
71696
  * Fetches a json resource at the specified domain and path.
71574
71697
  */
71575
71698
  StyleManager.prototype._request = function (domain, path, resourceType, customQueryParams) {
71576
- var _a;
71699
+ var _a, _b;
71577
71700
  if (customQueryParams === void 0) { customQueryParams = {}; }
71578
71701
  return __awaiter$3(this, void 0, void 0, function () {
71579
71702
  var requestParams, fetchOptions;
71580
- var _b;
71581
- return __generator$3(this, function (_c) {
71582
- switch (_c.label) {
71703
+ var _c;
71704
+ return __generator$3(this, function (_d) {
71705
+ switch (_d.label) {
71583
71706
  case 0:
71584
71707
  requestParams = {
71585
71708
  url: new Url({
71586
71709
  protocol: "https",
71587
71710
  domain: domain,
71588
71711
  path: path,
71589
- queryParams: __assign$8((_b = {}, _b[constants.apiVersionQueryParameter] = this.serviceOptions.styleAPIVersion, _b), customQueryParams)
71712
+ queryParams: __assign$8((_c = {}, _c[constants.apiVersionQueryParameter] = this.serviceOptions.styleAPIVersion,
71713
+ // Generate a hash code to avoid cache conflict
71714
+ // TODO: Remove this once style version 2023-01-01 is publicly available
71715
+ _c.hash = StyleManager._hashCode((_a = this.map.authentication) === null || _a === void 0 ? void 0 : _a.getToken()), _c), customQueryParams)
71590
71716
  }).toString()
71591
71717
  };
71592
71718
  if (typeof this.serviceOptions.transformRequest === "function" && resourceType) {
71593
71719
  // If a transformRequest(...) was specified use it.
71594
71720
  requestParams = this.serviceOptions.transformRequest(requestParams.url, resourceType);
71595
71721
  }
71596
- (_a = this.map.authentication) === null || _a === void 0 ? void 0 : _a.signRequest(requestParams);
71722
+ (_b = this.map.authentication) === null || _b === void 0 ? void 0 : _b.signRequest(requestParams);
71597
71723
  fetchOptions = {
71598
71724
  method: "GET",
71599
71725
  mode: "cors",
@@ -71610,11 +71736,26 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
71610
71736
  throw new Error("HTTP " + response.status + ": " + response.statusText + " ");
71611
71737
  }
71612
71738
  })];
71613
- case 1: return [2 /*return*/, _c.sent()];
71739
+ case 1: return [2 /*return*/, _d.sent()];
71614
71740
  }
71615
71741
  });
71616
71742
  });
71617
71743
  };
71744
+ /**
71745
+ * A basic helper function to generate a hash from an input string.
71746
+ */
71747
+ StyleManager._hashCode = function (str) {
71748
+ if (str === void 0) { str = ""; }
71749
+ var chr, hash = 0;
71750
+ if (!str)
71751
+ return hash;
71752
+ for (var i = 0; i < str.length; i++) {
71753
+ chr = str.charCodeAt(i);
71754
+ hash = (hash << 5) - hash + chr;
71755
+ hash |= 0; // Convert to 32bit integer
71756
+ }
71757
+ return hash;
71758
+ };
71618
71759
  return StyleManager;
71619
71760
  }());
71620
71761
 
@@ -71701,7 +71842,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
71701
71842
  }
71702
71843
  return ar;
71703
71844
  };
71704
- var __spreadArray$9 = (window && window.__spreadArray) || function (to, from) {
71845
+ var __spreadArray$a = (window && window.__spreadArray) || function (to, from) {
71705
71846
  for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
71706
71847
  to[j] = from[i];
71707
71848
  return to;
@@ -71888,7 +72029,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
71888
72029
  _this.events.invoke("error", errorData);
71889
72030
  });
71890
72031
  // --> Set initial camera state of map
71891
- _this.setCamera(__assign$9(__assign$9({}, options), { type: "jump", duration: 0 }));
72032
+ _this.setCamera(__assign$9(__assign$9({
72033
+ // Default minZoom to ensure the map doesn't zoom out to unsupported zoom levels.
72034
+ minZoom: 1 }, options), { type: "jump", duration: 0 }));
71892
72035
  // Add delegates to map
71893
72036
  {
71894
72037
  _this.incidentDelegate = new IncidentServiceDelegate(_this);
@@ -72506,7 +72649,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
72506
72649
  urls = layer.getOptions().subdomains || [];
72507
72650
  }
72508
72651
  // Add the tile urls to the layer, but don't update the map yet.
72509
- urls.push.apply(urls, __spreadArray$9([], __read$f(tileSources)));
72652
+ urls.push.apply(urls, __spreadArray$a([], __read$f(tileSources)));
72510
72653
  layer._setOptionsNoUpdate({
72511
72654
  subdomains: urls
72512
72655
  });
@@ -72675,9 +72818,13 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
72675
72818
  * Clean up the map's resources. Map will not function correctly after calling this method.
72676
72819
  */
72677
72820
  Map.prototype.dispose = function () {
72821
+ var _a;
72678
72822
  this.clear();
72679
72823
  this.map.remove();
72824
+ (_a = this.authentication) === null || _a === void 0 ? void 0 : _a.dispose();
72680
72825
  this.removed = true;
72826
+ // Remove event listeners
72827
+ window.removeEventListener("resize", this._windowResizeCallback);
72681
72828
  while (this.getMapContainer().firstChild) {
72682
72829
  var currChild = this.getMapContainer().firstChild;
72683
72830
  this.getMapContainer().removeChild(currChild);
@@ -73022,7 +73169,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
73022
73169
  }
73023
73170
  return ar;
73024
73171
  };
73025
- var __spreadArray$a = (window && window.__spreadArray) || function (to, from) {
73172
+ var __spreadArray$b = (window && window.__spreadArray) || function (to, from) {
73026
73173
  for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
73027
73174
  to[j] = from[i];
73028
73175
  return to;
@@ -73168,7 +73315,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
73168
73315
  lineLength = 50;
73169
73316
  }
73170
73317
  var lines = c.split(/<(tr|div|br|li|h[0-9]|p>)/);
73171
- longestStringLength = Math.max.apply(Math, __spreadArray$a([], __read$g((lines.map(function (el) { return el.replace(/<[a-zA-Z0-9\s=\/]+>/g, "").length; }))))) - 1;
73318
+ longestStringLength = Math.max.apply(Math, __spreadArray$b([], __read$g((lines.map(function (el) { return el.replace(/<[a-zA-Z0-9\s=\/]+>/g, "").length; }))))) - 1;
73172
73319
  var w = Math.ceil(longestStringLength * 3.5);
73173
73320
  if (w < width) {
73174
73321
  width = w;