azure-maps-control 3.0.0-preview.2 → 3.0.0-preview.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.
@@ -77,8 +77,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
77
77
  }
78
78
 
79
79
  var azuremapsMaplibreGlDev = 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/v3.0.0-pre.5/LICENSE.txt */
81
- /* Built timestamp: Tue, 13 Dec 2022 16:04:08 GMT */
80
+ /* Build timestamp: Mon, 16 Jan 2023 10:42:24 GMT */
81
+ /* 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/v3.0.0-pre.6/LICENSE.txt */
82
82
  (function (global, factory) {
83
83
  module.exports = factory() ;
84
84
  })(commonjsGlobal, (function () {
@@ -21405,6 +21405,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
21405
21405
  }
21406
21406
  workerTile.vectorTile = response.vectorTile;
21407
21407
  workerTile.parse(response.vectorTile, this.layerIndex, this.availableImages, this.actor, (err, result) => {
21408
+ const reloadCallback = workerTile.reloadCallback;
21409
+ if (workerTile.reloadCallback) {
21410
+ delete workerTile.reloadCallback;
21411
+ workerTile.parse(workerTile.vectorTile, this.layerIndex, this.availableImages, this.actor, reloadCallback);
21412
+ }
21408
21413
  if (err || !result)
21409
21414
  return callback(err);
21410
21415
  // Transferring a copy of rawTileData because the worker needs to retain its copy.
@@ -23878,7 +23883,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
23878
23883
  var packageJSON = {
23879
23884
  "name": "azuremaps-maplibre-gl",
23880
23885
  "description": "BSD licensed community fork of mapbox-gl, a WebGL interactive maps library",
23881
- "version": "3.0.0-pre.5",
23886
+ "version": "3.0.0-pre.6",
23882
23887
  "main": "dist/azuremaps-maplibre-gl.js",
23883
23888
  "style": "dist/azuremaps-maplibre-gl.css",
23884
23889
  "license": "BSD-3-Clause",
@@ -23968,7 +23973,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
23968
23973
  "eslint-plugin-jest": "^27.1.6",
23969
23974
  "eslint-plugin-jsdoc": "^39.6.4",
23970
23975
  "eslint-plugin-react": "^7.31.11",
23971
- "gl": "^6.0.1",
23976
+ "gl": "^6.0.2",
23972
23977
  "glob": "^8.0.3",
23973
23978
  "is-builtin-module": "^3.2.0",
23974
23979
  "jest": "^28.1.3",
@@ -46380,7 +46385,7 @@ uniform ${precision} ${type} u_${name};
46380
46385
  msClientIdHeaderName: "x-ms-client-id",
46381
46386
  msOriginHeaderName: "Ms-Am-Request-Origin",
46382
46387
  msOriginHeaderValue: "MapControl",
46383
- resourceId: "https://atlas.microsoft.com/",
46388
+ aadResourceId: "https://atlas.microsoft.com/.default",
46384
46389
  sessionIdHeaderName: "Session-Id"
46385
46390
  };
46386
46391
 
@@ -46558,7 +46563,7 @@ uniform ${precision} ${type} u_${name};
46558
46563
  return Url;
46559
46564
  }());
46560
46565
 
46561
- var version = "3.0.0-preview.2";
46566
+ var version = "3.0.0-preview.4";
46562
46567
 
46563
46568
  /**
46564
46569
  * A helper class that provides methods for getting various forms of the map controls current version.
@@ -46599,27 +46604,6 @@ uniform ${precision} ${type} u_${name};
46599
46604
  var tooltipContent = document.createElement("span");
46600
46605
  tooltipContent.innerText = name;
46601
46606
  tooltipContent.classList.add('tooltiptext');
46602
- // mimics default edge tooltip theming
46603
- if (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
46604
- tooltipContent.classList.add('dark');
46605
- }
46606
- var themeQuery = window.matchMedia('(prefers-color-scheme: dark)');
46607
- var onThemeChange = function (e) {
46608
- var isDark = e.matches;
46609
- if (isDark && !tooltipContent.classList.contains('dark')) {
46610
- tooltipContent.classList.add('dark');
46611
- }
46612
- else if (!isDark && tooltipContent.classList.contains('dark')) {
46613
- tooltipContent.classList.remove('dark');
46614
- }
46615
- };
46616
- // compensate for browsers where MediaQueryList is not derived from EventTarget (pre iOS13 Safari)
46617
- if (typeof themeQuery.addEventListener === 'function') {
46618
- themeQuery.addEventListener('change', function (e) { return onThemeChange(e); });
46619
- }
46620
- else if (typeof themeQuery.addListener === 'function') {
46621
- themeQuery.addListener(function (e) { return onThemeChange(e); });
46622
- }
46623
46607
  if (navigator.userAgent.indexOf('Edg') != -1) {
46624
46608
  tooltipContent.classList.add('edge');
46625
46609
  }
@@ -50789,6 +50773,10 @@ uniform ${precision} ${type} u_${name};
50789
50773
  }
50790
50774
  });
50791
50775
  container.addEventListener("focusout", function (event) {
50776
+ if (event.target === currStyleButton) {
50777
+ // on focusout from reveal button -> reset the tabIndex on the styleOpsGrid elements that could have been set to -1 on esc key press
50778
+ Array.from(styleOpsGrid.children).forEach(function (e) { return e.removeAttribute('tabIndex'); });
50779
+ }
50792
50780
  if (!(event.relatedTarget instanceof Node && container.contains(event.relatedTarget))) {
50793
50781
  _this.hasFocus = false;
50794
50782
  if (!_this.hasMouse) {
@@ -50803,6 +50791,7 @@ uniform ${precision} ${type} u_${name};
50803
50791
  if (event.keyCode === 27) {
50804
50792
  event.stopPropagation();
50805
50793
  currStyleButton.focus();
50794
+ Array.from(styleOpsGrid.children).forEach(function (e) { return e.setAttribute('tabIndex', "-1"); });
50806
50795
  if (container.classList.contains(StyleControl.Css.inUse)) {
50807
50796
  container.classList.remove(StyleControl.Css.inUse);
50808
50797
  styleOpsGrid.classList.add("hidden-accessible-element");
@@ -51068,8 +51057,8 @@ uniform ${precision} ${type} u_${name};
51068
51057
  * The type of traffic flow to display:
51069
51058
  * <p>"none" is to display no traffic flow data</p>
51070
51059
  * <p>"relative" is the speed of the road relative to free-flow</p>
51071
- * <p>"absolute" is the absolute speed of the road</p>
51072
- * <p>"relative-delay" displays relative speed only where they differ from free-flow;
51060
+ * <p>@deprecated "absolute" is the absolute speed of the road</p>
51061
+ * <p>@deprecated "relative-delay" displays relative speed only where they differ from free-flow;
51073
51062
  * false to stop displaying the traffic flow.</p>
51074
51063
  * default `"none"``
51075
51064
  * @default "none"
@@ -56469,6 +56458,23 @@ uniform ${precision} ${type} u_${name};
56469
56458
  * @default 0.375
56470
56459
  */
56471
56460
  _this.tolerance = 0.375;
56461
+ /**
56462
+ * Minimum number of points necessary to form a cluster if clustering is enabled.
56463
+ * @default 2
56464
+ */
56465
+ _this.clusterMinPoints = 2;
56466
+ /**
56467
+ * Whether to generate ids for the geojson features. When enabled, the feature.id property will be auto assigned based on its index in the features array, over-writing any previous values.
56468
+ */
56469
+ _this.generateId = false;
56470
+ /**
56471
+ * A property to use as a feature id (for feature state). Either a property name, or an object of the form {<sourceLayer>: <propertyName>}.
56472
+ */
56473
+ _this.promoteId = undefined;
56474
+ /**
56475
+ * An expression for filtering features prior to processing them for rendering.
56476
+ */
56477
+ _this.filter = undefined;
56472
56478
  return _this;
56473
56479
  }
56474
56480
  return DataSourceOptions;
@@ -56510,19 +56516,24 @@ uniform ${precision} ${type} u_${name};
56510
56516
  * Get reference to Mapbox Map
56511
56517
  * @internal
56512
56518
  */
56513
- Source.prototype._setMap = function (map) {
56519
+ Source.prototype._setMap = function (map, shouldInvokeEvent) {
56520
+ if (shouldInvokeEvent === void 0) { shouldInvokeEvent = true; }
56514
56521
  if (map == null || map === undefined) {
56515
56522
  var temp = this.map;
56516
56523
  delete this.map;
56517
- this._invokeEvent("sourceremoved", this);
56518
- if (temp) {
56519
- temp.events.invoke("sourceremoved", this);
56524
+ if (shouldInvokeEvent) {
56525
+ this._invokeEvent("sourceremoved", this);
56526
+ if (temp) {
56527
+ temp.events.invoke("sourceremoved", this);
56528
+ }
56520
56529
  }
56521
56530
  }
56522
56531
  else {
56523
56532
  this.map = map;
56524
- this._invokeEvent("sourceadded", this);
56525
- this.map.events.invoke("sourceadded", this);
56533
+ if (shouldInvokeEvent) {
56534
+ this._invokeEvent("sourceadded", this);
56535
+ this.map.events.invoke("sourceadded", this);
56536
+ }
56526
56537
  }
56527
56538
  };
56528
56539
  return Source;
@@ -56836,13 +56847,38 @@ uniform ${precision} ${type} u_${name};
56836
56847
  tolerance: this.options.tolerance,
56837
56848
  lineMetrics: this.options.lineMetrics,
56838
56849
  clusterProperties: this.options.clusterProperties,
56839
- buffer: this.options.buffer
56850
+ buffer: this.options.buffer,
56851
+ clusterMinPoints: this.options.clusterMinPoints,
56852
+ generateId: this.options.generateId,
56853
+ promoteId: this.options.promoteId,
56854
+ filter: this.options.filter
56840
56855
  };
56841
56856
  if (typeof this.options.clusterMaxZoom === "number") {
56842
56857
  geoJsonSource.clusterMaxZoom = this.options.clusterMaxZoom;
56843
56858
  }
56844
56859
  return geoJsonSource;
56845
56860
  };
56861
+ DataSource.prototype._isDeepEqual = function (other) {
56862
+ if (this.constructor !== other.constructor) {
56863
+ return false;
56864
+ }
56865
+ var source = this._buildSource();
56866
+ var otherSource = other._buildSource();
56867
+ return source.type === otherSource.type &&
56868
+ // no data comparison since it is costly and not needed. If geojson data is different, but other source properties are same, we treat it as an update.
56869
+ //source.data === otherSource.data &&
56870
+ source.maxzoom === otherSource.maxzoom &&
56871
+ source.cluster === otherSource.cluster &&
56872
+ source.clusterRadius === otherSource.clusterRadius &&
56873
+ source.tolerance === otherSource.tolerance &&
56874
+ source.lineMetrics === otherSource.lineMetrics &&
56875
+ JSON.stringify(source.clusterProperties) === JSON.stringify(otherSource.clusterProperties) &&
56876
+ source.buffer === otherSource.buffer &&
56877
+ source.clusterMinPoints === otherSource.clusterMinPoints &&
56878
+ source.generateId === otherSource.generateId &&
56879
+ source.promoteId === otherSource.promoteId &&
56880
+ source.filter === otherSource.filter;
56881
+ };
56846
56882
  /**
56847
56883
  * @internal
56848
56884
  */
@@ -57124,19 +57160,262 @@ uniform ${precision} ${type} u_${name};
57124
57160
  }
57125
57161
  return vectorSource;
57126
57162
  };
57163
+ /**
57164
+ * @internal
57165
+ */
57166
+ VectorTileSource.prototype._isDeepEqual = function (other) {
57167
+ if (this.constructor !== other.constructor) {
57168
+ return false;
57169
+ }
57170
+ var source = this._buildSource();
57171
+ var otherSource = other._buildSource();
57172
+ return source.type === otherSource.type &&
57173
+ source.url === otherSource.url &&
57174
+ ((source.tiles === undefined && otherSource.tiles === undefined) ||
57175
+ (source.tiles && otherSource.tiles && source.tiles.length === otherSource.tiles.length && source.tiles.every(function (value, idx) { return value === otherSource.tiles[idx]; }))) &&
57176
+ source.minzoom === otherSource.minzoom &&
57177
+ source.maxzoom === otherSource.maxzoom &&
57178
+ source.bounds === otherSource.bounds &&
57179
+ source.attribution === otherSource.attribution &&
57180
+ source.promoteId === otherSource.promoteId &&
57181
+ source.scheme === otherSource.scheme;
57182
+ };
57127
57183
  return VectorTileSource;
57128
57184
  }(Source));
57129
57185
 
57186
+ var __extends$p = (window && window.__extends) || (function () {
57187
+ var extendStatics = function (d, b) {
57188
+ extendStatics = Object.setPrototypeOf ||
57189
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
57190
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
57191
+ return extendStatics(d, b);
57192
+ };
57193
+ return function (d, b) {
57194
+ if (typeof b !== "function" && b !== null)
57195
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
57196
+ extendStatics(d, b);
57197
+ function __() { this.constructor = d; }
57198
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
57199
+ };
57200
+ })();
57201
+ /**
57202
+ * Used to represent the canvas source wrapper.
57203
+ * This is not meant to be exposed publicly yet
57204
+ * @private
57205
+ */
57206
+ var CanvasSource = /** @class */ (function (_super) {
57207
+ __extends$p(CanvasSource, _super);
57208
+ /**
57209
+ * Constructs a source from the contents of a layer resource file.
57210
+ * @param id The source's id.
57211
+ * @param sourceDef Canvas source specification.
57212
+ * @param options Unused for now
57213
+ */
57214
+ function CanvasSource(id, sourceDef, options) {
57215
+ var _this = _super.call(this, id) || this;
57216
+ _this.source = sourceDef;
57217
+ return _this;
57218
+ }
57219
+ /**
57220
+ * @internal
57221
+ */
57222
+ CanvasSource.prototype._isDeepEqual = function (other) {
57223
+ if (this.constructor !== other.constructor) {
57224
+ return false;
57225
+ }
57226
+ var source = this.source;
57227
+ var otherSource = other.source;
57228
+ return source.type === otherSource.type
57229
+ && source.canvas === otherSource.canvas
57230
+ && JSON.stringify(source.coordinates) === JSON.stringify(otherSource.coordinates)
57231
+ && source.animate === otherSource.animate;
57232
+ };
57233
+ /**
57234
+ * @internal
57235
+ */
57236
+ CanvasSource.prototype._buildSource = function () {
57237
+ return this.source;
57238
+ };
57239
+ return CanvasSource;
57240
+ }(Source));
57241
+
57242
+ var __extends$q = (window && window.__extends) || (function () {
57243
+ var extendStatics = function (d, b) {
57244
+ extendStatics = Object.setPrototypeOf ||
57245
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
57246
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
57247
+ return extendStatics(d, b);
57248
+ };
57249
+ return function (d, b) {
57250
+ if (typeof b !== "function" && b !== null)
57251
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
57252
+ extendStatics(d, b);
57253
+ function __() { this.constructor = d; }
57254
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
57255
+ };
57256
+ })();
57257
+ /**
57258
+ * Used to represent an unkown source wrapper.
57259
+ * This is not meant to be exposed publicly yet
57260
+ * @private
57261
+ */
57262
+ var UnknownSource = /** @class */ (function (_super) {
57263
+ __extends$q(UnknownSource, _super);
57264
+ /**
57265
+ * Constructs a source from the contents of a layer resource file.
57266
+ * @param id The source's id.
57267
+ * @param sourceDef source specification.
57268
+ * @param options Unused for now
57269
+ */
57270
+ function UnknownSource(id, sourceDef, options) {
57271
+ var _this = _super.call(this, id) || this;
57272
+ _this.source = sourceDef;
57273
+ return _this;
57274
+ }
57275
+ /**
57276
+ * @internal
57277
+ */
57278
+ UnknownSource.prototype._isDeepEqual = function (other) {
57279
+ if (this.constructor !== other.constructor) {
57280
+ return false;
57281
+ }
57282
+ var source = this.source;
57283
+ var otherSource = other.source;
57284
+ return source.type === otherSource.type;
57285
+ };
57286
+ /**
57287
+ * @internal
57288
+ */
57289
+ UnknownSource.prototype._buildSource = function () {
57290
+ return this.source;
57291
+ };
57292
+ return UnknownSource;
57293
+ }(Source));
57294
+
57295
+ var __extends$r = (window && window.__extends) || (function () {
57296
+ var extendStatics = function (d, b) {
57297
+ extendStatics = Object.setPrototypeOf ||
57298
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
57299
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
57300
+ return extendStatics(d, b);
57301
+ };
57302
+ return function (d, b) {
57303
+ if (typeof b !== "function" && b !== null)
57304
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
57305
+ extendStatics(d, b);
57306
+ function __() { this.constructor = d; }
57307
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
57308
+ };
57309
+ })();
57310
+ /**
57311
+ * Used to represent the image source wrapper.
57312
+ * This is not meant to be exposed publicly yet
57313
+ * @private
57314
+ */
57315
+ var ImageSource = /** @class */ (function (_super) {
57316
+ __extends$r(ImageSource, _super);
57317
+ /**
57318
+ * Constructs a source from the contents of a layer resource file.
57319
+ * @param id The source's id.
57320
+ * @param sourceDef Image source specification.
57321
+ * @param options Unused for now
57322
+ */
57323
+ function ImageSource(id, sourceDef, options) {
57324
+ var _this = _super.call(this, id) || this;
57325
+ _this.source = sourceDef;
57326
+ return _this;
57327
+ }
57328
+ /**
57329
+ * @internal
57330
+ */
57331
+ ImageSource.prototype._isDeepEqual = function (other) {
57332
+ if (this.constructor !== other.constructor) {
57333
+ return false;
57334
+ }
57335
+ var source = this.source;
57336
+ var otherSource = other.source;
57337
+ return source.type === otherSource.type
57338
+ && JSON.stringify(source.coordinates) === JSON.stringify(otherSource.coordinates)
57339
+ && source.url === otherSource.url;
57340
+ };
57341
+ /**
57342
+ * @internal
57343
+ */
57344
+ ImageSource.prototype._buildSource = function () {
57345
+ return this.source;
57346
+ };
57347
+ return ImageSource;
57348
+ }(Source));
57349
+
57350
+ var __extends$s = (window && window.__extends) || (function () {
57351
+ var extendStatics = function (d, b) {
57352
+ extendStatics = Object.setPrototypeOf ||
57353
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
57354
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
57355
+ return extendStatics(d, b);
57356
+ };
57357
+ return function (d, b) {
57358
+ if (typeof b !== "function" && b !== null)
57359
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
57360
+ extendStatics(d, b);
57361
+ function __() { this.constructor = d; }
57362
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
57363
+ };
57364
+ })();
57365
+ /**
57366
+ * Used to represent the video source wrapper.
57367
+ * This is not meant to be exposed publicly yet
57368
+ * @private
57369
+ */
57370
+ var VideoSource = /** @class */ (function (_super) {
57371
+ __extends$s(VideoSource, _super);
57372
+ /**
57373
+ * Constructs a source from the contents of a layer resource file.
57374
+ * @param id The source's id.
57375
+ * @param sourceDef Video source specification.
57376
+ * @param options Unused for now
57377
+ */
57378
+ function VideoSource(id, sourceDef, options) {
57379
+ var _this = _super.call(this, id) || this;
57380
+ _this.source = sourceDef;
57381
+ return _this;
57382
+ }
57383
+ /**
57384
+ * @internal
57385
+ */
57386
+ VideoSource.prototype._isDeepEqual = function (other) {
57387
+ if (this.constructor !== other.constructor) {
57388
+ return false;
57389
+ }
57390
+ var source = this.source;
57391
+ var otherSource = other.source;
57392
+ return source.type === otherSource.type
57393
+ && JSON.stringify(source.coordinates) === JSON.stringify(otherSource.coordinates)
57394
+ && source.urls === otherSource.urls;
57395
+ };
57396
+ /**
57397
+ * @internal
57398
+ */
57399
+ VideoSource.prototype._buildSource = function () {
57400
+ return this.source;
57401
+ };
57402
+ return VideoSource;
57403
+ }(Source));
57404
+
57130
57405
 
57131
57406
 
57132
57407
  var index$4 = /*#__PURE__*/Object.freeze({
57133
57408
  __proto__: null,
57134
57409
  Source: Source,
57135
57410
  DataSource: DataSource,
57136
- VectorTileSource: VectorTileSource
57411
+ VectorTileSource: VectorTileSource,
57412
+ CanvasSource: CanvasSource,
57413
+ ImageSource: ImageSource,
57414
+ VideoSource: VideoSource,
57415
+ UnknownSource: UnknownSource
57137
57416
  });
57138
57417
 
57139
- var __extends$p = (window && window.__extends) || (function () {
57418
+ var __extends$t = (window && window.__extends) || (function () {
57140
57419
  var extendStatics = function (d, b) {
57141
57420
  extendStatics = Object.setPrototypeOf ||
57142
57421
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -57155,7 +57434,7 @@ uniform ${precision} ${type} u_${name};
57155
57434
  * Abstract class for other layer classes to extend.
57156
57435
  */
57157
57436
  var Layer = /** @class */ (function (_super) {
57158
- __extends$p(Layer, _super);
57437
+ __extends$t(Layer, _super);
57159
57438
  function Layer(id) {
57160
57439
  var _this =
57161
57440
  // Assign an random id using a UUID if none was specified.
@@ -57260,7 +57539,7 @@ uniform ${precision} ${type} u_${name};
57260
57539
  return Layer;
57261
57540
  }(EventEmitter));
57262
57541
 
57263
- var __extends$q = (window && window.__extends) || (function () {
57542
+ var __extends$u = (window && window.__extends) || (function () {
57264
57543
  var extendStatics = function (d, b) {
57265
57544
  extendStatics = Object.setPrototypeOf ||
57266
57545
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -57279,7 +57558,7 @@ uniform ${precision} ${type} u_${name};
57279
57558
  * A base class which all other layer options inherit from.
57280
57559
  */
57281
57560
  var LayerOptions = /** @class */ (function (_super) {
57282
- __extends$q(LayerOptions, _super);
57561
+ __extends$u(LayerOptions, _super);
57283
57562
  function LayerOptions() {
57284
57563
  var _this = _super !== null && _super.apply(this, arguments) || this;
57285
57564
  /**
@@ -57326,7 +57605,7 @@ uniform ${precision} ${type} u_${name};
57326
57605
  return LayerOptions;
57327
57606
  }(Options));
57328
57607
 
57329
- var __extends$r = (window && window.__extends) || (function () {
57608
+ var __extends$v = (window && window.__extends) || (function () {
57330
57609
  var extendStatics = function (d, b) {
57331
57610
  extendStatics = Object.setPrototypeOf ||
57332
57611
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -57345,7 +57624,7 @@ uniform ${precision} ${type} u_${name};
57345
57624
  * Options used when rendering Point objects in a BubbleLayer.
57346
57625
  */
57347
57626
  var BubbleLayerOptions = /** @class */ (function (_super) {
57348
- __extends$r(BubbleLayerOptions, _super);
57627
+ __extends$v(BubbleLayerOptions, _super);
57349
57628
  function BubbleLayerOptions() {
57350
57629
  var _this = _super !== null && _super.apply(this, arguments) || this;
57351
57630
  /**
@@ -57415,7 +57694,7 @@ uniform ${precision} ${type} u_${name};
57415
57694
  return BubbleLayerOptions;
57416
57695
  }(LayerOptions));
57417
57696
 
57418
- var __extends$s = (window && window.__extends) || (function () {
57697
+ var __extends$w = (window && window.__extends) || (function () {
57419
57698
  var extendStatics = function (d, b) {
57420
57699
  extendStatics = Object.setPrototypeOf ||
57421
57700
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -57434,7 +57713,7 @@ uniform ${precision} ${type} u_${name};
57434
57713
  * Renders Point objects as scalable circles (bubbles).
57435
57714
  */
57436
57715
  var BubbleLayer = /** @class */ (function (_super) {
57437
- __extends$s(BubbleLayer, _super);
57716
+ __extends$w(BubbleLayer, _super);
57438
57717
  /**
57439
57718
  * Constructs a new BubbleLayer.
57440
57719
  * @param source The id or instance of a data source which the layer will render.
@@ -57544,7 +57823,7 @@ uniform ${precision} ${type} u_${name};
57544
57823
  return BubbleLayer;
57545
57824
  }(Layer));
57546
57825
 
57547
- var __extends$t = (window && window.__extends) || (function () {
57826
+ var __extends$x = (window && window.__extends) || (function () {
57548
57827
  var extendStatics = function (d, b) {
57549
57828
  extendStatics = Object.setPrototypeOf ||
57550
57829
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -57563,7 +57842,7 @@ uniform ${precision} ${type} u_${name};
57563
57842
  * Options used when rendering Point objects in a HeatMapLayer.
57564
57843
  */
57565
57844
  var HeatMapLayerOptions = /** @class */ (function (_super) {
57566
- __extends$t(HeatMapLayerOptions, _super);
57845
+ __extends$x(HeatMapLayerOptions, _super);
57567
57846
  function HeatMapLayerOptions() {
57568
57847
  var _this = _super !== null && _super.apply(this, arguments) || this;
57569
57848
  /**
@@ -57630,7 +57909,7 @@ uniform ${precision} ${type} u_${name};
57630
57909
  return HeatMapLayerOptions;
57631
57910
  }(LayerOptions));
57632
57911
 
57633
- var __extends$u = (window && window.__extends) || (function () {
57912
+ var __extends$y = (window && window.__extends) || (function () {
57634
57913
  var extendStatics = function (d, b) {
57635
57914
  extendStatics = Object.setPrototypeOf ||
57636
57915
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -57649,7 +57928,7 @@ uniform ${precision} ${type} u_${name};
57649
57928
  * Represent the density of data using different colors (HeatMap).
57650
57929
  */
57651
57930
  var HeatMapLayer = /** @class */ (function (_super) {
57652
- __extends$u(HeatMapLayer, _super);
57931
+ __extends$y(HeatMapLayer, _super);
57653
57932
  /**
57654
57933
  * Constructs a new HeatMapLayer.
57655
57934
  * @param source The id or instance of a data source which the layer will render.
@@ -57753,7 +58032,7 @@ uniform ${precision} ${type} u_${name};
57753
58032
  return HeatMapLayer;
57754
58033
  }(Layer));
57755
58034
 
57756
- var __extends$v = (window && window.__extends) || (function () {
58035
+ var __extends$z = (window && window.__extends) || (function () {
57757
58036
  var extendStatics = function (d, b) {
57758
58037
  extendStatics = Object.setPrototypeOf ||
57759
58038
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -57772,7 +58051,7 @@ uniform ${precision} ${type} u_${name};
57772
58051
  * Options used when rendering canvas, image, raster tile, and video layers
57773
58052
  */
57774
58053
  var MediaLayerOptions = /** @class */ (function (_super) {
57775
- __extends$v(MediaLayerOptions, _super);
58054
+ __extends$z(MediaLayerOptions, _super);
57776
58055
  function MediaLayerOptions() {
57777
58056
  var _this = _super !== null && _super.apply(this, arguments) || this;
57778
58057
  /**
@@ -57824,7 +58103,7 @@ uniform ${precision} ${type} u_${name};
57824
58103
  return MediaLayerOptions;
57825
58104
  }(LayerOptions));
57826
58105
 
57827
- var __extends$w = (window && window.__extends) || (function () {
58106
+ var __extends$A = (window && window.__extends) || (function () {
57828
58107
  var extendStatics = function (d, b) {
57829
58108
  extendStatics = Object.setPrototypeOf ||
57830
58109
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -57843,7 +58122,7 @@ uniform ${precision} ${type} u_${name};
57843
58122
  * Options used when rendering Point objects in a ImageLayer.
57844
58123
  */
57845
58124
  var ImageLayerOptions = /** @class */ (function (_super) {
57846
- __extends$w(ImageLayerOptions, _super);
58125
+ __extends$A(ImageLayerOptions, _super);
57847
58126
  function ImageLayerOptions() {
57848
58127
  var _this = _super !== null && _super.apply(this, arguments) || this;
57849
58128
  /**
@@ -57873,7 +58152,7 @@ uniform ${precision} ${type} u_${name};
57873
58152
  return ImageLayerOptions;
57874
58153
  }(MediaLayerOptions));
57875
58154
 
57876
- var __extends$x = (window && window.__extends) || (function () {
58155
+ var __extends$B = (window && window.__extends) || (function () {
57877
58156
  var extendStatics = function (d, b) {
57878
58157
  extendStatics = Object.setPrototypeOf ||
57879
58158
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -57893,7 +58172,7 @@ uniform ${precision} ${type} u_${name};
57893
58172
  * @internal
57894
58173
  */
57895
58174
  var SourceBuildingLayer = /** @class */ (function (_super) {
57896
- __extends$x(SourceBuildingLayer, _super);
58175
+ __extends$B(SourceBuildingLayer, _super);
57897
58176
  function SourceBuildingLayer() {
57898
58177
  return _super !== null && _super.apply(this, arguments) || this;
57899
58178
  }
@@ -57905,10 +58184,13 @@ uniform ${precision} ${type} u_${name};
57905
58184
  ids.add(this._getSourceId());
57906
58185
  return ids;
57907
58186
  };
58187
+ SourceBuildingLayer.prototype.onAdd = function (map) {
58188
+ _super.prototype.onAdd.call(this, map);
58189
+ };
57908
58190
  return SourceBuildingLayer;
57909
58191
  }(Layer));
57910
58192
 
57911
- var __extends$y = (window && window.__extends) || (function () {
58193
+ var __extends$C = (window && window.__extends) || (function () {
57912
58194
  var extendStatics = function (d, b) {
57913
58195
  extendStatics = Object.setPrototypeOf ||
57914
58196
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -57927,7 +58209,7 @@ uniform ${precision} ${type} u_${name};
57927
58209
  * Overlays an image on the map with each corner anchored to a coordinate on the map. Also known as a ground or image overlay.
57928
58210
  */
57929
58211
  var ImageLayer = /** @class */ (function (_super) {
57930
- __extends$y(ImageLayer, _super);
58212
+ __extends$C(ImageLayer, _super);
57931
58213
  /**
57932
58214
  * Constructs a new ImageLayer.
57933
58215
  * @param id The id of the layer. If not specified a random one will be generated.
@@ -58127,10 +58409,15 @@ uniform ${precision} ${type} u_${name};
58127
58409
  this.transform = Promise.resolve(new AffineTransform(corners, this.options.coordinates));
58128
58410
  }
58129
58411
  };
58412
+ ImageLayer.prototype._getSourceWrapper = function () {
58413
+ var sourceId = this._getSourceId();
58414
+ var source = this._buildSource();
58415
+ return new ImageSource(sourceId, source);
58416
+ };
58130
58417
  return ImageLayer;
58131
58418
  }(SourceBuildingLayer));
58132
58419
 
58133
- var __extends$z = (window && window.__extends) || (function () {
58420
+ var __extends$D = (window && window.__extends) || (function () {
58134
58421
  var extendStatics = function (d, b) {
58135
58422
  extendStatics = Object.setPrototypeOf ||
58136
58423
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -58150,7 +58437,7 @@ uniform ${precision} ${type} u_${name};
58150
58437
  * LineString, MultiLineString, Polygon, and MultiPolygon objects in a line layer.
58151
58438
  */
58152
58439
  var LineLayerOptions = /** @class */ (function (_super) {
58153
- __extends$z(LineLayerOptions, _super);
58440
+ __extends$D(LineLayerOptions, _super);
58154
58441
  function LineLayerOptions() {
58155
58442
  var _this = _super !== null && _super.apply(this, arguments) || this;
58156
58443
  /**
@@ -58250,7 +58537,7 @@ uniform ${precision} ${type} u_${name};
58250
58537
  return LineLayerOptions;
58251
58538
  }(LayerOptions));
58252
58539
 
58253
- var __extends$A = (window && window.__extends) || (function () {
58540
+ var __extends$E = (window && window.__extends) || (function () {
58254
58541
  var extendStatics = function (d, b) {
58255
58542
  extendStatics = Object.setPrototypeOf ||
58256
58543
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -58281,7 +58568,7 @@ uniform ${precision} ${type} u_${name};
58281
58568
  * CirclePolygon, LineString, MultiLineString, Polygon, and MultiPolygon objects.
58282
58569
  */
58283
58570
  var LineLayer = /** @class */ (function (_super) {
58284
- __extends$A(LineLayer, _super);
58571
+ __extends$E(LineLayer, _super);
58285
58572
  /**
58286
58573
  * Constructs a new LineLayer.
58287
58574
  * @param source The id or instance of a data source which the layer will render.
@@ -58372,7 +58659,7 @@ uniform ${precision} ${type} u_${name};
58372
58659
  return LineLayer;
58373
58660
  }(Layer));
58374
58661
 
58375
- var __extends$B = (window && window.__extends) || (function () {
58662
+ var __extends$F = (window && window.__extends) || (function () {
58376
58663
  var extendStatics = function (d, b) {
58377
58664
  extendStatics = Object.setPrototypeOf ||
58378
58665
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -58391,7 +58678,7 @@ uniform ${precision} ${type} u_${name};
58391
58678
  * Options used when rendering `Polygon` and `MultiPolygon` objects in a `PolygonExtrusionLayer`.
58392
58679
  */
58393
58680
  var PolygonExtrusionLayerOptions = /** @class */ (function (_super) {
58394
- __extends$B(PolygonExtrusionLayerOptions, _super);
58681
+ __extends$F(PolygonExtrusionLayerOptions, _super);
58395
58682
  function PolygonExtrusionLayerOptions() {
58396
58683
  var _this = _super !== null && _super.apply(this, arguments) || this;
58397
58684
  /**
@@ -58464,7 +58751,7 @@ uniform ${precision} ${type} u_${name};
58464
58751
  return PolygonExtrusionLayerOptions;
58465
58752
  }(LayerOptions));
58466
58753
 
58467
- var __extends$C = (window && window.__extends) || (function () {
58754
+ var __extends$G = (window && window.__extends) || (function () {
58468
58755
  var extendStatics = function (d, b) {
58469
58756
  extendStatics = Object.setPrototypeOf ||
58470
58757
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -58494,7 +58781,7 @@ uniform ${precision} ${type} u_${name};
58494
58781
  * Renders extruded filled `Polygon` and `MultiPolygon` objects on the map.
58495
58782
  */
58496
58783
  var PolygonExtrusionLayer = /** @class */ (function (_super) {
58497
- __extends$C(PolygonExtrusionLayer, _super);
58784
+ __extends$G(PolygonExtrusionLayer, _super);
58498
58785
  /**
58499
58786
  * Constructs a new PolygonExtrusionLayer.
58500
58787
  * @param source The id or instance of a data source which the layer will render.
@@ -58582,7 +58869,7 @@ uniform ${precision} ${type} u_${name};
58582
58869
  return PolygonExtrusionLayer;
58583
58870
  }(Layer));
58584
58871
 
58585
- var __extends$D = (window && window.__extends) || (function () {
58872
+ var __extends$H = (window && window.__extends) || (function () {
58586
58873
  var extendStatics = function (d, b) {
58587
58874
  extendStatics = Object.setPrototypeOf ||
58588
58875
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -58633,7 +58920,7 @@ uniform ${precision} ${type} u_${name};
58633
58920
  * Options used when rendering Polygon and MultiPolygon objects in a PolygonLayer.
58634
58921
  */
58635
58922
  var PolygonLayerOptions = /** @class */ (function (_super) {
58636
- __extends$D(PolygonLayerOptions, _super);
58923
+ __extends$H(PolygonLayerOptions, _super);
58637
58924
  function PolygonLayerOptions() {
58638
58925
  var _this = _super !== null && _super.apply(this, arguments) || this;
58639
58926
  /**
@@ -58711,7 +58998,7 @@ uniform ${precision} ${type} u_${name};
58711
58998
  return PolygonLayerOptions;
58712
58999
  }(LayerOptions));
58713
59000
 
58714
- var __extends$E = (window && window.__extends) || (function () {
59001
+ var __extends$I = (window && window.__extends) || (function () {
58715
59002
  var extendStatics = function (d, b) {
58716
59003
  extendStatics = Object.setPrototypeOf ||
58717
59004
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -58730,7 +59017,7 @@ uniform ${precision} ${type} u_${name};
58730
59017
  * Renders filled Polygon and MultiPolygon objects on the map.
58731
59018
  */
58732
59019
  var PolygonLayer = /** @class */ (function (_super) {
58733
- __extends$E(PolygonLayer, _super);
59020
+ __extends$I(PolygonLayer, _super);
58734
59021
  /**
58735
59022
  * Constructs a new PolygonLayer.
58736
59023
  * @param source The id or instance of a data source which the layer will render.
@@ -58836,7 +59123,7 @@ uniform ${precision} ${type} u_${name};
58836
59123
  return PolygonLayer;
58837
59124
  }(Layer));
58838
59125
 
58839
- var __extends$F = (window && window.__extends) || (function () {
59126
+ var __extends$J = (window && window.__extends) || (function () {
58840
59127
  var extendStatics = function (d, b) {
58841
59128
  extendStatics = Object.setPrototypeOf ||
58842
59129
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -58855,7 +59142,7 @@ uniform ${precision} ${type} u_${name};
58855
59142
  * Options used to customize the icons in a SymbolLayer
58856
59143
  */
58857
59144
  var IconOptions = /** @class */ (function (_super) {
58858
- __extends$F(IconOptions, _super);
59145
+ __extends$J(IconOptions, _super);
58859
59146
  function IconOptions() {
58860
59147
  var _this = _super !== null && _super.apply(this, arguments) || this;
58861
59148
  /**
@@ -58965,7 +59252,7 @@ uniform ${precision} ${type} u_${name};
58965
59252
  return IconOptions;
58966
59253
  }(Options));
58967
59254
 
58968
- var __extends$G = (window && window.__extends) || (function () {
59255
+ var __extends$K = (window && window.__extends) || (function () {
58969
59256
  var extendStatics = function (d, b) {
58970
59257
  extendStatics = Object.setPrototypeOf ||
58971
59258
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -58984,7 +59271,7 @@ uniform ${precision} ${type} u_${name};
58984
59271
  * Options used to customize the text in a SymbolLayer
58985
59272
  */
58986
59273
  var TextOptions = /** @class */ (function (_super) {
58987
- __extends$G(TextOptions, _super);
59274
+ __extends$K(TextOptions, _super);
58988
59275
  function TextOptions() {
58989
59276
  var _this = _super !== null && _super.apply(this, arguments) || this;
58990
59277
  /**
@@ -59138,7 +59425,7 @@ uniform ${precision} ${type} u_${name};
59138
59425
  return TextOptions;
59139
59426
  }(Options));
59140
59427
 
59141
- var __extends$H = (window && window.__extends) || (function () {
59428
+ var __extends$L = (window && window.__extends) || (function () {
59142
59429
  var extendStatics = function (d, b) {
59143
59430
  extendStatics = Object.setPrototypeOf ||
59144
59431
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -59157,7 +59444,7 @@ uniform ${precision} ${type} u_${name};
59157
59444
  * Options used when rendering geometries in a SymbolLayer.
59158
59445
  */
59159
59446
  var SymbolLayerOptions = /** @class */ (function (_super) {
59160
- __extends$H(SymbolLayerOptions, _super);
59447
+ __extends$L(SymbolLayerOptions, _super);
59161
59448
  function SymbolLayerOptions() {
59162
59449
  var _this = _super !== null && _super.apply(this, arguments) || this;
59163
59450
  /**
@@ -59215,7 +59502,7 @@ uniform ${precision} ${type} u_${name};
59215
59502
  return SymbolLayerOptions;
59216
59503
  }(LayerOptions));
59217
59504
 
59218
- var __extends$I = (window && window.__extends) || (function () {
59505
+ var __extends$M = (window && window.__extends) || (function () {
59219
59506
  var extendStatics = function (d, b) {
59220
59507
  extendStatics = Object.setPrototypeOf ||
59221
59508
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -59246,7 +59533,7 @@ uniform ${precision} ${type} u_${name};
59246
59533
  * Symbols can also be created for line and polygon data as well.
59247
59534
  */
59248
59535
  var SymbolLayer = /** @class */ (function (_super) {
59249
- __extends$I(SymbolLayer, _super);
59536
+ __extends$M(SymbolLayer, _super);
59250
59537
  /**
59251
59538
  * Constructs a new SymbolLayer.
59252
59539
  * @param source The id or instance of a data source which the layer will render.
@@ -59388,7 +59675,124 @@ uniform ${precision} ${type} u_${name};
59388
59675
  return SymbolLayer;
59389
59676
  }(Layer));
59390
59677
 
59391
- var __extends$J = (window && window.__extends) || (function () {
59678
+ var __extends$N = (window && window.__extends) || (function () {
59679
+ var extendStatics = function (d, b) {
59680
+ extendStatics = Object.setPrototypeOf ||
59681
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
59682
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
59683
+ return extendStatics(d, b);
59684
+ };
59685
+ return function (d, b) {
59686
+ if (typeof b !== "function" && b !== null)
59687
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
59688
+ extendStatics(d, b);
59689
+ function __() { this.constructor = d; }
59690
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
59691
+ };
59692
+ })();
59693
+ var __assign$3 = (window && window.__assign) || function () {
59694
+ __assign$3 = Object.assign || function(t) {
59695
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
59696
+ s = arguments[i];
59697
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
59698
+ t[p] = s[p];
59699
+ }
59700
+ return t;
59701
+ };
59702
+ return __assign$3.apply(this, arguments);
59703
+ };
59704
+ /**
59705
+ * Used to represent the fundamental map source.
59706
+ * @private
59707
+ */
59708
+ var FundamentalMapSource = /** @class */ (function (_super) {
59709
+ __extends$N(FundamentalMapSource, _super);
59710
+ /**
59711
+ * Constructs a source from the contents of a layer resource file.
59712
+ * @param id The source's id.
59713
+ * @param sourceDef The sources entry of the resource file.
59714
+ * @param options The query parameters to add to the urls listed in the resource file.
59715
+ */
59716
+ function FundamentalMapSource(id, sourceDef, options) {
59717
+ var _this = _super.call(this, id) || this;
59718
+ _this.source = _this._modifySource(sourceDef, options);
59719
+ return _this;
59720
+ }
59721
+ /**
59722
+ * @internal
59723
+ */
59724
+ FundamentalMapSource.prototype._buildSource = function () {
59725
+ return this.source;
59726
+ };
59727
+ /**
59728
+ * @internal
59729
+ */
59730
+ FundamentalMapSource.prototype._isDeepEqual = function (other) {
59731
+ if (this.constructor !== other.constructor) {
59732
+ return false;
59733
+ }
59734
+ var source = this.source;
59735
+ var otherSource = other.source;
59736
+ var baseEqual = source.type === otherSource.type &&
59737
+ source.url === otherSource.url
59738
+ && ((source.tiles === undefined && otherSource.tiles === undefined) ||
59739
+ (source.tiles && otherSource.tiles && source.tiles.length === otherSource.tiles.length && source.tiles.every(function (value, idx) { return value === otherSource.tiles[idx]; })))
59740
+ && source.minzoom === otherSource.minzoom
59741
+ && source.maxzoom === otherSource.maxzoom
59742
+ && source.bounds === otherSource.bounds
59743
+ && source.attribution === otherSource.attribution;
59744
+ var rasterEqual = source.type !== "raster" || (source.type === "raster"
59745
+ && source.type === otherSource.type
59746
+ && source.tileSize === otherSource.tileSize
59747
+ && source.scheme === otherSource.scheme);
59748
+ var rasterDemEqual = source.type !== "raster-dem" || (source.type === "raster-dem"
59749
+ && source.type === otherSource.type
59750
+ && source.tileSize === otherSource.tileSize
59751
+ && source.encoding === otherSource.encoding);
59752
+ var vectorEqual = source.type !== "vector" || (source.type === "vector"
59753
+ && source.type === otherSource.type
59754
+ && source.promoteId === otherSource.promoteId
59755
+ && source.scheme === otherSource.scheme);
59756
+ return baseEqual && rasterEqual && rasterDemEqual && vectorEqual;
59757
+ };
59758
+ /**
59759
+ * Updates the source info to convert the tiles to url strings.
59760
+ * @param sourceDef The original source info.
59761
+ * @param options The query parameters to add to the tile urls.
59762
+ */
59763
+ FundamentalMapSource.prototype._modifySource = function (sourceDef, options) {
59764
+ if (sourceDef.tiles) {
59765
+ var tileStrings = sourceDef.tiles.map(function (tile) {
59766
+ if (typeof tile === "string") {
59767
+ return tile;
59768
+ }
59769
+ var tileUrl = new Url({
59770
+ domain: constants.domainPlaceHolder,
59771
+ path: tile.path,
59772
+ queryParams: __assign$3(__assign$3({}, options), tile.queryParams)
59773
+ });
59774
+ return tileUrl.toString();
59775
+ });
59776
+ sourceDef.tiles = tileStrings;
59777
+ }
59778
+ else if (sourceDef.url) {
59779
+ sourceDef.url = (typeof sourceDef.url === "string") ?
59780
+ sourceDef.url :
59781
+ new Url({
59782
+ domain: constants.domainPlaceHolder,
59783
+ path: sourceDef.url.path,
59784
+ queryParams: __assign$3(__assign$3({}, options), sourceDef.url.queryParams)
59785
+ }).toString();
59786
+ }
59787
+ else {
59788
+ throw new Error("Source definition must define a TileJSON 'url' or a 'tiles' array.");
59789
+ }
59790
+ return sourceDef;
59791
+ };
59792
+ return FundamentalMapSource;
59793
+ }(Source));
59794
+
59795
+ var __extends$O = (window && window.__extends) || (function () {
59392
59796
  var extendStatics = function (d, b) {
59393
59797
  extendStatics = Object.setPrototypeOf ||
59394
59798
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -59407,7 +59811,7 @@ uniform ${precision} ${type} u_${name};
59407
59811
  * Options used when rendering raster tiled images in a TileLayer.
59408
59812
  */
59409
59813
  var TileLayerOptions = /** @class */ (function (_super) {
59410
- __extends$J(TileLayerOptions, _super);
59814
+ __extends$O(TileLayerOptions, _super);
59411
59815
  function TileLayerOptions() {
59412
59816
  var _this = _super !== null && _super.apply(this, arguments) || this;
59413
59817
  /**
@@ -59463,7 +59867,7 @@ uniform ${precision} ${type} u_${name};
59463
59867
  return TileLayerOptions;
59464
59868
  }(MediaLayerOptions));
59465
59869
 
59466
- var __extends$K = (window && window.__extends) || (function () {
59870
+ var __extends$P = (window && window.__extends) || (function () {
59467
59871
  var extendStatics = function (d, b) {
59468
59872
  extendStatics = Object.setPrototypeOf ||
59469
59873
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -59478,8 +59882,8 @@ uniform ${precision} ${type} u_${name};
59478
59882
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
59479
59883
  };
59480
59884
  })();
59481
- var __assign$3 = (window && window.__assign) || function () {
59482
- __assign$3 = Object.assign || function(t) {
59885
+ var __assign$4 = (window && window.__assign) || function () {
59886
+ __assign$4 = Object.assign || function(t) {
59483
59887
  for (var s, i = 1, n = arguments.length; i < n; i++) {
59484
59888
  s = arguments[i];
59485
59889
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
@@ -59487,7 +59891,7 @@ uniform ${precision} ${type} u_${name};
59487
59891
  }
59488
59892
  return t;
59489
59893
  };
59490
- return __assign$3.apply(this, arguments);
59894
+ return __assign$4.apply(this, arguments);
59491
59895
  };
59492
59896
  var __values$8 = (window && window.__values) || function(o) {
59493
59897
  var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
@@ -59504,7 +59908,7 @@ uniform ${precision} ${type} u_${name};
59504
59908
  * Renders raster tiled images on top of the map tiles.
59505
59909
  */
59506
59910
  var TileLayer = /** @class */ (function (_super) {
59507
- __extends$K(TileLayer, _super);
59911
+ __extends$P(TileLayer, _super);
59508
59912
  /**
59509
59913
  * Constructs a new TileLayer.
59510
59914
  * @param options The options for the tile layer.
@@ -59566,7 +59970,7 @@ uniform ${precision} ${type} u_${name};
59566
59970
  * @internal
59567
59971
  */
59568
59972
  TileLayer.prototype._buildLayers = function () {
59569
- var layer = __assign$3(__assign$3({ id: this.id, type: "raster", source: this._getSourceId(), layout: {
59973
+ var layer = __assign$4(__assign$4({ id: this.id, type: "raster", source: this._getSourceId(), layout: {
59570
59974
  visibility: this.options.visible ? "visible" : "none"
59571
59975
  }, paint: {
59572
59976
  "raster-contrast": this.options.contrast,
@@ -59635,7 +60039,7 @@ uniform ${precision} ${type} u_${name};
59635
60039
  };
59636
60040
  }
59637
60041
  }
59638
- return __assign$3({ type: "raster", bounds: this.options.bounds, maxzoom: this.options.maxSourceZoom, minzoom: this.options.minSourceZoom, scheme: this.options.isTMS ? "tms" : "xyz", tileSize: this.options.tileSize }, (tiles && { tiles: tiles }));
60042
+ return __assign$4({ type: "raster", bounds: this.options.bounds, maxzoom: this.options.maxSourceZoom, minzoom: this.options.minSourceZoom, scheme: this.options.isTMS ? "tms" : "xyz", tileSize: this.options.tileSize }, (tiles && { tiles: tiles }));
59639
60043
  };
59640
60044
  /**
59641
60045
  * Gets the id of the source to be paired with this layer.
@@ -59644,10 +60048,20 @@ uniform ${precision} ${type} u_${name};
59644
60048
  TileLayer.prototype._getSourceId = function () {
59645
60049
  return this.getId() + "-RasterSource";
59646
60050
  };
60051
+ TileLayer.prototype._getSourceWrapper = function () {
60052
+ var sourceId = this._getSourceId();
60053
+ var source = this._buildSource();
60054
+ return new FundamentalMapSource(sourceId, {
60055
+ name: sourceId,
60056
+ tiles: source.tiles,
60057
+ type: source.type,
60058
+ url: source.url
60059
+ });
60060
+ };
59647
60061
  return TileLayer;
59648
60062
  }(SourceBuildingLayer));
59649
60063
 
59650
- var __extends$L = (window && window.__extends) || (function () {
60064
+ var __extends$Q = (window && window.__extends) || (function () {
59651
60065
  var extendStatics = function (d, b) {
59652
60066
  extendStatics = Object.setPrototypeOf ||
59653
60067
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -59666,7 +60080,7 @@ uniform ${precision} ${type} u_${name};
59666
60080
  * Options used to render graphics in a WebGLLayer.
59667
60081
  */
59668
60082
  var WebGLLayerOptions = /** @class */ (function (_super) {
59669
- __extends$L(WebGLLayerOptions, _super);
60083
+ __extends$Q(WebGLLayerOptions, _super);
59670
60084
  function WebGLLayerOptions() {
59671
60085
  var _this = _super !== null && _super.apply(this, arguments) || this;
59672
60086
  /**
@@ -59678,7 +60092,7 @@ uniform ${precision} ${type} u_${name};
59678
60092
  return WebGLLayerOptions;
59679
60093
  }(LayerOptions));
59680
60094
 
59681
- var __extends$M = (window && window.__extends) || (function () {
60095
+ var __extends$R = (window && window.__extends) || (function () {
59682
60096
  var extendStatics = function (d, b) {
59683
60097
  extendStatics = Object.setPrototypeOf ||
59684
60098
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -59697,7 +60111,7 @@ uniform ${precision} ${type} u_${name};
59697
60111
  * Enables custom rendering logic with access to the WebGL context of the map.
59698
60112
  */
59699
60113
  var WebGLLayer = /** @class */ (function (_super) {
59700
- __extends$M(WebGLLayer, _super);
60114
+ __extends$R(WebGLLayer, _super);
59701
60115
  /**
59702
60116
  * Constructs a new WebGLLayer.
59703
60117
  * @param id The id of the layer. If not specified a random one will be generated.
@@ -59927,7 +60341,7 @@ uniform ${precision} ${type} u_${name};
59927
60341
 
59928
60342
  var isElement_1 = isElement;
59929
60343
 
59930
- var __extends$N = (window && window.__extends) || (function () {
60344
+ var __extends$S = (window && window.__extends) || (function () {
59931
60345
  var extendStatics = function (d, b) {
59932
60346
  extendStatics = Object.setPrototypeOf ||
59933
60347
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -59946,7 +60360,7 @@ uniform ${precision} ${type} u_${name};
59946
60360
  * The options for a popup.
59947
60361
  */
59948
60362
  var PopupOptions = /** @class */ (function (_super) {
59949
- __extends$N(PopupOptions, _super);
60363
+ __extends$S(PopupOptions, _super);
59950
60364
  function PopupOptions() {
59951
60365
  var _this = _super !== null && _super.apply(this, arguments) || this;
59952
60366
  /**
@@ -60015,7 +60429,7 @@ uniform ${precision} ${type} u_${name};
60015
60429
  return PopupOptions;
60016
60430
  }(Options));
60017
60431
 
60018
- var __extends$O = (window && window.__extends) || (function () {
60432
+ var __extends$T = (window && window.__extends) || (function () {
60019
60433
  var extendStatics = function (d, b) {
60020
60434
  extendStatics = Object.setPrototypeOf ||
60021
60435
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -60050,7 +60464,7 @@ uniform ${precision} ${type} u_${name};
60050
60464
  * An information window anchored at a specified position on a map.
60051
60465
  */
60052
60466
  var Popup = /** @class */ (function (_super) {
60053
- __extends$O(Popup, _super);
60467
+ __extends$T(Popup, _super);
60054
60468
  /**
60055
60469
  * Constructs a Popup object and initializes it with the specified options.
60056
60470
  * @param options The options for the popup.
@@ -60521,7 +60935,7 @@ uniform ${precision} ${type} u_${name};
60521
60935
  return Popup;
60522
60936
  }(EventEmitter));
60523
60937
 
60524
- var __extends$P = (window && window.__extends) || (function () {
60938
+ var __extends$U = (window && window.__extends) || (function () {
60525
60939
  var extendStatics = function (d, b) {
60526
60940
  extendStatics = Object.setPrototypeOf ||
60527
60941
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -60540,7 +60954,7 @@ uniform ${precision} ${type} u_${name};
60540
60954
  * Options for rendering an HtmlMarker object
60541
60955
  */
60542
60956
  var HtmlMarkerOptions = /** @class */ (function (_super) {
60543
- __extends$P(HtmlMarkerOptions, _super);
60957
+ __extends$U(HtmlMarkerOptions, _super);
60544
60958
  function HtmlMarkerOptions() {
60545
60959
  var _this = _super !== null && _super.apply(this, arguments) || this;
60546
60960
  /**
@@ -60618,7 +61032,7 @@ uniform ${precision} ${type} u_${name};
60618
61032
  return HtmlMarkerOptions;
60619
61033
  }(Options));
60620
61034
 
60621
- var __extends$Q = (window && window.__extends) || (function () {
61035
+ var __extends$V = (window && window.__extends) || (function () {
60622
61036
  var extendStatics = function (d, b) {
60623
61037
  extendStatics = Object.setPrototypeOf ||
60624
61038
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -60637,7 +61051,7 @@ uniform ${precision} ${type} u_${name};
60637
61051
  * This class wraps an HTML element that can be displayed on the map.
60638
61052
  */
60639
61053
  var HtmlMarker = /** @class */ (function (_super) {
60640
- __extends$Q(HtmlMarker, _super);
61054
+ __extends$V(HtmlMarker, _super);
60641
61055
  /**
60642
61056
  * Constructs a new HtmlMarker.
60643
61057
  * @param options The options for the HtmlMarker.
@@ -60949,6 +61363,10 @@ uniform ${precision} ${type} u_${name};
60949
61363
  defaultRegion: {
60950
61364
  code: "NGT",
60951
61365
  strings: "en/resource.json"
61366
+ },
61367
+ latn: {
61368
+ code: "NGT-Latn",
61369
+ strings: "en/resource.json"
60952
61370
  }
60953
61371
  },
60954
61372
  ar: {
@@ -60995,6 +61413,18 @@ uniform ${precision} ${type} u_${name};
60995
61413
  us: {
60996
61414
  code: "en-US",
60997
61415
  strings: "en/resource.json"
61416
+ },
61417
+ au: {
61418
+ code: "en-AU",
61419
+ strings: "en/resource.json"
61420
+ },
61421
+ gb: {
61422
+ code: "en-GB",
61423
+ strings: "en/resource.json"
61424
+ },
61425
+ nz: {
61426
+ code: "en-NZ",
61427
+ strings: "en/resource.json"
60998
61428
  }
60999
61429
  },
61000
61430
  es: {
@@ -61120,14 +61550,31 @@ uniform ${precision} ${type} u_${name};
61120
61550
  }
61121
61551
  },
61122
61552
  zh: {
61553
+ // per https://microsoft.sharepoint.com/sites/globalreadiness/SitePages/Language-fallback.aspx
61554
+ // Chinese - Neutral (zh) fallbacks to en-US
61123
61555
  defaultRegion: {
61124
- code: "zh-Hant",
61125
- strings: "zh-tw/resource.json"
61556
+ code: "zh",
61557
+ strings: "en/resource.json"
61558
+ }
61559
+ },
61560
+ "zh-hans": {
61561
+ defaultRegion: {
61562
+ code: "zh-Hans",
61563
+ strings: "zh-cn/resource.json"
61564
+ },
61565
+ cn: {
61566
+ code: "zh-Hans-CN",
61567
+ strings: "zh-cn/resource.json"
61126
61568
  }
61127
61569
  },
61128
61570
  "zh-hant": {
61571
+ // per discussion with global readiness team, we were explicitly asked to not fallback zh-hant to zh-tw
61129
61572
  defaultRegion: {
61130
61573
  code: "zh-Hant",
61574
+ strings: "en/resource.json"
61575
+ },
61576
+ tw: {
61577
+ code: "zh-Hant-TW",
61131
61578
  strings: "zh-tw/resource.json"
61132
61579
  }
61133
61580
  }
@@ -61329,7 +61776,7 @@ uniform ${precision} ${type} u_${name};
61329
61776
  return UserAgent;
61330
61777
  }());
61331
61778
 
61332
- var __extends$R = (window && window.__extends) || (function () {
61779
+ var __extends$W = (window && window.__extends) || (function () {
61333
61780
  var extendStatics = function (d, b) {
61334
61781
  extendStatics = Object.setPrototypeOf ||
61335
61782
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -61374,7 +61821,7 @@ uniform ${precision} ${type} u_${name};
61374
61821
  /**
61375
61822
  * The AAD implicit grant mechanism. Recommended for pages protected by a sign-in.
61376
61823
  * By default the page will be redirected to the AAD login when the map control initializes.
61377
- * Specify a logged-in `AuthenticationContext` in the `AuthenticationOptions`
61824
+ * Specify a logged-in `PublicClientApplication` in the `AuthenticationOptions`
61378
61825
  * for greater control over when/how the users signs in.
61379
61826
  * Literal value `"aad"`
61380
61827
  */
@@ -61395,7 +61842,7 @@ uniform ${precision} ${type} u_${name};
61395
61842
  * Options for specifying how the map control should authenticate with the Azure Maps services.
61396
61843
  */
61397
61844
  var AuthenticationOptions = /** @class */ (function (_super) {
61398
- __extends$R(AuthenticationOptions, _super);
61845
+ __extends$W(AuthenticationOptions, _super);
61399
61846
  function AuthenticationOptions() {
61400
61847
  var _this = _super !== null && _super.apply(this, arguments) || this;
61401
61848
  /**
@@ -61439,7 +61886,7 @@ uniform ${precision} ${type} u_${name};
61439
61886
  */
61440
61887
  _this.sasToken = undefined;
61441
61888
  /**
61442
- * Optionally provide an existing `AuthenticationContext` from the ADAL.js library.
61889
+ * Optionally provide an existing `PublicClientApplication` from the MSAL.js library.
61443
61890
  * This authentication context will be used to acquire the AAD token.
61444
61891
  * Only used with the AAD authentication type.
61445
61892
  * This auth context must be configured to use the same AAD app ID as `this.aadAppId`.
@@ -61462,7 +61909,7 @@ uniform ${precision} ${type} u_${name};
61462
61909
  * @param aadAppId Azure AD App ID
61463
61910
  * @param aadTenant Azure AD Tenant Name
61464
61911
  * @param aadInstance An optional Azure AD Instance
61465
- * @param authContext An optional `AuthenticationContext` from the ADAL.js library
61912
+ * @param authContext An optional `PublicClientApplication` from the MSAL.js library
61466
61913
  */
61467
61914
  AuthenticationOptions.prototype.setAadProperties = function (clientId, aadAppId, aadTenant, aadInstance, authContext) {
61468
61915
  this.authType = exports.AuthenticationType.aad;
@@ -61756,7 +62203,7 @@ uniform ${precision} ${type} u_${name};
61756
62203
  /**
61757
62204
  * Specifies which set of geopolitically disputed borders and labels are displayed on the map. The View parameter (also referred to as “user region parameter”) is a 2-letter ISO-3166 Country Code that will show the correct maps for that country/region. Country/Regions that are not on the View list or if unspecified will default to the “Unified” View.
61758
62205
  * Please see the supported [Views]{@link https://aka.ms/AzureMapsLocalizationViews }.
61759
- * It is your responsibility to determine the location of your users, and then set the View parameter correctly for that location. The View parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping, of the country where maps, images and other data and third party content that You are authorized to access via Azure Maps is made available.
62206
+ * It is your responsibility to determine the location of your users, and then set the View parameter correctly for that location. The View parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping, of the country/region where maps, images and other data and third party content that You are authorized to access via Azure Maps is made available.
61760
62207
  * @param view The new default view
61761
62208
  */
61762
62209
  function setView(view) {
@@ -61996,7 +62443,7 @@ uniform ${precision} ${type} u_${name};
61996
62443
  return Media;
61997
62444
  }());
61998
62445
 
61999
- var __extends$S = (window && window.__extends) || (function () {
62446
+ var __extends$X = (window && window.__extends) || (function () {
62000
62447
  var extendStatics = function (d, b) {
62001
62448
  extendStatics = Object.setPrototypeOf ||
62002
62449
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -62015,7 +62462,7 @@ uniform ${precision} ${type} u_${name};
62015
62462
  * The options for a CopyrightControl object.
62016
62463
  */
62017
62464
  var CopyrightControlOptions = /** @class */ (function (_super) {
62018
- __extends$S(CopyrightControlOptions, _super);
62465
+ __extends$X(CopyrightControlOptions, _super);
62019
62466
  function CopyrightControlOptions() {
62020
62467
  var _this = _super !== null && _super.apply(this, arguments) || this;
62021
62468
  /**
@@ -62044,7 +62491,7 @@ uniform ${precision} ${type} u_${name};
62044
62491
  return CopyrightControlOptions;
62045
62492
  }(Options));
62046
62493
 
62047
- var __extends$T = (window && window.__extends) || (function () {
62494
+ var __extends$Y = (window && window.__extends) || (function () {
62048
62495
  var extendStatics = function (d, b) {
62049
62496
  extendStatics = Object.setPrototypeOf ||
62050
62497
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -62063,7 +62510,7 @@ uniform ${precision} ${type} u_${name};
62063
62510
  * @private
62064
62511
  */
62065
62512
  var CopyrightControl = /** @class */ (function (_super) {
62066
- __extends$T(CopyrightControl, _super);
62513
+ __extends$Y(CopyrightControl, _super);
62067
62514
  function CopyrightControl(options) {
62068
62515
  var _this = _super.call(this) || this;
62069
62516
  _this.textAttribution = function (options) {
@@ -62184,8 +62631,8 @@ uniform ${precision} ${type} u_${name};
62184
62631
  return CopyrightControl;
62185
62632
  }(ControlBase));
62186
62633
 
62187
- var __assign$4 = (window && window.__assign) || function () {
62188
- __assign$4 = Object.assign || function(t) {
62634
+ var __assign$5 = (window && window.__assign) || function () {
62635
+ __assign$5 = Object.assign || function(t) {
62189
62636
  for (var s, i = 1, n = arguments.length; i < n; i++) {
62190
62637
  s = arguments[i];
62191
62638
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
@@ -62193,7 +62640,7 @@ uniform ${precision} ${type} u_${name};
62193
62640
  }
62194
62641
  return t;
62195
62642
  };
62196
- return __assign$4.apply(this, arguments);
62643
+ return __assign$5.apply(this, arguments);
62197
62644
  };
62198
62645
 
62199
62646
  var __awaiter$1 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
@@ -62248,6 +62695,11 @@ uniform ${precision} ${type} u_${name};
62248
62695
  }
62249
62696
  return ar;
62250
62697
  };
62698
+ var __spreadArray$2 = (window && window.__spreadArray) || function (to, from) {
62699
+ for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
62700
+ to[j] = from[i];
62701
+ return to;
62702
+ };
62251
62703
 
62252
62704
  /**
62253
62705
  * @private
@@ -62411,7 +62863,7 @@ uniform ${precision} ${type} u_${name};
62411
62863
  return FlowServiceDelegate;
62412
62864
  }());
62413
62865
 
62414
- var __extends$U = (window && window.__extends) || (function () {
62866
+ var __extends$Z = (window && window.__extends) || (function () {
62415
62867
  var extendStatics = function (d, b) {
62416
62868
  extendStatics = Object.setPrototypeOf ||
62417
62869
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -62430,7 +62882,7 @@ uniform ${precision} ${type} u_${name};
62430
62882
  * The options for enabling/disabling user interaction with the map.
62431
62883
  */
62432
62884
  var UserInteractionOptions = /** @class */ (function (_super) {
62433
- __extends$U(UserInteractionOptions, _super);
62885
+ __extends$Z(UserInteractionOptions, _super);
62434
62886
  function UserInteractionOptions() {
62435
62887
  var _this = _super !== null && _super.apply(this, arguments) || this;
62436
62888
  /**
@@ -62821,8 +63273,8 @@ uniform ${precision} ${type} u_${name};
62821
63273
  return ControlManager;
62822
63274
  }());
62823
63275
 
62824
- var __assign$5 = (window && window.__assign) || function () {
62825
- __assign$5 = Object.assign || function(t) {
63276
+ var __assign$6 = (window && window.__assign) || function () {
63277
+ __assign$6 = Object.assign || function(t) {
62826
63278
  for (var s, i = 1, n = arguments.length; i < n; i++) {
62827
63279
  s = arguments[i];
62828
63280
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
@@ -62830,7 +63282,7 @@ uniform ${precision} ${type} u_${name};
62830
63282
  }
62831
63283
  return t;
62832
63284
  };
62833
- return __assign$5.apply(this, arguments);
63285
+ return __assign$6.apply(this, arguments);
62834
63286
  };
62835
63287
  /**
62836
63288
  * @private
@@ -62874,7 +63326,7 @@ uniform ${precision} ${type} u_${name};
62874
63326
  case "sourcedata":
62875
63327
  case "styledata":
62876
63328
  modifiedCallback = function (data) {
62877
- var mapEventData = __assign$5(__assign$5({ dataType: data.dataType }, (data.dataType === "source" && __assign$5(__assign$5(__assign$5({ isSourceLoaded: data.isSourceLoaded }, (data.sourceDataType && { sourceDataType: data.sourceDataType })), { source: _this.map.sources.getById(data.sourceId) }), (data.tile && {
63329
+ var mapEventData = __assign$6(__assign$6({ dataType: data.dataType }, (data.dataType === "source" && __assign$6(__assign$6(__assign$6({ isSourceLoaded: data.isSourceLoaded }, (data.sourceDataType && { sourceDataType: data.sourceDataType })), { source: _this.map.sources.getById(data.sourceId) }), (data.tile && {
62878
63330
  tile: {
62879
63331
  id: {
62880
63332
  x: data.tile.tileID.canonical.x,
@@ -63759,7 +64211,7 @@ uniform ${precision} ${type} u_${name};
63759
64211
  return ImageSpriteManager;
63760
64212
  }());
63761
64213
 
63762
- var __extends$V = (window && window.__extends) || (function () {
64214
+ var __extends$_ = (window && window.__extends) || (function () {
63763
64215
  var extendStatics = function (d, b) {
63764
64216
  extendStatics = Object.setPrototypeOf ||
63765
64217
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -63791,7 +64243,7 @@ uniform ${precision} ${type} u_${name};
63791
64243
  * @private
63792
64244
  */
63793
64245
  var FundamentalMapLayer = /** @class */ (function (_super) {
63794
- __extends$V(FundamentalMapLayer, _super);
64246
+ __extends$_(FundamentalMapLayer, _super);
63795
64247
  /**
63796
64248
  * Constructs a base layer used to represent the base, transit, and labels layers.
63797
64249
  * @param mbLayers The stylesheet used to define the style sources and style layers.
@@ -63880,7 +64332,7 @@ uniform ${precision} ${type} u_${name};
63880
64332
  }
63881
64333
  return ar;
63882
64334
  };
63883
- var __spreadArray$2 = (window && window.__spreadArray) || function (to, from) {
64335
+ var __spreadArray$3 = (window && window.__spreadArray) || function (to, from) {
63884
64336
  for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
63885
64337
  to[j] = from[i];
63886
64338
  return to;
@@ -64018,6 +64470,8 @@ uniform ${precision} ${type} u_${name};
64018
64470
  // If adding a SourceBuildingLayer the source associated must also be added.
64019
64471
  if (layer instanceof SourceBuildingLayer) {
64020
64472
  this.map._getMap().addSource(layer._getSourceId(), layer._buildSource());
64473
+ // we also need the abstraction for those source building layers added to the map if it is not already there
64474
+ this.map.sources.setSourceState(layer._getSourceWrapper());
64021
64475
  }
64022
64476
  var mbBefore = this._getMapboxBefore(before);
64023
64477
  try {
@@ -64316,7 +64770,7 @@ uniform ${precision} ${type} u_${name};
64316
64770
  // If a specified layer hasn't been added to the map throw an error.
64317
64771
  var index = this_1.layerIndex.findIndex(function (l) { return l.getId() === layerId; });
64318
64772
  if (index > -1) {
64319
- layerIds.push.apply(layerIds, __spreadArray$2([], __read$8(this_1.layerIndex[index]._getLayerIds()
64773
+ layerIds.push.apply(layerIds, __spreadArray$3([], __read$8(this_1.layerIndex[index]._getLayerIds()
64320
64774
  .filter(function (id) { return !!_this.map._getMap().getLayer(id); }))));
64321
64775
  }
64322
64776
  else {
@@ -64386,6 +64840,9 @@ uniform ${precision} ${type} u_${name};
64386
64840
  if (userLayerIndex != -1) {
64387
64841
  this.userLayers.splice(userLayerIndex, 1);
64388
64842
  }
64843
+ if (layer instanceof SourceBuildingLayer) {
64844
+ this.map.sources.unsetSourceState(layer._getSourceId());
64845
+ }
64389
64846
  tempLayer.onRemove();
64390
64847
  };
64391
64848
  return LayerManager;
@@ -64556,92 +65013,6 @@ uniform ${precision} ${type} u_${name};
64556
65013
  return PopupManager;
64557
65014
  }());
64558
65015
 
64559
- var __extends$W = (window && window.__extends) || (function () {
64560
- var extendStatics = function (d, b) {
64561
- extendStatics = Object.setPrototypeOf ||
64562
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
64563
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
64564
- return extendStatics(d, b);
64565
- };
64566
- return function (d, b) {
64567
- if (typeof b !== "function" && b !== null)
64568
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
64569
- extendStatics(d, b);
64570
- function __() { this.constructor = d; }
64571
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
64572
- };
64573
- })();
64574
- var __assign$6 = (window && window.__assign) || function () {
64575
- __assign$6 = Object.assign || function(t) {
64576
- for (var s, i = 1, n = arguments.length; i < n; i++) {
64577
- s = arguments[i];
64578
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
64579
- t[p] = s[p];
64580
- }
64581
- return t;
64582
- };
64583
- return __assign$6.apply(this, arguments);
64584
- };
64585
- /**
64586
- * Used to represent the fundamental map source.
64587
- * @private
64588
- */
64589
- var FundamentalMapSource = /** @class */ (function (_super) {
64590
- __extends$W(FundamentalMapSource, _super);
64591
- /**
64592
- * Constructs a source from the contents of a layer resource file.
64593
- * @param id The source's id.
64594
- * @param sourceDef The sources entry of the resource file.
64595
- * @param options The query parameters to add to the urls listed in the resource file.
64596
- */
64597
- function FundamentalMapSource(id, sourceDef, options) {
64598
- var _this = _super.call(this, id) || this;
64599
- _this.source = _this._modifySource(sourceDef, options);
64600
- return _this;
64601
- }
64602
- /**
64603
- * @internal
64604
- */
64605
- FundamentalMapSource.prototype._buildSource = function () {
64606
- return this.source;
64607
- };
64608
- /**
64609
- * Updates the source info to convert the tiles to url strings.
64610
- * @param sourceDef The original source info.
64611
- * @param options The query parameters to add to the tile urls.
64612
- */
64613
- FundamentalMapSource.prototype._modifySource = function (sourceDef, options) {
64614
- if (sourceDef.tiles) {
64615
- var tileStrings = sourceDef.tiles.map(function (tile) {
64616
- if (typeof tile === "string") {
64617
- return tile;
64618
- }
64619
- var tileUrl = new Url({
64620
- domain: constants.domainPlaceHolder,
64621
- path: tile.path,
64622
- queryParams: __assign$6(__assign$6({}, options), tile.queryParams)
64623
- });
64624
- return tileUrl.toString();
64625
- });
64626
- sourceDef.tiles = tileStrings;
64627
- }
64628
- else if (sourceDef.url) {
64629
- sourceDef.url = (typeof sourceDef.url === "string") ?
64630
- sourceDef.url :
64631
- new Url({
64632
- domain: constants.domainPlaceHolder,
64633
- path: sourceDef.url.path,
64634
- queryParams: __assign$6(__assign$6({}, options), sourceDef.url.queryParams)
64635
- }).toString();
64636
- }
64637
- else {
64638
- throw new Error("Source definition must define a TileJSON 'url' or a 'tiles' array.");
64639
- }
64640
- return sourceDef;
64641
- };
64642
- return FundamentalMapSource;
64643
- }(Source));
64644
-
64645
65016
  var __values$f = (window && window.__values) || function(o) {
64646
65017
  var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
64647
65018
  if (m) return m.call(o);
@@ -64814,6 +65185,23 @@ uniform ${precision} ${type} u_${name};
64814
65185
  this._removeSource(source, update);
64815
65186
  }
64816
65187
  };
65188
+ /**
65189
+ * @internal
65190
+ */
65191
+ SourceManager.prototype.setSourceState = function (newSource, shouldInvokeAddEvent) {
65192
+ if (shouldInvokeAddEvent === void 0) { shouldInvokeAddEvent = true; }
65193
+ this.sources.set(newSource.getId(), newSource);
65194
+ newSource._setMap(this.map, shouldInvokeAddEvent);
65195
+ };
65196
+ /**
65197
+ * @internal
65198
+ */
65199
+ SourceManager.prototype.unsetSourceState = function (id) {
65200
+ if (this.sources.has(id)) {
65201
+ this.sources.get(id)._setMap(null);
65202
+ this.sources.delete(id);
65203
+ }
65204
+ };
64817
65205
  SourceManager.prototype._removeSource = function (source, update) {
64818
65206
  var id = source instanceof Source ? source.getId() : source;
64819
65207
  if (this.sources.has(id)) {
@@ -64821,8 +65209,7 @@ uniform ${precision} ${type} u_${name};
64821
65209
  this.map._getMap().removeSource(id);
64822
65210
  }
64823
65211
  if (!this.map._getMap().getSource(id) || !update) {
64824
- this.sources.get(id)._setMap(null);
64825
- this.sources.delete(id);
65212
+ this.unsetSourceState(id);
64826
65213
  }
64827
65214
  else {
64828
65215
  throw new Error("One or more layers have a dependency on the source '" + id + "'");
@@ -64839,8 +65226,7 @@ uniform ${precision} ${type} u_${name};
64839
65226
  throw new Error("'" + source.getId() + "' is already added to the map");
64840
65227
  }
64841
65228
  else {
64842
- this.sources.get(source.getId())._setMap(null);
64843
- this.sources.delete(source.getId());
65229
+ this.unsetSourceState(source.getId());
64844
65230
  }
64845
65231
  }
64846
65232
  if (update) {
@@ -64852,8 +65238,7 @@ uniform ${precision} ${type} u_${name};
64852
65238
  }
64853
65239
  this.map._getMap().addSource(source.getId(), source._buildSource());
64854
65240
  }
64855
- this.sources.set(source.getId(), source);
64856
- source._setMap(this.map);
65241
+ this.setSourceState(source);
64857
65242
  };
64858
65243
  /**
64859
65244
  * Converts an array of features as returned by one of Mapbox's query*Features(...) function
@@ -64895,51 +65280,90 @@ uniform ${precision} ${type} u_${name};
64895
65280
  };
64896
65281
  /**
64897
65282
  * Sync SourceManager with mapbox sources.
65283
+ * This function is responsible for creating wrappers for mapbox sources
65284
+ * and setting the approperiate sourceManager state with them
64898
65285
  * @internal
64899
65286
  */
64900
65287
  SourceManager.prototype._syncSources = function (sources) {
64901
65288
  var _this = this;
64902
- if (sources) {
64903
- Object.keys(sources).forEach(function (sourceId) {
64904
- if (!_this.sources.has(sourceId)) {
64905
- var sourceToAdd = sources[sourceId];
64906
- if (sourceToAdd.type === "vector") {
64907
- var newSource = new FundamentalMapSource(sourceId, {
64908
- name: sourceId,
64909
- tiles: sourceToAdd.tiles,
64910
- type: "vector",
64911
- url: sourceToAdd.url
64912
- });
64913
- _this.sources.set(sourceId, newSource);
64914
- newSource._setMap(_this.map);
64915
- }
64916
- else if (sourceToAdd.type === "raster") {
64917
- var newSource = new FundamentalMapSource(sourceId, {
64918
- name: sourceId,
64919
- tiles: sourceToAdd.tiles,
64920
- type: "raster",
64921
- url: sourceToAdd.url
64922
- });
64923
- _this.sources.set(sourceId, newSource);
64924
- newSource._setMap(_this.map);
64925
- }
64926
- else {
64927
- throw new Error("Unable to construct source with ID " + sourceId + ".");
65289
+ if (!sources) {
65290
+ console.warn('syncSources called with no style sources which is unexpected.');
65291
+ return;
65292
+ }
65293
+ // 1. add / update the source wrappers
65294
+ Object.keys(sources)
65295
+ .map(function (sourceId) {
65296
+ var sourceToAdd = sources[sourceId];
65297
+ var newSource;
65298
+ switch (sourceToAdd.type) {
65299
+ case 'vector':
65300
+ case 'raster':
65301
+ case 'raster-dem': {
65302
+ newSource = new FundamentalMapSource(sourceId, {
65303
+ name: sourceId,
65304
+ tiles: sourceToAdd.tiles,
65305
+ type: sourceToAdd.type,
65306
+ url: sourceToAdd.url,
65307
+ tileSize: 'tileSize' in sourceToAdd ? sourceToAdd.tileSize : undefined
65308
+ });
65309
+ break;
65310
+ }
65311
+ case 'canvas': {
65312
+ newSource = new CanvasSource(sourceId, sourceToAdd);
65313
+ break;
65314
+ }
65315
+ case 'geojson': {
65316
+ var dataSource = new DataSource(sourceId, {
65317
+ maxZoom: sourceToAdd.maxzoom,
65318
+ cluster: sourceToAdd.cluster,
65319
+ clusterRadius: sourceToAdd.clusterRadius,
65320
+ tolerance: sourceToAdd.tolerance,
65321
+ lineMetrics: sourceToAdd.lineMetrics,
65322
+ clusterProperties: sourceToAdd.clusterProperties,
65323
+ buffer: sourceToAdd.buffer,
65324
+ clusterMinPoints: sourceToAdd.clusterMinPoints,
65325
+ generateId: sourceToAdd.generateId,
65326
+ promoteId: sourceToAdd.promoteId,
65327
+ filter: sourceToAdd.filter,
65328
+ // attribution?: sourceToAdd.attribution
65329
+ });
65330
+ if (typeof sourceToAdd.data !== 'string' && sourceToAdd.data !== undefined) {
65331
+ dataSource._addNoUpdate(sourceToAdd.data);
64928
65332
  }
65333
+ newSource = dataSource;
65334
+ break;
64929
65335
  }
64930
- });
64931
- Object.keys(this.sources).forEach(function (sourceId) {
64932
- if (!sources.hasOwnProperty(sourceId)) {
64933
- _this.sources.get(sourceId)._setMap(null);
64934
- _this.sources.delete(sourceId);
65336
+ case 'image': {
65337
+ newSource = new ImageSource(sourceId, sourceToAdd);
65338
+ break;
64935
65339
  }
64936
- });
64937
- }
65340
+ case 'video': {
65341
+ newSource = new VideoSource(sourceId, sourceToAdd);
65342
+ break;
65343
+ }
65344
+ default: {
65345
+ newSource = new UnknownSource(sourceId, sourceToAdd);
65346
+ }
65347
+ }
65348
+ return newSource;
65349
+ }).forEach(function (newSource) {
65350
+ // use deep equality of underlying maplibre sources to determine if the source has been updated or overriden on style update
65351
+ var existing = _this.sources.get(newSource.getId());
65352
+ var isUpdate = existing && newSource._isDeepEqual(existing);
65353
+ if (!isUpdate && existing) {
65354
+ _this.unsetSourceState(existing.getId());
65355
+ }
65356
+ _this.setSourceState(newSource, !isUpdate);
65357
+ });
65358
+ // 2. remove the source wrappers that are not in the style
65359
+ Array.from(this.sources.keys())
65360
+ .filter(function (sourceId) { return !(sourceId in sources); })
65361
+ .forEach(function (sourceId) { return _this.unsetSourceState(sourceId); });
64938
65362
  };
64939
65363
  return SourceManager;
64940
65364
  }());
64941
65365
 
64942
- var __extends$X = (window && window.__extends) || (function () {
65366
+ var __extends$$ = (window && window.__extends) || (function () {
64943
65367
  var extendStatics = function (d, b) {
64944
65368
  extendStatics = Object.setPrototypeOf ||
64945
65369
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -64958,7 +65382,7 @@ uniform ${precision} ${type} u_${name};
64958
65382
  * The options for animating changes to the map control's camera.
64959
65383
  */
64960
65384
  var AnimationOptions = /** @class */ (function (_super) {
64961
- __extends$X(AnimationOptions, _super);
65385
+ __extends$$(AnimationOptions, _super);
64962
65386
  function AnimationOptions() {
64963
65387
  var _this = _super !== null && _super.apply(this, arguments) || this;
64964
65388
  /**
@@ -64982,7 +65406,7 @@ uniform ${precision} ${type} u_${name};
64982
65406
  return AnimationOptions;
64983
65407
  }(Options));
64984
65408
 
64985
- var __extends$Y = (window && window.__extends) || (function () {
65409
+ var __extends$10 = (window && window.__extends) || (function () {
64986
65410
  var extendStatics = function (d, b) {
64987
65411
  extendStatics = Object.setPrototypeOf ||
64988
65412
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -65001,7 +65425,7 @@ uniform ${precision} ${type} u_${name};
65001
65425
  * Represent the amount of padding in pixels to add to the side of a BoundingBox when setting the camera of a map.
65002
65426
  */
65003
65427
  var Padding = /** @class */ (function (_super) {
65004
- __extends$Y(Padding, _super);
65428
+ __extends$10(Padding, _super);
65005
65429
  function Padding() {
65006
65430
  var _this = _super !== null && _super.apply(this, arguments) || this;
65007
65431
  /**
@@ -65033,7 +65457,7 @@ uniform ${precision} ${type} u_${name};
65033
65457
  return Padding;
65034
65458
  }(Options));
65035
65459
 
65036
- var __extends$Z = (window && window.__extends) || (function () {
65460
+ var __extends$11 = (window && window.__extends) || (function () {
65037
65461
  var extendStatics = function (d, b) {
65038
65462
  extendStatics = Object.setPrototypeOf ||
65039
65463
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -65075,7 +65499,7 @@ uniform ${precision} ${type} u_${name};
65075
65499
  }
65076
65500
  return ar;
65077
65501
  };
65078
- var __spreadArray$3 = (window && window.__spreadArray) || function (to, from) {
65502
+ var __spreadArray$4 = (window && window.__spreadArray) || function (to, from) {
65079
65503
  for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
65080
65504
  to[j] = from[i];
65081
65505
  return to;
@@ -65084,7 +65508,7 @@ uniform ${precision} ${type} u_${name};
65084
65508
  * The options for setting the bounds of the map control's camera.
65085
65509
  */
65086
65510
  var CameraBoundsOptions = /** @class */ (function (_super) {
65087
- __extends$Z(CameraBoundsOptions, _super);
65511
+ __extends$11(CameraBoundsOptions, _super);
65088
65512
  function CameraBoundsOptions() {
65089
65513
  var _this = _super !== null && _super.apply(this, arguments) || this;
65090
65514
  /**
@@ -65150,12 +65574,12 @@ uniform ${precision} ${type} u_${name};
65150
65574
  }
65151
65575
  finally { if (e_1) throw e_1.error; }
65152
65576
  }
65153
- return _super.prototype.merge.apply(this, __spreadArray$3([], __read$9(valuesList)));
65577
+ return _super.prototype.merge.apply(this, __spreadArray$4([], __read$9(valuesList)));
65154
65578
  };
65155
65579
  return CameraBoundsOptions;
65156
65580
  }(Options));
65157
65581
 
65158
- var __extends$_ = (window && window.__extends) || (function () {
65582
+ var __extends$12 = (window && window.__extends) || (function () {
65159
65583
  var extendStatics = function (d, b) {
65160
65584
  extendStatics = Object.setPrototypeOf ||
65161
65585
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -65174,7 +65598,7 @@ uniform ${precision} ${type} u_${name};
65174
65598
  * The options for setting the map control's camera.
65175
65599
  */
65176
65600
  var CameraOptions = /** @class */ (function (_super) {
65177
- __extends$_(CameraOptions, _super);
65601
+ __extends$12(CameraOptions, _super);
65178
65602
  function CameraOptions() {
65179
65603
  var _this = _super !== null && _super.apply(this, arguments) || this;
65180
65604
  /**
@@ -65233,7 +65657,7 @@ uniform ${precision} ${type} u_${name};
65233
65657
  return CameraOptions;
65234
65658
  }(Options));
65235
65659
 
65236
- var __extends$$ = (window && window.__extends) || (function () {
65660
+ var __extends$13 = (window && window.__extends) || (function () {
65237
65661
  var extendStatics = function (d, b) {
65238
65662
  extendStatics = Object.setPrototypeOf ||
65239
65663
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -65252,7 +65676,7 @@ uniform ${precision} ${type} u_${name};
65252
65676
  * The options for a layer of the map.
65253
65677
  */
65254
65678
  var LayerOptions$1 = /** @class */ (function (_super) {
65255
- __extends$$(LayerOptions, _super);
65679
+ __extends$13(LayerOptions, _super);
65256
65680
  function LayerOptions() {
65257
65681
  var _this = _super !== null && _super.apply(this, arguments) || this;
65258
65682
  /**
@@ -65285,7 +65709,7 @@ uniform ${precision} ${type} u_${name};
65285
65709
  return LayerOptions;
65286
65710
  }(Options));
65287
65711
 
65288
- var __extends$10 = (window && window.__extends) || (function () {
65712
+ var __extends$14 = (window && window.__extends) || (function () {
65289
65713
  var extendStatics = function (d, b) {
65290
65714
  extendStatics = Object.setPrototypeOf ||
65291
65715
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -65305,7 +65729,7 @@ uniform ${precision} ${type} u_${name};
65305
65729
  * @deprecated Use BubbleLayerOptions with atlas.layer.BubbleLayer instead.
65306
65730
  */
65307
65731
  var CircleLayerOptions = /** @class */ (function (_super) {
65308
- __extends$10(CircleLayerOptions, _super);
65732
+ __extends$14(CircleLayerOptions, _super);
65309
65733
  function CircleLayerOptions() {
65310
65734
  var _this = _super !== null && _super.apply(this, arguments) || this;
65311
65735
  /**
@@ -65337,7 +65761,7 @@ uniform ${precision} ${type} u_${name};
65337
65761
  return CircleLayerOptions;
65338
65762
  }(LayerOptions$1));
65339
65763
 
65340
- var __extends$11 = (window && window.__extends) || (function () {
65764
+ var __extends$15 = (window && window.__extends) || (function () {
65341
65765
  var extendStatics = function (d, b) {
65342
65766
  extendStatics = Object.setPrototypeOf ||
65343
65767
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -65357,7 +65781,7 @@ uniform ${precision} ${type} u_${name};
65357
65781
  * @deprecated Use LineLayerOptions with atlas.layer.LineLayer instead.
65358
65782
  */
65359
65783
  var LinestringLayerOptions = /** @class */ (function (_super) {
65360
- __extends$11(LinestringLayerOptions, _super);
65784
+ __extends$15(LinestringLayerOptions, _super);
65361
65785
  function LinestringLayerOptions() {
65362
65786
  var _this = _super !== null && _super.apply(this, arguments) || this;
65363
65787
  /**
@@ -65393,7 +65817,7 @@ uniform ${precision} ${type} u_${name};
65393
65817
  return LinestringLayerOptions;
65394
65818
  }(LayerOptions$1));
65395
65819
 
65396
- var __extends$12 = (window && window.__extends) || (function () {
65820
+ var __extends$16 = (window && window.__extends) || (function () {
65397
65821
  var extendStatics = function (d, b) {
65398
65822
  extendStatics = Object.setPrototypeOf ||
65399
65823
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -65413,7 +65837,7 @@ uniform ${precision} ${type} u_${name};
65413
65837
  * @deprecated Use SymbolLayerOptions with atlas.layer.SymbolLayer instead.
65414
65838
  */
65415
65839
  var PinLayerOptions = /** @class */ (function (_super) {
65416
- __extends$12(PinLayerOptions, _super);
65840
+ __extends$16(PinLayerOptions, _super);
65417
65841
  function PinLayerOptions() {
65418
65842
  var _this = _super !== null && _super.apply(this, arguments) || this;
65419
65843
  /**
@@ -65463,7 +65887,7 @@ uniform ${precision} ${type} u_${name};
65463
65887
  return PinLayerOptions;
65464
65888
  }(LayerOptions$1));
65465
65889
 
65466
- var __extends$13 = (window && window.__extends) || (function () {
65890
+ var __extends$17 = (window && window.__extends) || (function () {
65467
65891
  var extendStatics = function (d, b) {
65468
65892
  extendStatics = Object.setPrototypeOf ||
65469
65893
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -65483,7 +65907,7 @@ uniform ${precision} ${type} u_${name};
65483
65907
  * @deprecated Use new PolygonLayerOptions with atlas.layer.PolygonLayer instead.
65484
65908
  */
65485
65909
  var PolygonLayerOptions$1 = /** @class */ (function (_super) {
65486
- __extends$13(PolygonLayerOptions, _super);
65910
+ __extends$17(PolygonLayerOptions, _super);
65487
65911
  function PolygonLayerOptions() {
65488
65912
  var _this = _super !== null && _super.apply(this, arguments) || this;
65489
65913
  /**
@@ -65506,7 +65930,7 @@ uniform ${precision} ${type} u_${name};
65506
65930
  return PolygonLayerOptions;
65507
65931
  }(LayerOptions$1));
65508
65932
 
65509
- var __extends$14 = (window && window.__extends) || (function () {
65933
+ var __extends$18 = (window && window.__extends) || (function () {
65510
65934
  var extendStatics = function (d, b) {
65511
65935
  extendStatics = Object.setPrototypeOf ||
65512
65936
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -65526,7 +65950,7 @@ uniform ${precision} ${type} u_${name};
65526
65950
  * @deprecated Use TileLayerOptions with atlas.layer.TileLayer instead.
65527
65951
  */
65528
65952
  var RasterLayerOptions = /** @class */ (function (_super) {
65529
- __extends$14(RasterLayerOptions, _super);
65953
+ __extends$18(RasterLayerOptions, _super);
65530
65954
  function RasterLayerOptions() {
65531
65955
  var _this = _super !== null && _super.apply(this, arguments) || this;
65532
65956
  /**
@@ -65538,7 +65962,7 @@ uniform ${precision} ${type} u_${name};
65538
65962
  return RasterLayerOptions;
65539
65963
  }(LayerOptions$1));
65540
65964
 
65541
- var __extends$15 = (window && window.__extends) || (function () {
65965
+ var __extends$19 = (window && window.__extends) || (function () {
65542
65966
  var extendStatics = function (d, b) {
65543
65967
  extendStatics = Object.setPrototypeOf ||
65544
65968
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -65557,7 +65981,7 @@ uniform ${precision} ${type} u_${name};
65557
65981
  * The options for the map's lighting.
65558
65982
  */
65559
65983
  var LightOptions = /** @class */ (function (_super) {
65560
- __extends$15(LightOptions, _super);
65984
+ __extends$19(LightOptions, _super);
65561
65985
  function LightOptions() {
65562
65986
  var _this = _super !== null && _super.apply(this, arguments) || this;
65563
65987
  /**
@@ -65597,7 +66021,7 @@ uniform ${precision} ${type} u_${name};
65597
66021
  return LightOptions;
65598
66022
  }(Options));
65599
66023
 
65600
- var __extends$16 = (window && window.__extends) || (function () {
66024
+ var __extends$1a = (window && window.__extends) || (function () {
65601
66025
  var extendStatics = function (d, b) {
65602
66026
  extendStatics = Object.setPrototypeOf ||
65603
66027
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -65639,7 +66063,7 @@ uniform ${precision} ${type} u_${name};
65639
66063
  }
65640
66064
  return ar;
65641
66065
  };
65642
- var __spreadArray$4 = (window && window.__spreadArray) || function (to, from) {
66066
+ var __spreadArray$5 = (window && window.__spreadArray) || function (to, from) {
65643
66067
  for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
65644
66068
  to[j] = from[i];
65645
66069
  return to;
@@ -65648,7 +66072,7 @@ uniform ${precision} ${type} u_${name};
65648
66072
  * The options for the map's style.
65649
66073
  */
65650
66074
  var StyleOptions = /** @class */ (function (_super) {
65651
- __extends$16(StyleOptions, _super);
66075
+ __extends$1a(StyleOptions, _super);
65652
66076
  function StyleOptions() {
65653
66077
  var _this = _super !== null && _super.apply(this, arguments) || this;
65654
66078
  /**
@@ -65705,6 +66129,7 @@ uniform ${precision} ${type} u_${name};
65705
66129
  * If false all buildings will be rendered as just their footprints.
65706
66130
  * Default `false`
65707
66131
  * @default false
66132
+ * @deprecated
65708
66133
  */
65709
66134
  _this.showBuildingModels = false;
65710
66135
  /**
@@ -65750,7 +66175,7 @@ uniform ${precision} ${type} u_${name};
65750
66175
  /**
65751
66176
  * Specifies which set of geopolitically disputed borders and labels are displayed on the map. The View parameter (also referred to as “user region parameter”) is a 2-letter ISO-3166 Country Code that will show the correct maps for that country/region. Country/Regions that are not on the View list or if unspecified will default to the “Unified” View.
65752
66177
  * Please see the supported [Views]{@link https://aka.ms/AzureMapsLocalizationViews}
65753
- * It is your responsibility to determine the location of your users, and then set the View parameter correctly for that location. The View parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping, of the country where maps, images and other data and third party content that You are authorized to access via Azure Maps is made available.
66178
+ * It is your responsibility to determine the location of your users, and then set the View parameter correctly for that location. The View parameter in Azure Maps must be used in compliance with applicable laws, including those regarding mapping, of the country/region where maps, images and other data and third party content that You are authorized to access via Azure Maps is made available.
65754
66179
  * default: `undefined`
65755
66180
  * @default undefined
65756
66181
  */
@@ -65798,12 +66223,12 @@ uniform ${precision} ${type} u_${name};
65798
66223
  finally { if (e_1) throw e_1.error; }
65799
66224
  }
65800
66225
  // Then execute the standard merge behavior.
65801
- return _super.prototype.merge.apply(this, __spreadArray$4([], __read$a(valueList)));
66226
+ return _super.prototype.merge.apply(this, __spreadArray$5([], __read$a(valueList)));
65802
66227
  };
65803
66228
  return StyleOptions;
65804
66229
  }(Options));
65805
66230
 
65806
- var __extends$17 = (window && window.__extends) || (function () {
66231
+ var __extends$1b = (window && window.__extends) || (function () {
65807
66232
  var extendStatics = function (d, b) {
65808
66233
  extendStatics = Object.setPrototypeOf ||
65809
66234
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -65856,7 +66281,7 @@ uniform ${precision} ${type} u_${name};
65856
66281
  }
65857
66282
  return ar;
65858
66283
  };
65859
- var __spreadArray$5 = (window && window.__spreadArray) || function (to, from) {
66284
+ var __spreadArray$6 = (window && window.__spreadArray) || function (to, from) {
65860
66285
  for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
65861
66286
  to[j] = from[i];
65862
66287
  return to;
@@ -65873,7 +66298,7 @@ uniform ${precision} ${type} u_${name};
65873
66298
  * Global properties used in all atlas service requests.
65874
66299
  */
65875
66300
  var ServiceOptions = /** @class */ (function (_super) {
65876
- __extends$17(ServiceOptions, _super);
66301
+ __extends$1b(ServiceOptions, _super);
65877
66302
  function ServiceOptions() {
65878
66303
  var _this = _super !== null && _super.apply(this, arguments) || this;
65879
66304
  /**
@@ -66091,10 +66516,10 @@ uniform ${precision} ${type} u_${name};
66091
66516
  // won't change default behavior in Options as usually that's what desired
66092
66517
  // instead capture it here and reassign.
66093
66518
  var currentTransforms = this._transformers;
66094
- var transformersToMerge = valueList ? valueList.filter(function (value) { return value !== undefined; }).reduce(function (flattened, value) { return __spreadArray$5(__spreadArray$5([], __read$b(flattened)), __read$b(value._transformers || [])); }, []) : [];
66519
+ var transformersToMerge = valueList ? valueList.filter(function (value) { return value !== undefined; }).reduce(function (flattened, value) { return __spreadArray$6(__spreadArray$6([], __read$b(flattened)), __read$b(value._transformers || [])); }, []) : [];
66095
66520
  // Then execute the standard merge behavior.
66096
66521
  // If subscription key auth method isn't being used then the subscription key property should be undefined.
66097
- var merged = _super.prototype.merge.apply(this, __spreadArray$5([], __read$b(valueList)));
66522
+ var merged = _super.prototype.merge.apply(this, __spreadArray$6([], __read$b(valueList)));
66098
66523
  if (merged.authOptions.authType !== exports.AuthenticationType.subscriptionKey) {
66099
66524
  merged["subscription-key"] = merged.subscriptionKey = undefined;
66100
66525
  }
@@ -66106,7 +66531,7 @@ uniform ${precision} ${type} u_${name};
66106
66531
  if (merged.mapConfiguration && typeof merged.mapConfiguration !== 'string') {
66107
66532
  merged.mapConfiguration = __assign$7(__assign$7({}, merged.mapConfiguration), { defaultConfiguration: merged.mapConfiguration.defaultConfiguration || merged.mapConfiguration['defaultStyle'], configurations: merged.mapConfiguration.configurations || merged.mapConfiguration['styles'] });
66108
66533
  }
66109
- this._transformers = __spreadArray$5(__spreadArray$5([], __read$b(currentTransforms || [])), __read$b(transformersToMerge.filter(function (toMerge) { return !currentTransforms.includes(toMerge); })));
66534
+ this._transformers = __spreadArray$6(__spreadArray$6([], __read$b(currentTransforms || [])), __read$b(transformersToMerge.filter(function (toMerge) { return !currentTransforms.includes(toMerge); })));
66110
66535
  if (this.transformRequest && !this._transformers.includes(this.transformRequest)) {
66111
66536
  this._transformers.push(this.transformRequest);
66112
66537
  }
@@ -66355,7 +66780,7 @@ uniform ${precision} ${type} u_${name};
66355
66780
  }
66356
66781
  return ar;
66357
66782
  };
66358
- var __spreadArray$6 = (window && window.__spreadArray) || function (to, from) {
66783
+ var __spreadArray$7 = (window && window.__spreadArray) || function (to, from) {
66359
66784
  for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
66360
66785
  to[j] = from[i];
66361
66786
  return to;
@@ -66382,6 +66807,13 @@ uniform ${precision} ${type} u_${name};
66382
66807
  * Preserve the map configuration that was used before the indoor map configuration was set
66383
66808
  */
66384
66809
  this.preservedPreindoorMapConfiguration = undefined;
66810
+ /**
66811
+ * The state of the progressive loading
66812
+ */
66813
+ this._progressiveLoadingState = {
66814
+ mapStyle: undefined,
66815
+ pendingVisibilityChange: undefined,
66816
+ };
66385
66817
  this._deferLayerGroupVisibilities = function (layerGroupLayers, initLayerGroups) {
66386
66818
  var validInitLayerGroups = initLayerGroups.filter(function (groupName) { return groupName in layerGroupLayers; });
66387
66819
  // If the initial layer groups are invalid, skip the progressive loading.
@@ -66389,11 +66821,19 @@ uniform ${precision} ${type} u_${name};
66389
66821
  return;
66390
66822
  var map = _this.map._getMap();
66391
66823
  var currentZoomLevel = map.getZoom();
66392
- // Select the layers to be deferred
66824
+ var currentMapStyle = _this.map.getStyle().style;
66825
+ // Cancel and release previous pending callback, if any.
66826
+ if (_this._progressiveLoadingState.pendingVisibilityChange) {
66827
+ _this.map.events.remove('load', _this._progressiveLoadingState.pendingVisibilityChange);
66828
+ _this._progressiveLoadingState.pendingVisibilityChange = null;
66829
+ }
66830
+ // Keep the current map style for future comparison.
66831
+ _this._progressiveLoadingState.mapStyle = currentMapStyle;
66832
+ // Select deferrable layers
66393
66833
  var deferredLayers = Object.entries(layerGroupLayers).reduce(function (deferred, _a) {
66394
66834
  var _b = __read$c(_a, 2), groupName = _b[0], layers = _b[1];
66395
66835
  var isInInitialLayerGroup = validInitLayerGroups.includes(groupName);
66396
- return __spreadArray$6(__spreadArray$6([], __read$c(deferred)), __read$c(layers.filter(function (layer) {
66836
+ return __spreadArray$7(__spreadArray$7([], __read$c(deferred)), __read$c(layers.filter(function (layer) {
66397
66837
  var _a;
66398
66838
  // Exclude custom layers
66399
66839
  if (layer.type === 'custom')
@@ -66416,22 +66856,34 @@ uniform ${precision} ${type} u_${name};
66416
66856
  return false;
66417
66857
  }
66418
66858
  }
66419
- // Defer visible layers only.
66859
+ // Select visible layers only.
66420
66860
  return ((_a = layer.layout) === null || _a === void 0 ? void 0 : _a.visibility) !== 'none';
66421
66861
  })));
66422
66862
  }, []);
66423
- // Hide the deferred layers at initial load, therefore we can save the render time.
66863
+ // Hide the deferrable layers at initial load, therefore we can save the render time.
66424
66864
  deferredLayers.forEach(function (layer) {
66865
+ // Since this happens before sending style object into the map rendering,
66866
+ // we only need to update the style object, but not necessary to update maplibre's layout properties.
66425
66867
  layer.layout = layer.layout || {};
66426
66868
  layer.layout.visibility = 'none';
66427
66869
  });
66428
- // Make the deferred layers visible once the map instance is fully loaded
66429
- _this.map.events.addOnce('load', function () {
66870
+ // Make the deferred layers visible once the map instance is fully loaded.
66871
+ _this._progressiveLoadingState.pendingVisibilityChange = function () {
66872
+ // Release the callback.
66873
+ _this._progressiveLoadingState.pendingVisibilityChange = null;
66874
+ // Bail out the callback once map style has changed.
66875
+ var nextMapStyle = _this.map.getStyle().style;
66876
+ if (currentMapStyle !== nextMapStyle)
66877
+ return;
66878
+ // Make deferred layers visible
66430
66879
  deferredLayers.forEach(function (layer) {
66880
+ // This happens after the map rendering; Therefore, we need to update
66881
+ // both the style object and the maplibre's layout properties.
66431
66882
  layer.layout.visibility = 'visible';
66432
66883
  map.setLayoutProperty(layer.id, 'visibility', 'visible');
66433
66884
  });
66434
- });
66885
+ };
66886
+ _this.map.events.addOnce('load', _this._progressiveLoadingState.pendingVisibilityChange);
66435
66887
  };
66436
66888
  this._onStyleData = function () {
66437
66889
  _this._lookUpAsync(_this.map.getStyle()).then(function (style) {
@@ -66573,7 +67025,12 @@ uniform ${precision} ${type} u_${name};
66573
67025
  domain: _this.serviceOptions.staticAssetsDomain,
66574
67026
  path: constants.stylePath + "/" + constants.styleResourcePath + "/" + style.name,
66575
67027
  queryParams: {
66576
- styleVersion: _this.serviceOptions.styleDefinitionsVersion,
67028
+ // Use the style version from the API response if it's available,
67029
+ // otherwise fallback to the version specified in the serviceOptions.
67030
+ // This is needed for flight testing the 2023-01-01 style version.
67031
+ styleVersion: definitions.version !== undefined && definitions.version !== null
67032
+ ? definitions.version
67033
+ : _this.serviceOptions.styleDefinitionsVersion
66577
67034
  // thus far we don't need to differentiate based on parameter here, as stylePatch will be called on cached styles as well
66578
67035
  //language: styleOptions.language
66579
67036
  },
@@ -66623,19 +67080,7 @@ uniform ${precision} ${type} u_${name};
66623
67080
  // should be modified before they are applied to the map.
66624
67081
  var styleOptions = this.map.getStyle();
66625
67082
  var trafficOptions = this.map.getTraffic();
66626
- return __assign$8(__assign$8({}, nextStyle), {
66627
- // force a replacement of language placeholder in the tileset url to avoid resolution to a same cache with placeholders on language change
66628
- sources: Object.entries(nextStyle.sources).reduce(function (newSources, _a) {
66629
- var _b = __read$c(_a, 2), sourceKey = _b[0], source = _b[1];
66630
- var newSource = __assign$8({}, source);
66631
- if ('url' in newSource && typeof newSource.url === 'string') {
66632
- if (newSource.url.includes(constants.languagePlaceHolder)) {
66633
- newSource.url = newSource.url.replace(constants.languagePlaceHolder, styleOptions.language);
66634
- }
66635
- }
66636
- newSources[sourceKey] = newSource;
66637
- return newSources;
66638
- }, {}), layers: nextStyle.layers.map(function (layer) {
67083
+ return __assign$8(__assign$8({}, nextStyle), { layers: nextStyle.layers.map(function (layer) {
66639
67084
  var _a, _b, _c, _d, _e, _f;
66640
67085
  var nextLayer = __assign$8({}, layer);
66641
67086
  var layerGroup = LayerGroupComparator.getLayerGroup(nextLayer);
@@ -66721,7 +67166,22 @@ uniform ${precision} ${type} u_${name};
66721
67166
  this.map._getMap().setStyle(this.getStyle(styleOptions), {
66722
67167
  diff: diff,
66723
67168
  validate: this.serviceOptions.validateStyle,
66724
- transformStyle: function (previousStyle, nextStyle) {
67169
+ transformStyle: function (previousStyle, style) {
67170
+ var nextStyle = style;
67171
+ var shouldProgressiveLoading = (styleOptions.progressiveLoading &&
67172
+ // The feature only effective at the initial load.
67173
+ !_this.map._isLoaded());
67174
+ // Shallow-clone the style object and duplicate layer.layout properties to avoid side-effects.
67175
+ if (shouldProgressiveLoading && Array.isArray(style === null || style === void 0 ? void 0 : style.layers)) {
67176
+ nextStyle = __assign$8({}, style);
67177
+ nextStyle.layers = nextStyle.layers.map(function (layer) {
67178
+ var nextLayer = __assign$8({}, layer);
67179
+ if (layer.layout) {
67180
+ nextLayer.layout = __assign$8({}, layer.layout);
67181
+ }
67182
+ return nextLayer;
67183
+ });
67184
+ }
66725
67185
  // 1. derive the base new style (without user layers)
66726
67186
  var targetStyle = _this.deriveNewStyle(previousStyle, nextStyle);
66727
67187
  // 2. derive layer groups for the new style
@@ -66734,12 +67194,9 @@ uniform ${precision} ${type} u_${name};
66734
67194
  .reduce(function (layerGroupLayers, _a) {
66735
67195
  var _b;
66736
67196
  var nextLayer = _a.nextLayer, layerGroup = _a.layerGroup;
66737
- return (__assign$8(__assign$8({}, layerGroupLayers), (_b = {}, _b[layerGroup] = layerGroup in layerGroupLayers ? __spreadArray$6(__spreadArray$6([], __read$c(layerGroupLayers[layerGroup])), [nextLayer]) : [nextLayer], _b)));
67197
+ return (__assign$8(__assign$8({}, layerGroupLayers), (_b = {}, _b[layerGroup] = layerGroup in layerGroupLayers ? __spreadArray$7(__spreadArray$7([], __read$c(layerGroupLayers[layerGroup])), [nextLayer]) : [nextLayer], _b)));
66738
67198
  }, {});
66739
67199
  // 3. side effect: progressively render map layers to the canvas to shorten the time to the first meaningful render.
66740
- var shouldProgressiveLoading = (styleOptions.progressiveLoading &&
66741
- // The feature only effective at the initial load.
66742
- !_this.map._isLoaded());
66743
67200
  if (shouldProgressiveLoading) {
66744
67201
  var initLayerGroups = styleOptions.progressiveLoadingInitialLayerGroups;
66745
67202
  if (Array.isArray(initLayerGroups) && initLayerGroups.length > 0) {
@@ -66884,27 +67341,30 @@ uniform ${precision} ${type} u_${name};
66884
67341
  * Fetches a json resource at the specified domain and path.
66885
67342
  */
66886
67343
  StyleManager.prototype._request = function (domain, path, resourceType, customQueryParams) {
66887
- var _a;
67344
+ var _a, _b;
66888
67345
  if (customQueryParams === void 0) { customQueryParams = {}; }
66889
67346
  return __awaiter$2(this, void 0, void 0, function () {
66890
67347
  var requestParams, fetchOptions;
66891
- var _b;
66892
- return __generator$2(this, function (_c) {
66893
- switch (_c.label) {
67348
+ var _c;
67349
+ return __generator$2(this, function (_d) {
67350
+ switch (_d.label) {
66894
67351
  case 0:
66895
67352
  requestParams = {
66896
67353
  url: new Url({
66897
67354
  protocol: "https",
66898
67355
  domain: domain,
66899
67356
  path: path,
66900
- queryParams: __assign$8((_b = {}, _b[constants.apiVersionQueryParameter] = this.serviceOptions.styleAPIVersion, _b), customQueryParams)
67357
+ queryParams: __assign$8((_c = {}, _c[constants.apiVersionQueryParameter] = this.serviceOptions.styleAPIVersion,
67358
+ // Generate a hash code to avoid cache conflict
67359
+ // TODO: Remove this once style version 2023-01-01 is publicly available
67360
+ _c.hash = StyleManager._hashCode((_a = this.map.authentication) === null || _a === void 0 ? void 0 : _a.getToken()), _c), customQueryParams)
66901
67361
  }).toString()
66902
67362
  };
66903
67363
  if (typeof this.serviceOptions.transformRequest === "function" && resourceType) {
66904
67364
  // If a transformRequest(...) was specified use it.
66905
67365
  requestParams = this.serviceOptions.transformRequest(requestParams.url, resourceType);
66906
67366
  }
66907
- (_a = this.map.authentication) === null || _a === void 0 ? void 0 : _a.signRequest(requestParams);
67367
+ (_b = this.map.authentication) === null || _b === void 0 ? void 0 : _b.signRequest(requestParams);
66908
67368
  fetchOptions = {
66909
67369
  method: "GET",
66910
67370
  mode: "cors",
@@ -66921,11 +67381,26 @@ uniform ${precision} ${type} u_${name};
66921
67381
  throw new Error("HTTP " + response.status + ": " + response.statusText + " ");
66922
67382
  }
66923
67383
  })];
66924
- case 1: return [2 /*return*/, _c.sent()];
67384
+ case 1: return [2 /*return*/, _d.sent()];
66925
67385
  }
66926
67386
  });
66927
67387
  });
66928
67388
  };
67389
+ /**
67390
+ * A basic helper function to generate a hash from an input string.
67391
+ */
67392
+ StyleManager._hashCode = function (str) {
67393
+ if (str === void 0) { str = ""; }
67394
+ var chr, hash = 0;
67395
+ if (!str)
67396
+ return hash;
67397
+ for (var i = 0; i < str.length; i++) {
67398
+ chr = str.charCodeAt(i);
67399
+ hash = (hash << 5) - hash + chr;
67400
+ hash |= 0; // Convert to 32bit integer
67401
+ }
67402
+ return hash;
67403
+ };
66929
67404
  return StyleManager;
66930
67405
  }());
66931
67406
 
@@ -66934,7 +67409,7 @@ uniform ${precision} ${type} u_${name};
66934
67409
  */
66935
67410
  var isHMREnabled = function () { return 'ENVIRONMENT' in window && !!window['ENVIRONMENT']['hmr']; };
66936
67411
 
66937
- var __extends$18 = (window && window.__extends) || (function () {
67412
+ var __extends$1c = (window && window.__extends) || (function () {
66938
67413
  var extendStatics = function (d, b) {
66939
67414
  extendStatics = Object.setPrototypeOf ||
66940
67415
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -67012,7 +67487,7 @@ uniform ${precision} ${type} u_${name};
67012
67487
  }
67013
67488
  return ar;
67014
67489
  };
67015
- var __spreadArray$7 = (window && window.__spreadArray) || function (to, from) {
67490
+ var __spreadArray$8 = (window && window.__spreadArray) || function (to, from) {
67016
67491
  for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
67017
67492
  to[j] = from[i];
67018
67493
  return to;
@@ -67032,7 +67507,7 @@ uniform ${precision} ${type} u_${name};
67032
67507
  * The control for a visual and interactive web map.
67033
67508
  */
67034
67509
  var Map$2 = /** @class */ (function (_super) {
67035
- __extends$18(Map, _super);
67510
+ __extends$1c(Map, _super);
67036
67511
  /**
67037
67512
  * Displays a map in the specified container.
67038
67513
  * @param container The id of the element where the map should be displayed.
@@ -67196,7 +67671,9 @@ uniform ${precision} ${type} u_${name};
67196
67671
  _this.events.invoke("error", errorData);
67197
67672
  });
67198
67673
  // --> Set initial camera state of map
67199
- _this.setCamera(__assign$9(__assign$9({}, options), { type: "jump", duration: 0 }));
67674
+ _this.setCamera(__assign$9(__assign$9({
67675
+ // Default minZoom to ensure the map doesn't zoom out to unsupported zoom levels.
67676
+ minZoom: 1 }, options), { type: "jump", duration: 0 }));
67200
67677
  _this.flowDelegate = new FlowServiceDelegate(_this);
67201
67678
  _this.accessibleMapDelegate = new AccessibleMapDelegate(_this);
67202
67679
  _this.userInteractionDelegate = new UserInteractionDelegate(_this, options);
@@ -67301,6 +67778,12 @@ uniform ${precision} ${type} u_${name};
67301
67778
  };
67302
67779
  throw new Error(JSON.stringify(errorDetails));
67303
67780
  }
67781
+ if ('pitch' in options) {
67782
+ mapboxCameraOptions.pitch = options.pitch;
67783
+ }
67784
+ if ('bearing' in options) {
67785
+ mapboxCameraOptions.bearing = options.bearing;
67786
+ }
67304
67787
  this.map.setMaxZoom(cameraBoundsOptions.maxZoom);
67305
67788
  this._invokeEvent("maxzoomchanged", this.map.getMaxZoom());
67306
67789
  maxBounds = this._generateSafeBounds(cameraBoundsOptions.maxBounds);
@@ -67419,12 +67902,16 @@ uniform ${precision} ${type} u_${name};
67419
67902
  if (newOptions.showTileBoundaries !== this.styleOptions.showTileBoundaries) {
67420
67903
  this.map.showTileBoundaries = newOptions.showTileBoundaries;
67421
67904
  }
67905
+ if (newOptions.showBuildingModels) {
67906
+ console.warn("showBuildingModels is deprecated.");
67907
+ }
67422
67908
  // Some delegates may rely on a styledata event to know when to check if the language changes.
67423
67909
  // If this function is restructured such that a styledata event won't always trigger
67424
67910
  // if the language is changed, then either those delegates need changed
67425
67911
  // or the styledata event manually invoked.
67912
+ var noDiffOnLanguageViewChange = diff && (this.styleOptions.language === newOptions.language && this.styleOptions.view === newOptions.view);
67426
67913
  this.styleOptions = newOptions;
67427
- this._setStyleComponents(newOptions, diff);
67914
+ this._setStyleComponents(newOptions, noDiffOnLanguageViewChange);
67428
67915
  };
67429
67916
  /**
67430
67917
  * Returns the map control's current style settings.
@@ -67815,7 +68302,7 @@ uniform ${precision} ${type} u_${name};
67815
68302
  urls = layer.getOptions().subdomains || [];
67816
68303
  }
67817
68304
  // Add the tile urls to the layer, but don't update the map yet.
67818
- urls.push.apply(urls, __spreadArray$7([], __read$d(tileSources)));
68305
+ urls.push.apply(urls, __spreadArray$8([], __read$d(tileSources)));
67819
68306
  layer._setOptionsNoUpdate({
67820
68307
  subdomains: urls
67821
68308
  });
@@ -67942,6 +68429,9 @@ uniform ${precision} ${type} u_${name};
67942
68429
  }
67943
68430
  }
67944
68431
  if (this.trafficOptions.flow && this.trafficOptions.flow !== "none") {
68432
+ if (["absolute", "relative-delay"].includes(this.trafficOptions.flow)) {
68433
+ console.warn("The 'absolute' and 'relative-delay' flow options are deprecated. Please use 'relative' instead.");
68434
+ }
67945
68435
  try {
67946
68436
  if (this.trafficOptions.flow !== previousFlowOption) {
67947
68437
  this.flowDelegate.addToMap();
@@ -67984,9 +68474,13 @@ uniform ${precision} ${type} u_${name};
67984
68474
  * Clean up the map's resources. Map will not function correctly after calling this method.
67985
68475
  */
67986
68476
  Map.prototype.dispose = function () {
68477
+ var _a;
67987
68478
  this.clear();
67988
68479
  this.map.remove();
68480
+ (_a = this.authentication) === null || _a === void 0 ? void 0 : _a.dispose();
67989
68481
  this.removed = true;
68482
+ // Remove event listeners
68483
+ window.removeEventListener("resize", this._windowResizeCallback);
67990
68484
  while (this.getMapContainer().firstChild) {
67991
68485
  var currChild = this.getMapContainer().firstChild;
67992
68486
  this.getMapContainer().removeChild(currChild);
@@ -68331,7 +68825,7 @@ uniform ${precision} ${type} u_${name};
68331
68825
  }
68332
68826
  return ar;
68333
68827
  };
68334
- var __spreadArray$8 = (window && window.__spreadArray) || function (to, from) {
68828
+ var __spreadArray$9 = (window && window.__spreadArray) || function (to, from) {
68335
68829
  for (var i = 0, il = from.length, j = to.length; i < il; i++, j++)
68336
68830
  to[j] = from[i];
68337
68831
  return to;
@@ -68477,7 +68971,7 @@ uniform ${precision} ${type} u_${name};
68477
68971
  lineLength = 50;
68478
68972
  }
68479
68973
  var lines = c.split(/<(tr|div|br|li|h[0-9]|p>)/);
68480
- longestStringLength = Math.max.apply(Math, __spreadArray$8([], __read$e((lines.map(function (el) { return el.replace(/<[a-zA-Z0-9\s=\/]+>/g, "").length; }))))) - 1;
68974
+ longestStringLength = Math.max.apply(Math, __spreadArray$9([], __read$e((lines.map(function (el) { return el.replace(/<[a-zA-Z0-9\s=\/]+>/g, "").length; }))))) - 1;
68481
68975
  var w = Math.ceil(longestStringLength * 3.5);
68482
68976
  if (w < width) {
68483
68977
  width = w;