azure-maps-control 2.3.1 → 3.0.0-preview.10

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.
@@ -56,9 +56,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
56
56
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('azuremaps-maplibre-gl')) :
57
57
  typeof define === 'function' && define.amd ? define(['exports', 'azuremaps-maplibre-gl'], factory) :
58
58
  (global = global || self, factory(global.atlas = global.atlas || {}, global.maplibregl));
59
- }(this, (function (exports, mapboxgl) { 'use strict';
59
+ }(this, (function (exports, maplibregl) { 'use strict';
60
60
 
61
- var mapboxgl__default = 'default' in mapboxgl ? mapboxgl['default'] : mapboxgl;
61
+ maplibregl = maplibregl && Object.prototype.hasOwnProperty.call(maplibregl, 'default') ? maplibregl['default'] : maplibregl;
62
62
 
63
63
  var env = {
64
64
  domain: "atlas.microsoft.com",
@@ -87,7 +87,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
87
87
  msClientIdHeaderName: "x-ms-client-id",
88
88
  msOriginHeaderName: "Ms-Am-Request-Origin",
89
89
  msOriginHeaderValue: "MapControl",
90
- resourceId: "https://atlas.microsoft.com/",
90
+ aadResourceId: "https://atlas.microsoft.com/.default",
91
91
  sessionIdHeaderName: "Session-Id"
92
92
  };
93
93
 
@@ -265,7 +265,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
265
265
  return Url;
266
266
  }());
267
267
 
268
- var version = "2.3.1";
268
+ var version = "3.0.0-preview.10";
269
269
 
270
270
  /**
271
271
  * A helper class that provides methods for getting various forms of the map controls current version.
@@ -2857,11 +2857,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
2857
2857
  * _.keysIn(new Foo);
2858
2858
  * // => ['a', 'b', 'c'] (iteration order is not guaranteed)
2859
2859
  */
2860
- function keysIn$1(object) {
2860
+ function keysIn(object) {
2861
2861
  return isArrayLike_1(object) ? _arrayLikeKeys(object, true) : _baseKeysIn(object);
2862
2862
  }
2863
2863
 
2864
- var keysIn_1 = keysIn$1;
2864
+ var keysIn_1 = keysIn;
2865
2865
 
2866
2866
  /**
2867
2867
  * The base implementation of `_.assignIn` without support for multiple sources
@@ -3640,7 +3640,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
3640
3640
 
3641
3641
  var keysFunc = isFull
3642
3642
  ? (isFlat ? _getAllKeysIn : _getAllKeys)
3643
- : (isFlat ? keysIn : keys_1);
3643
+ : (isFlat ? keysIn_1 : keys_1);
3644
3644
 
3645
3645
  var props = isArr ? undefined : keysFunc(value);
3646
3646
  _arrayEach(props || value, function(subValue, key) {
@@ -4806,8 +4806,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
4806
4806
  * The type of traffic flow to display:
4807
4807
  * <p>"none" is to display no traffic flow data</p>
4808
4808
  * <p>"relative" is the speed of the road relative to free-flow</p>
4809
- * <p>"absolute" is the absolute speed of the road</p>
4810
- * <p>"relative-delay" displays relative speed only where they differ from free-flow;
4809
+ * <p>@deprecated "absolute" is the absolute speed of the road</p>
4810
+ * <p>@deprecated "relative-delay" displays relative speed only where they differ from free-flow;
4811
4811
  * false to stop displaying the traffic flow.</p>
4812
4812
  * default `"none"``
4813
4813
  * @default "none"
@@ -5276,10 +5276,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
5276
5276
  if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
5277
5277
  return false;
5278
5278
  }
5279
- // Assume cyclic values are equal.
5280
- var stacked = stack.get(array);
5281
- if (stacked && stack.get(other)) {
5282
- return stacked == other;
5279
+ // Check that cyclic values are equal.
5280
+ var arrStacked = stack.get(array);
5281
+ var othStacked = stack.get(other);
5282
+ if (arrStacked && othStacked) {
5283
+ return arrStacked == other && othStacked == array;
5283
5284
  }
5284
5285
  var index = -1,
5285
5286
  result = true,
@@ -5514,10 +5515,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
5514
5515
  return false;
5515
5516
  }
5516
5517
  }
5517
- // Assume cyclic values are equal.
5518
- var stacked = stack.get(object);
5519
- if (stacked && stack.get(other)) {
5520
- return stacked == other;
5518
+ // Check that cyclic values are equal.
5519
+ var objStacked = stack.get(object);
5520
+ var othStacked = stack.get(other);
5521
+ if (objStacked && othStacked) {
5522
+ return objStacked == other && othStacked == object;
5521
5523
  }
5522
5524
  var result = true;
5523
5525
  stack.set(object, other);
@@ -10271,6 +10273,23 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
10271
10273
  * @default 0.375
10272
10274
  */
10273
10275
  _this.tolerance = 0.375;
10276
+ /**
10277
+ * Minimum number of points necessary to form a cluster if clustering is enabled.
10278
+ * @default 2
10279
+ */
10280
+ _this.clusterMinPoints = 2;
10281
+ /**
10282
+ * 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.
10283
+ */
10284
+ _this.generateId = false;
10285
+ /**
10286
+ * A property to use as a feature id (for feature state). Either a property name, or an object of the form {<sourceLayer>: <propertyName>}.
10287
+ */
10288
+ _this.promoteId = undefined;
10289
+ /**
10290
+ * An expression for filtering features prior to processing them for rendering.
10291
+ */
10292
+ _this.filter = undefined;
10274
10293
  return _this;
10275
10294
  }
10276
10295
  return DataSourceOptions;
@@ -10643,7 +10662,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
10643
10662
  tolerance: this.options.tolerance,
10644
10663
  lineMetrics: this.options.lineMetrics,
10645
10664
  clusterProperties: this.options.clusterProperties,
10646
- buffer: this.options.buffer
10665
+ buffer: this.options.buffer,
10666
+ clusterMinPoints: this.options.clusterMinPoints,
10667
+ generateId: this.options.generateId,
10668
+ promoteId: this.options.promoteId,
10669
+ filter: this.options.filter
10647
10670
  };
10648
10671
  if (typeof this.options.clusterMaxZoom === "number") {
10649
10672
  geoJsonSource.clusterMaxZoom = this.options.clusterMaxZoom;
@@ -10937,18 +10960,18 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
10937
10960
  type: "vector",
10938
10961
  };
10939
10962
  if (this.options.bounds) {
10940
- vectorSource["bounds"] = this.options.bounds;
10963
+ vectorSource.bounds = this.options.bounds;
10941
10964
  }
10942
10965
  if (this.options.tiles) {
10943
- vectorSource["tiles"] = this.options.tiles;
10944
- vectorSource["minzoom"] = this.options.minZoom;
10945
- vectorSource["maxzoom"] = this.options.maxZoom;
10966
+ vectorSource.tiles = this.options.tiles;
10967
+ vectorSource.minzoom = this.options.minZoom;
10968
+ vectorSource.maxzoom = this.options.maxZoom;
10946
10969
  }
10947
10970
  else if (this.options.url) {
10948
- vectorSource["url"] = this.options.url;
10971
+ vectorSource.url = this.options.url;
10949
10972
  }
10950
10973
  if (this.options.isTMS) {
10951
- vectorSource["scheme"] = "tms";
10974
+ vectorSource.scheme = "tms";
10952
10975
  }
10953
10976
  return vectorSource;
10954
10977
  };
@@ -10975,16 +10998,364 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
10975
10998
  return VectorTileSource;
10976
10999
  }(Source));
10977
11000
 
11001
+ var __extends$p = (window && window.__extends) || (function () {
11002
+ var extendStatics = function (d, b) {
11003
+ extendStatics = Object.setPrototypeOf ||
11004
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
11005
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
11006
+ return extendStatics(d, b);
11007
+ };
11008
+ return function (d, b) {
11009
+ if (typeof b !== "function" && b !== null)
11010
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11011
+ extendStatics(d, b);
11012
+ function __() { this.constructor = d; }
11013
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
11014
+ };
11015
+ })();
11016
+ /**
11017
+ * Used to represent the canvas source wrapper.
11018
+ * This is not meant to be exposed publicly yet
11019
+ * @private
11020
+ */
11021
+ var CanvasSource = /** @class */ (function (_super) {
11022
+ __extends$p(CanvasSource, _super);
11023
+ /**
11024
+ * Constructs a source from the contents of a layer resource file.
11025
+ * @param id The source's id.
11026
+ * @param sourceDef Canvas source specification.
11027
+ * @param options Unused for now
11028
+ */
11029
+ function CanvasSource(id, sourceDef, options) {
11030
+ var _this = _super.call(this, id) || this;
11031
+ _this.source = sourceDef;
11032
+ return _this;
11033
+ }
11034
+ /**
11035
+ * @internal
11036
+ */
11037
+ CanvasSource.prototype._isDeepEqual = function (other) {
11038
+ if (this.constructor !== other.constructor) {
11039
+ return false;
11040
+ }
11041
+ var source = this.source;
11042
+ var otherSource = other.source;
11043
+ return source.type === otherSource.type
11044
+ && source.canvas === otherSource.canvas
11045
+ && JSON.stringify(source.coordinates) === JSON.stringify(otherSource.coordinates)
11046
+ && source.animate === otherSource.animate;
11047
+ };
11048
+ /**
11049
+ * @internal
11050
+ */
11051
+ CanvasSource.prototype._buildSource = function () {
11052
+ return this.source;
11053
+ };
11054
+ return CanvasSource;
11055
+ }(Source));
11056
+
11057
+ var __extends$q = (window && window.__extends) || (function () {
11058
+ var extendStatics = function (d, b) {
11059
+ extendStatics = Object.setPrototypeOf ||
11060
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
11061
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
11062
+ return extendStatics(d, b);
11063
+ };
11064
+ return function (d, b) {
11065
+ if (typeof b !== "function" && b !== null)
11066
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11067
+ extendStatics(d, b);
11068
+ function __() { this.constructor = d; }
11069
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
11070
+ };
11071
+ })();
11072
+ /**
11073
+ * Used to represent an unkown source wrapper.
11074
+ * This is not meant to be exposed publicly yet
11075
+ * @private
11076
+ */
11077
+ var UnknownSource = /** @class */ (function (_super) {
11078
+ __extends$q(UnknownSource, _super);
11079
+ /**
11080
+ * Constructs a source from the contents of a layer resource file.
11081
+ * @param id The source's id.
11082
+ * @param sourceDef source specification.
11083
+ * @param options Unused for now
11084
+ */
11085
+ function UnknownSource(id, sourceDef, options) {
11086
+ var _this = _super.call(this, id) || this;
11087
+ _this.source = sourceDef;
11088
+ return _this;
11089
+ }
11090
+ /**
11091
+ * @internal
11092
+ */
11093
+ UnknownSource.prototype._isDeepEqual = function (other) {
11094
+ if (this.constructor !== other.constructor) {
11095
+ return false;
11096
+ }
11097
+ var source = this.source;
11098
+ var otherSource = other.source;
11099
+ return source.type === otherSource.type;
11100
+ };
11101
+ /**
11102
+ * @internal
11103
+ */
11104
+ UnknownSource.prototype._buildSource = function () {
11105
+ return this.source;
11106
+ };
11107
+ return UnknownSource;
11108
+ }(Source));
11109
+
11110
+ var __extends$r = (window && window.__extends) || (function () {
11111
+ var extendStatics = function (d, b) {
11112
+ extendStatics = Object.setPrototypeOf ||
11113
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
11114
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
11115
+ return extendStatics(d, b);
11116
+ };
11117
+ return function (d, b) {
11118
+ if (typeof b !== "function" && b !== null)
11119
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11120
+ extendStatics(d, b);
11121
+ function __() { this.constructor = d; }
11122
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
11123
+ };
11124
+ })();
11125
+ /**
11126
+ * Used to represent the image source wrapper.
11127
+ * This is not meant to be exposed publicly yet
11128
+ * @private
11129
+ */
11130
+ var ImageSource = /** @class */ (function (_super) {
11131
+ __extends$r(ImageSource, _super);
11132
+ /**
11133
+ * Constructs a source from the contents of a layer resource file.
11134
+ * @param id The source's id.
11135
+ * @param sourceDef Image source specification.
11136
+ * @param options Unused for now
11137
+ */
11138
+ function ImageSource(id, sourceDef, options) {
11139
+ var _this = _super.call(this, id) || this;
11140
+ _this.source = sourceDef;
11141
+ return _this;
11142
+ }
11143
+ /**
11144
+ * @internal
11145
+ */
11146
+ ImageSource.prototype._isDeepEqual = function (other) {
11147
+ if (this.constructor !== other.constructor) {
11148
+ return false;
11149
+ }
11150
+ var source = this.source;
11151
+ var otherSource = other.source;
11152
+ return source.type === otherSource.type
11153
+ && JSON.stringify(source.coordinates) === JSON.stringify(otherSource.coordinates)
11154
+ && source.url === otherSource.url;
11155
+ };
11156
+ /**
11157
+ * @internal
11158
+ */
11159
+ ImageSource.prototype._buildSource = function () {
11160
+ return this.source;
11161
+ };
11162
+ return ImageSource;
11163
+ }(Source));
11164
+
11165
+ var __extends$s = (window && window.__extends) || (function () {
11166
+ var extendStatics = function (d, b) {
11167
+ extendStatics = Object.setPrototypeOf ||
11168
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
11169
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
11170
+ return extendStatics(d, b);
11171
+ };
11172
+ return function (d, b) {
11173
+ if (typeof b !== "function" && b !== null)
11174
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11175
+ extendStatics(d, b);
11176
+ function __() { this.constructor = d; }
11177
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
11178
+ };
11179
+ })();
11180
+ /**
11181
+ * Used to represent the video source wrapper.
11182
+ * This is not meant to be exposed publicly yet
11183
+ * @private
11184
+ */
11185
+ var VideoSource = /** @class */ (function (_super) {
11186
+ __extends$s(VideoSource, _super);
11187
+ /**
11188
+ * Constructs a source from the contents of a layer resource file.
11189
+ * @param id The source's id.
11190
+ * @param sourceDef Video source specification.
11191
+ * @param options Unused for now
11192
+ */
11193
+ function VideoSource(id, sourceDef, options) {
11194
+ var _this = _super.call(this, id) || this;
11195
+ _this.source = sourceDef;
11196
+ return _this;
11197
+ }
11198
+ /**
11199
+ * @internal
11200
+ */
11201
+ VideoSource.prototype._isDeepEqual = function (other) {
11202
+ if (this.constructor !== other.constructor) {
11203
+ return false;
11204
+ }
11205
+ var source = this.source;
11206
+ var otherSource = other.source;
11207
+ return source.type === otherSource.type
11208
+ && JSON.stringify(source.coordinates) === JSON.stringify(otherSource.coordinates)
11209
+ && source.urls === otherSource.urls;
11210
+ };
11211
+ /**
11212
+ * @internal
11213
+ */
11214
+ VideoSource.prototype._buildSource = function () {
11215
+ return this.source;
11216
+ };
11217
+ return VideoSource;
11218
+ }(Source));
11219
+
11220
+ var __extends$t = (window && window.__extends) || (function () {
11221
+ var extendStatics = function (d, b) {
11222
+ extendStatics = Object.setPrototypeOf ||
11223
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
11224
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
11225
+ return extendStatics(d, b);
11226
+ };
11227
+ return function (d, b) {
11228
+ if (typeof b !== "function" && b !== null)
11229
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11230
+ extendStatics(d, b);
11231
+ function __() { this.constructor = d; }
11232
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
11233
+ };
11234
+ })();
11235
+ var RasterTileSourceOptions = /** @class */ (function (_super) {
11236
+ __extends$t(RasterTileSourceOptions, _super);
11237
+ function RasterTileSourceOptions() {
11238
+ var _this = _super !== null && _super.apply(this, arguments) || this;
11239
+ /**
11240
+ * raster tile pixel size.
11241
+ * default `512`
11242
+ * @default 512
11243
+ */
11244
+ _this.tileSize = 512;
11245
+ return _this;
11246
+ }
11247
+ return RasterTileSourceOptions;
11248
+ }(VectorTileSourceOptions));
11249
+
11250
+ var __extends$u = (window && window.__extends) || (function () {
11251
+ var extendStatics = function (d, b) {
11252
+ extendStatics = Object.setPrototypeOf ||
11253
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
11254
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
11255
+ return extendStatics(d, b);
11256
+ };
11257
+ return function (d, b) {
11258
+ if (typeof b !== "function" && b !== null)
11259
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11260
+ extendStatics(d, b);
11261
+ function __() { this.constructor = d; }
11262
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
11263
+ };
11264
+ })();
11265
+ var ElevationTileSourceOptions = /** @class */ (function (_super) {
11266
+ __extends$u(ElevationTileSourceOptions, _super);
11267
+ function ElevationTileSourceOptions() {
11268
+ var _this = _super !== null && _super.apply(this, arguments) || this;
11269
+ /**
11270
+ * DEM tiles encoding format. Supported: `mapbox` or `terrarium`.
11271
+ * <p>`"terrarium": Terrarium format PNG tiles. See https://aws.amazon.com/es/public-datasets/terrain/ for more info.</p>
11272
+ * <p>`"mapbox": Mapbox Terrain RGB tiles. See https://www.mapbox.com/help/access-elevation-data/#mapbox-terrain-rgb for more info.</p>
11273
+ * default `mapbox`
11274
+ * @default mapbox
11275
+ */
11276
+ _this.encoding = undefined;
11277
+ return _this;
11278
+ }
11279
+ return ElevationTileSourceOptions;
11280
+ }(RasterTileSourceOptions));
11281
+
11282
+ var __extends$v = (window && window.__extends) || (function () {
11283
+ var extendStatics = function (d, b) {
11284
+ extendStatics = Object.setPrototypeOf ||
11285
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
11286
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
11287
+ return extendStatics(d, b);
11288
+ };
11289
+ return function (d, b) {
11290
+ if (typeof b !== "function" && b !== null)
11291
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11292
+ extendStatics(d, b);
11293
+ function __() { this.constructor = d; }
11294
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
11295
+ };
11296
+ })();
11297
+ var __assign = (window && window.__assign) || function () {
11298
+ __assign = Object.assign || function(t) {
11299
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
11300
+ s = arguments[i];
11301
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
11302
+ t[p] = s[p];
11303
+ }
11304
+ return t;
11305
+ };
11306
+ return __assign.apply(this, arguments);
11307
+ };
11308
+ /**
11309
+ * Publicly exposed ElevationTileSource.
11310
+ */
11311
+ var ElevationTileSource = /** @class */ (function (_super) {
11312
+ __extends$v(ElevationTileSource, _super);
11313
+ function ElevationTileSource(id, options) {
11314
+ var _this = _super.call(this, id) || this;
11315
+ _this.options = new ElevationTileSourceOptions().merge(cloneDeep_1(options));
11316
+ return _this;
11317
+ }
11318
+ /**
11319
+ * Gets the options of the ElevationTileSource.
11320
+ */
11321
+ ElevationTileSource.prototype.getOptions = function () {
11322
+ return cloneDeep_1(this.options);
11323
+ };
11324
+ ElevationTileSource.prototype._buildSource = function () {
11325
+ var t = __assign({ type: "raster-dem", bounds: this.options.bounds, minzoom: this.options.minZoom, maxzoom: this.options.maxZoom, tileSize: this.options.tileSize, encoding: this.options.encoding }, (!this.options.tiles ? { url: this.options.url } : { tiles: this.options.tiles }));
11326
+ return t;
11327
+ };
11328
+ ElevationTileSource.prototype._isDeepEqual = function (other) {
11329
+ if (this.constructor !== other.constructor) {
11330
+ return false;
11331
+ }
11332
+ var otherOptions = other.getOptions();
11333
+ return this.options.url === otherOptions.url &&
11334
+ this.options.tiles === otherOptions.tiles &&
11335
+ this.options.bounds === otherOptions.bounds &&
11336
+ this.options.minZoom === otherOptions.minZoom &&
11337
+ this.options.maxZoom === otherOptions.maxZoom &&
11338
+ this.options.tileSize === otherOptions.tileSize &&
11339
+ this.options.encoding === otherOptions.encoding;
11340
+ };
11341
+ return ElevationTileSource;
11342
+ }(Source));
11343
+
10978
11344
 
10979
11345
 
10980
11346
  var index$4 = /*#__PURE__*/Object.freeze({
10981
11347
  __proto__: null,
10982
11348
  Source: Source,
10983
11349
  DataSource: DataSource,
10984
- VectorTileSource: VectorTileSource
11350
+ VectorTileSource: VectorTileSource,
11351
+ CanvasSource: CanvasSource,
11352
+ ImageSource: ImageSource,
11353
+ VideoSource: VideoSource,
11354
+ ElevationTileSource: ElevationTileSource,
11355
+ UnknownSource: UnknownSource
10985
11356
  });
10986
11357
 
10987
- var __extends$p = (window && window.__extends) || (function () {
11358
+ var __extends$w = (window && window.__extends) || (function () {
10988
11359
  var extendStatics = function (d, b) {
10989
11360
  extendStatics = Object.setPrototypeOf ||
10990
11361
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -11003,7 +11374,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
11003
11374
  * Abstract class for other layer classes to extend.
11004
11375
  */
11005
11376
  var Layer = /** @class */ (function (_super) {
11006
- __extends$p(Layer, _super);
11377
+ __extends$w(Layer, _super);
11007
11378
  function Layer(id) {
11008
11379
  var _this =
11009
11380
  // Assign an random id using a UUID if none was specified.
@@ -11110,7 +11481,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
11110
11481
  return Layer;
11111
11482
  }(EventEmitter));
11112
11483
 
11113
- var __extends$q = (window && window.__extends) || (function () {
11484
+ var __extends$x = (window && window.__extends) || (function () {
11114
11485
  var extendStatics = function (d, b) {
11115
11486
  extendStatics = Object.setPrototypeOf ||
11116
11487
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -11129,7 +11500,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
11129
11500
  * A base class which all other layer options inherit from.
11130
11501
  */
11131
11502
  var LayerOptions = /** @class */ (function (_super) {
11132
- __extends$q(LayerOptions, _super);
11503
+ __extends$x(LayerOptions, _super);
11133
11504
  function LayerOptions() {
11134
11505
  var _this = _super !== null && _super.apply(this, arguments) || this;
11135
11506
  /**
@@ -11176,7 +11547,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
11176
11547
  return LayerOptions;
11177
11548
  }(Options));
11178
11549
 
11179
- var __extends$r = (window && window.__extends) || (function () {
11550
+ var __extends$y = (window && window.__extends) || (function () {
11180
11551
  var extendStatics = function (d, b) {
11181
11552
  extendStatics = Object.setPrototypeOf ||
11182
11553
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -11195,7 +11566,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
11195
11566
  * Options used when rendering Point objects in a BubbleLayer.
11196
11567
  */
11197
11568
  var BubbleLayerOptions = /** @class */ (function (_super) {
11198
- __extends$r(BubbleLayerOptions, _super);
11569
+ __extends$y(BubbleLayerOptions, _super);
11199
11570
  function BubbleLayerOptions() {
11200
11571
  var _this = _super !== null && _super.apply(this, arguments) || this;
11201
11572
  /**
@@ -11303,7 +11674,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
11303
11674
  return BubbleLayerOptions;
11304
11675
  }(LayerOptions));
11305
11676
 
11306
- var __extends$s = (window && window.__extends) || (function () {
11677
+ var __extends$z = (window && window.__extends) || (function () {
11307
11678
  var extendStatics = function (d, b) {
11308
11679
  extendStatics = Object.setPrototypeOf ||
11309
11680
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -11379,7 +11750,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
11379
11750
  * Renders Point objects as scalable circles (bubbles).
11380
11751
  */
11381
11752
  var BubbleLayer = /** @class */ (function (_super) {
11382
- __extends$s(BubbleLayer, _super);
11753
+ __extends$z(BubbleLayer, _super);
11383
11754
  /**
11384
11755
  * Constructs a new BubbleLayer.
11385
11756
  * @param source The id or instance of a data source which the layer will render.
@@ -11654,7 +12025,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
11654
12025
  return BubbleLayer;
11655
12026
  }(Layer));
11656
12027
 
11657
- var __extends$t = (window && window.__extends) || (function () {
12028
+ var __extends$A = (window && window.__extends) || (function () {
11658
12029
  var extendStatics = function (d, b) {
11659
12030
  extendStatics = Object.setPrototypeOf ||
11660
12031
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -11673,7 +12044,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
11673
12044
  * Options used when rendering Point objects in a HeatMapLayer.
11674
12045
  */
11675
12046
  var HeatMapLayerOptions = /** @class */ (function (_super) {
11676
- __extends$t(HeatMapLayerOptions, _super);
12047
+ __extends$A(HeatMapLayerOptions, _super);
11677
12048
  function HeatMapLayerOptions() {
11678
12049
  var _this = _super !== null && _super.apply(this, arguments) || this;
11679
12050
  /**
@@ -11740,7 +12111,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
11740
12111
  return HeatMapLayerOptions;
11741
12112
  }(LayerOptions));
11742
12113
 
11743
- var __extends$u = (window && window.__extends) || (function () {
12114
+ var __extends$B = (window && window.__extends) || (function () {
11744
12115
  var extendStatics = function (d, b) {
11745
12116
  extendStatics = Object.setPrototypeOf ||
11746
12117
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -11759,7 +12130,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
11759
12130
  * Represent the density of data using different colors (HeatMap).
11760
12131
  */
11761
12132
  var HeatMapLayer = /** @class */ (function (_super) {
11762
- __extends$u(HeatMapLayer, _super);
12133
+ __extends$B(HeatMapLayer, _super);
11763
12134
  /**
11764
12135
  * Constructs a new HeatMapLayer.
11765
12136
  * @param source The id or instance of a data source which the layer will render.
@@ -11863,7 +12234,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
11863
12234
  return HeatMapLayer;
11864
12235
  }(Layer));
11865
12236
 
11866
- var __extends$v = (window && window.__extends) || (function () {
12237
+ var __extends$C = (window && window.__extends) || (function () {
11867
12238
  var extendStatics = function (d, b) {
11868
12239
  extendStatics = Object.setPrototypeOf ||
11869
12240
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -11882,7 +12253,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
11882
12253
  * Options used when rendering canvas, image, raster tile, and video layers
11883
12254
  */
11884
12255
  var MediaLayerOptions = /** @class */ (function (_super) {
11885
- __extends$v(MediaLayerOptions, _super);
12256
+ __extends$C(MediaLayerOptions, _super);
11886
12257
  function MediaLayerOptions() {
11887
12258
  var _this = _super !== null && _super.apply(this, arguments) || this;
11888
12259
  /**
@@ -11934,7 +12305,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
11934
12305
  return MediaLayerOptions;
11935
12306
  }(LayerOptions));
11936
12307
 
11937
- var __extends$w = (window && window.__extends) || (function () {
12308
+ var __extends$D = (window && window.__extends) || (function () {
11938
12309
  var extendStatics = function (d, b) {
11939
12310
  extendStatics = Object.setPrototypeOf ||
11940
12311
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -11953,7 +12324,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
11953
12324
  * Options used when rendering Point objects in a ImageLayer.
11954
12325
  */
11955
12326
  var ImageLayerOptions = /** @class */ (function (_super) {
11956
- __extends$w(ImageLayerOptions, _super);
12327
+ __extends$D(ImageLayerOptions, _super);
11957
12328
  function ImageLayerOptions() {
11958
12329
  var _this = _super !== null && _super.apply(this, arguments) || this;
11959
12330
  /**
@@ -11983,7 +12354,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
11983
12354
  return ImageLayerOptions;
11984
12355
  }(MediaLayerOptions));
11985
12356
 
11986
- var __extends$x = (window && window.__extends) || (function () {
12357
+ var __extends$E = (window && window.__extends) || (function () {
11987
12358
  var extendStatics = function (d, b) {
11988
12359
  extendStatics = Object.setPrototypeOf ||
11989
12360
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -12003,7 +12374,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
12003
12374
  * @internal
12004
12375
  */
12005
12376
  var SourceBuildingLayer = /** @class */ (function (_super) {
12006
- __extends$x(SourceBuildingLayer, _super);
12377
+ __extends$E(SourceBuildingLayer, _super);
12007
12378
  function SourceBuildingLayer() {
12008
12379
  return _super !== null && _super.apply(this, arguments) || this;
12009
12380
  }
@@ -12015,10 +12386,13 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
12015
12386
  ids.add(this._getSourceId());
12016
12387
  return ids;
12017
12388
  };
12389
+ SourceBuildingLayer.prototype.onAdd = function (map) {
12390
+ _super.prototype.onAdd.call(this, map);
12391
+ };
12018
12392
  return SourceBuildingLayer;
12019
12393
  }(Layer));
12020
12394
 
12021
- var __extends$y = (window && window.__extends) || (function () {
12395
+ var __extends$F = (window && window.__extends) || (function () {
12022
12396
  var extendStatics = function (d, b) {
12023
12397
  extendStatics = Object.setPrototypeOf ||
12024
12398
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -12037,7 +12411,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
12037
12411
  * Overlays an image on the map with each corner anchored to a coordinate on the map. Also known as a ground or image overlay.
12038
12412
  */
12039
12413
  var ImageLayer = /** @class */ (function (_super) {
12040
- __extends$y(ImageLayer, _super);
12414
+ __extends$F(ImageLayer, _super);
12041
12415
  /**
12042
12416
  * Constructs a new ImageLayer.
12043
12417
  * @param id The id of the layer. If not specified a random one will be generated.
@@ -12075,8 +12449,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
12075
12449
  this._updatePaintProperty("raster-brightness-max", newOptions.maxBrightness, this.options.maxBrightness);
12076
12450
  this._updatePaintProperty("raster-opacity", newOptions.opacity, this.options.opacity);
12077
12451
  this._updatePaintProperty("raster-saturation", newOptions.saturation, this.options.saturation);
12078
- // TODO: the mapbox typing file doesn't support mapboxgl.ImageSource.updateImage()
12079
- // update "as any" to "as mapboxgl.ImageSource" after the typing file is updated
12452
+ // TODO: the mapbox typing file doesn't support maplibregl.ImageSource.updateImage()
12453
+ // update "as any" to "as maplibregl.ImageSource" after the typing file is updated
12080
12454
  var source = this.map._getMap().getSource(this._getSourceId());
12081
12455
  if (source) {
12082
12456
  source.updateImage(newOptions);
@@ -12237,10 +12611,15 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
12237
12611
  this.transform = Promise.resolve(new AffineTransform(corners, this.options.coordinates));
12238
12612
  }
12239
12613
  };
12614
+ ImageLayer.prototype._getSourceWrapper = function () {
12615
+ var sourceId = this._getSourceId();
12616
+ var source = this._buildSource();
12617
+ return new ImageSource(sourceId, source);
12618
+ };
12240
12619
  return ImageLayer;
12241
12620
  }(SourceBuildingLayer));
12242
12621
 
12243
- var __extends$z = (window && window.__extends) || (function () {
12622
+ var __extends$G = (window && window.__extends) || (function () {
12244
12623
  var extendStatics = function (d, b) {
12245
12624
  extendStatics = Object.setPrototypeOf ||
12246
12625
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -12260,7 +12639,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
12260
12639
  * LineString, MultiLineString, Polygon, and MultiPolygon objects in a line layer.
12261
12640
  */
12262
12641
  var LineLayerOptions = /** @class */ (function (_super) {
12263
- __extends$z(LineLayerOptions, _super);
12642
+ __extends$G(LineLayerOptions, _super);
12264
12643
  function LineLayerOptions() {
12265
12644
  var _this = _super !== null && _super.apply(this, arguments) || this;
12266
12645
  /**
@@ -12360,7 +12739,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
12360
12739
  return LineLayerOptions;
12361
12740
  }(LayerOptions));
12362
12741
 
12363
- var __extends$A = (window && window.__extends) || (function () {
12742
+ var __extends$H = (window && window.__extends) || (function () {
12364
12743
  var extendStatics = function (d, b) {
12365
12744
  extendStatics = Object.setPrototypeOf ||
12366
12745
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -12375,8 +12754,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
12375
12754
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12376
12755
  };
12377
12756
  })();
12378
- var __assign = (window && window.__assign) || function () {
12379
- __assign = Object.assign || function(t) {
12757
+ var __assign$1 = (window && window.__assign) || function () {
12758
+ __assign$1 = Object.assign || function(t) {
12380
12759
  for (var s, i = 1, n = arguments.length; i < n; i++) {
12381
12760
  s = arguments[i];
12382
12761
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
@@ -12384,14 +12763,14 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
12384
12763
  }
12385
12764
  return t;
12386
12765
  };
12387
- return __assign.apply(this, arguments);
12766
+ return __assign$1.apply(this, arguments);
12388
12767
  };
12389
12768
  /**
12390
12769
  * Renders line data on the map. Can be used with SimpleLine, SimplePolygon,
12391
12770
  * CirclePolygon, LineString, MultiLineString, Polygon, and MultiPolygon objects.
12392
12771
  */
12393
12772
  var LineLayer = /** @class */ (function (_super) {
12394
- __extends$A(LineLayer, _super);
12773
+ __extends$H(LineLayer, _super);
12395
12774
  /**
12396
12775
  * Constructs a new LineLayer.
12397
12776
  * @param source The id or instance of a data source which the layer will render.
@@ -12454,13 +12833,13 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
12454
12833
  * @internal
12455
12834
  */
12456
12835
  LineLayer.prototype._buildLayers = function () {
12457
- var layer = __assign(__assign(__assign(__assign({ id: this.id, type: "line" }, (this.options.sourceLayer && { "source-layer": this.options.sourceLayer })), { source: this.options.source instanceof Source ?
12836
+ var layer = __assign$1(__assign$1(__assign$1(__assign$1({ id: this.id, type: "line" }, (this.options.sourceLayer && { "source-layer": this.options.sourceLayer })), { source: this.options.source instanceof Source ?
12458
12837
  this.options.source.getId() :
12459
12838
  this.options.source, layout: {
12460
12839
  visibility: this.options.visible ? "visible" : "none",
12461
12840
  "line-cap": this.options.lineCap,
12462
12841
  "line-join": this.options.lineJoin
12463
- }, paint: __assign(__assign(__assign({ "line-blur": this.options.blur, "line-color": this.options.strokeColor }, (this.options.strokeDashArray && { "line-dasharray": this.options.strokeDashArray })), (this.options.strokeGradient && { "line-gradient": this.options.strokeGradient })), { "line-offset": this.options.offset, "line-opacity": this.options.strokeOpacity, "line-translate": this.options.translate, "line-translate-anchor": this.options.translateAnchor, "line-width": this.options.strokeWidth }) }), (this.options.filter && { filter: this.options.filter })), { minzoom: this.options.minZoom, maxzoom: this.options.maxZoom });
12842
+ }, paint: __assign$1(__assign$1(__assign$1({ "line-blur": this.options.blur, "line-color": this.options.strokeColor }, (this.options.strokeDashArray ? { "line-dasharray": this.options.strokeDashArray } : {})), (this.options.strokeGradient ? { "line-gradient": this.options.strokeGradient } : {})), { "line-offset": this.options.offset, "line-opacity": this.options.strokeOpacity, "line-translate": this.options.translate, "line-translate-anchor": this.options.translateAnchor, "line-width": this.options.strokeWidth }) }), (this.options.filter && { filter: this.options.filter })), { minzoom: this.options.minZoom, maxzoom: this.options.maxZoom });
12464
12843
  return [layer];
12465
12844
  };
12466
12845
  /**
@@ -12482,7 +12861,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
12482
12861
  return LineLayer;
12483
12862
  }(Layer));
12484
12863
 
12485
- var __extends$B = (window && window.__extends) || (function () {
12864
+ var __extends$I = (window && window.__extends) || (function () {
12486
12865
  var extendStatics = function (d, b) {
12487
12866
  extendStatics = Object.setPrototypeOf ||
12488
12867
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -12501,7 +12880,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
12501
12880
  * Options used when rendering `Polygon` and `MultiPolygon` objects in a `PolygonExtrusionLayer`.
12502
12881
  */
12503
12882
  var PolygonExtrusionLayerOptions = /** @class */ (function (_super) {
12504
- __extends$B(PolygonExtrusionLayerOptions, _super);
12883
+ __extends$I(PolygonExtrusionLayerOptions, _super);
12505
12884
  function PolygonExtrusionLayerOptions() {
12506
12885
  var _this = _super !== null && _super.apply(this, arguments) || this;
12507
12886
  /**
@@ -12574,7 +12953,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
12574
12953
  return PolygonExtrusionLayerOptions;
12575
12954
  }(LayerOptions));
12576
12955
 
12577
- var __extends$C = (window && window.__extends) || (function () {
12956
+ var __extends$J = (window && window.__extends) || (function () {
12578
12957
  var extendStatics = function (d, b) {
12579
12958
  extendStatics = Object.setPrototypeOf ||
12580
12959
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -12589,8 +12968,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
12589
12968
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
12590
12969
  };
12591
12970
  })();
12592
- var __assign$1 = (window && window.__assign) || function () {
12593
- __assign$1 = Object.assign || function(t) {
12971
+ var __assign$2 = (window && window.__assign) || function () {
12972
+ __assign$2 = Object.assign || function(t) {
12594
12973
  for (var s, i = 1, n = arguments.length; i < n; i++) {
12595
12974
  s = arguments[i];
12596
12975
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
@@ -12598,13 +12977,13 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
12598
12977
  }
12599
12978
  return t;
12600
12979
  };
12601
- return __assign$1.apply(this, arguments);
12980
+ return __assign$2.apply(this, arguments);
12602
12981
  };
12603
12982
  /**
12604
12983
  * Renders extruded filled `Polygon` and `MultiPolygon` objects on the map.
12605
12984
  */
12606
12985
  var PolygonExtrusionLayer = /** @class */ (function (_super) {
12607
- __extends$C(PolygonExtrusionLayer, _super);
12986
+ __extends$J(PolygonExtrusionLayer, _super);
12608
12987
  /**
12609
12988
  * Constructs a new PolygonExtrusionLayer.
12610
12989
  * @param source The id or instance of a data source which the layer will render.
@@ -12664,11 +13043,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
12664
13043
  * @internal
12665
13044
  */
12666
13045
  PolygonExtrusionLayer.prototype._buildLayers = function () {
12667
- var layer = __assign$1(__assign$1(__assign$1(__assign$1({ id: this.id, type: "fill-extrusion" }, (this.options.sourceLayer && { "source-layer": this.options.sourceLayer })), { source: this.options.source instanceof Source ?
13046
+ var layer = __assign$2(__assign$2(__assign$2(__assign$2({ id: this.id, type: "fill-extrusion" }, (this.options.sourceLayer && { "source-layer": this.options.sourceLayer })), { source: this.options.source instanceof Source ?
12668
13047
  this.options.source.getId() :
12669
13048
  this.options.source, layout: {
12670
13049
  visibility: this.options.visible ? "visible" : "none",
12671
- }, paint: __assign$1(__assign$1({ "fill-extrusion-base": this.options.base, "fill-extrusion-height": this.options.height, "fill-extrusion-opacity": this.options.fillOpacity }, (this.options.fillPattern ?
13050
+ }, paint: __assign$2(__assign$2({ "fill-extrusion-base": this.options.base, "fill-extrusion-height": this.options.height, "fill-extrusion-opacity": this.options.fillOpacity }, (this.options.fillPattern ?
12672
13051
  { "fill-extrusion-pattern": this.options.fillPattern } :
12673
13052
  { "fill-extrusion-color": this.options.fillColor })), { "fill-extrusion-translate": this.options.translate, "fill-extrusion-translate-anchor": this.options.translateAnchor, "fill-extrusion-vertical-gradient": this.options.verticalGradient }) }), (this.options.filter && { filter: this.options.filter })), { minzoom: this.options.minZoom, maxzoom: this.options.maxZoom });
12674
13053
  return [layer];
@@ -12692,7 +13071,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
12692
13071
  return PolygonExtrusionLayer;
12693
13072
  }(Layer));
12694
13073
 
12695
- var __extends$D = (window && window.__extends) || (function () {
13074
+ var __extends$K = (window && window.__extends) || (function () {
12696
13075
  var extendStatics = function (d, b) {
12697
13076
  extendStatics = Object.setPrototypeOf ||
12698
13077
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -12743,7 +13122,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
12743
13122
  * Options used when rendering Polygon and MultiPolygon objects in a PolygonLayer.
12744
13123
  */
12745
13124
  var PolygonLayerOptions = /** @class */ (function (_super) {
12746
- __extends$D(PolygonLayerOptions, _super);
13125
+ __extends$K(PolygonLayerOptions, _super);
12747
13126
  function PolygonLayerOptions() {
12748
13127
  var _this = _super !== null && _super.apply(this, arguments) || this;
12749
13128
  /**
@@ -12821,7 +13200,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
12821
13200
  return PolygonLayerOptions;
12822
13201
  }(LayerOptions));
12823
13202
 
12824
- var __extends$E = (window && window.__extends) || (function () {
13203
+ var __extends$L = (window && window.__extends) || (function () {
12825
13204
  var extendStatics = function (d, b) {
12826
13205
  extendStatics = Object.setPrototypeOf ||
12827
13206
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -12840,7 +13219,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
12840
13219
  * Renders filled Polygon and MultiPolygon objects on the map.
12841
13220
  */
12842
13221
  var PolygonLayer = /** @class */ (function (_super) {
12843
- __extends$E(PolygonLayer, _super);
13222
+ __extends$L(PolygonLayer, _super);
12844
13223
  /**
12845
13224
  * Constructs a new PolygonLayer.
12846
13225
  * @param source The id or instance of a data source which the layer will render.
@@ -12946,7 +13325,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
12946
13325
  return PolygonLayer;
12947
13326
  }(Layer));
12948
13327
 
12949
- var __extends$F = (window && window.__extends) || (function () {
13328
+ var __extends$M = (window && window.__extends) || (function () {
12950
13329
  var extendStatics = function (d, b) {
12951
13330
  extendStatics = Object.setPrototypeOf ||
12952
13331
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -12965,7 +13344,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
12965
13344
  * Options used to customize the icons in a SymbolLayer
12966
13345
  */
12967
13346
  var IconOptions = /** @class */ (function (_super) {
12968
- __extends$F(IconOptions, _super);
13347
+ __extends$M(IconOptions, _super);
12969
13348
  function IconOptions() {
12970
13349
  var _this = _super !== null && _super.apply(this, arguments) || this;
12971
13350
  /**
@@ -13075,7 +13454,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
13075
13454
  return IconOptions;
13076
13455
  }(Options));
13077
13456
 
13078
- var __extends$G = (window && window.__extends) || (function () {
13457
+ var __extends$N = (window && window.__extends) || (function () {
13079
13458
  var extendStatics = function (d, b) {
13080
13459
  extendStatics = Object.setPrototypeOf ||
13081
13460
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -13094,7 +13473,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
13094
13473
  * Options used to customize the text in a SymbolLayer
13095
13474
  */
13096
13475
  var TextOptions = /** @class */ (function (_super) {
13097
- __extends$G(TextOptions, _super);
13476
+ __extends$N(TextOptions, _super);
13098
13477
  function TextOptions() {
13099
13478
  var _this = _super !== null && _super.apply(this, arguments) || this;
13100
13479
  /**
@@ -13184,6 +13563,13 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
13184
13563
  * @default "auto"
13185
13564
  */
13186
13565
  _this.pitchAlignment = "auto";
13566
+ /**
13567
+ * Radial offset of text, in the direction of the symbol's anchor. Useful in combination
13568
+ * with `variableAnchor`, which defaults to using the two-dimensional `offset` if present.
13569
+ * Default: `undefined`
13570
+ * @default undefined
13571
+ */
13572
+ _this.radialOffset = undefined;
13187
13573
  /**
13188
13574
  * The amount to rotate the text clockwise in degrees.
13189
13575
  * Default `0`
@@ -13203,6 +13589,25 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
13203
13589
  * @default "auto"
13204
13590
  */
13205
13591
  _this.rotationAlignment = "auto";
13592
+ /**
13593
+ * List of potential anchor locations, to increase the chance of placing high-priority
13594
+ * labels on the map. The renderer will attempt to place the label at each location,
13595
+ * in order, before moving onto the next label. Use `justify: "auto"` to choose text
13596
+ * justification based on anchor position. To apply an offset use the `radialOffset` or
13597
+ * two-dimensional `offset` options.
13598
+ * <p>`"center"`: The center of the icon is placed closest to the anchor.</p>
13599
+ * <p>`"left"`: The left side of the icon is placed closest to the anchor.</p>
13600
+ * <p>`"right"`: The right side of the icon is placed closest to the anchor.</p>
13601
+ * <p>`"top"`: The top of the icon is placed closest to the anchor.</p>
13602
+ * <p>`"bottom"`: The bottom of the icon is placed closest to the anchor.</p>
13603
+ * <p>`"top-left"`: The top left corner of the icon is placed closest to the anchor.</p>
13604
+ * <p>`"top-right"`: The top right corner of the icon is placed closest to the anchor.</p>
13605
+ * <p>`"bottom-left"`: The bottom left corner of the icon is placed closest to the anchor.</p>
13606
+ * <p>`"bottom-right"`: The bottom right corner of the icon is placed closest to the anchor.</p>
13607
+ * Default: `undefined`
13608
+ * @default undefined
13609
+ */
13610
+ _this.variableAnchor = undefined;
13206
13611
  /**
13207
13612
  * The size of the font in pixels.
13208
13613
  * Must be a number greater or equal to 0.
@@ -13248,7 +13653,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
13248
13653
  return TextOptions;
13249
13654
  }(Options));
13250
13655
 
13251
- var __extends$H = (window && window.__extends) || (function () {
13656
+ var __extends$O = (window && window.__extends) || (function () {
13252
13657
  var extendStatics = function (d, b) {
13253
13658
  extendStatics = Object.setPrototypeOf ||
13254
13659
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -13267,7 +13672,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
13267
13672
  * Options used when rendering geometries in a SymbolLayer.
13268
13673
  */
13269
13674
  var SymbolLayerOptions = /** @class */ (function (_super) {
13270
- __extends$H(SymbolLayerOptions, _super);
13675
+ __extends$O(SymbolLayerOptions, _super);
13271
13676
  function SymbolLayerOptions() {
13272
13677
  var _this = _super !== null && _super.apply(this, arguments) || this;
13273
13678
  /**
@@ -13301,6 +13706,13 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
13301
13706
  * @default "point"
13302
13707
  */
13303
13708
  _this.placement = "point";
13709
+ /**
13710
+ * Sorts features in ascending order based on this value. Features with
13711
+ * lower sort keys are drawn and placed first.
13712
+ * Default `undefined`.
13713
+ * @default undefined
13714
+ */
13715
+ _this.sortKey = undefined;
13304
13716
  /**
13305
13717
  * Determines whether overlapping symbols in the same layer are rendered in the order
13306
13718
  * that they appear in the data source, or by their y position relative to the viewport.
@@ -13325,7 +13737,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
13325
13737
  return SymbolLayerOptions;
13326
13738
  }(LayerOptions));
13327
13739
 
13328
- var __extends$I = (window && window.__extends) || (function () {
13740
+ var __extends$P = (window && window.__extends) || (function () {
13329
13741
  var extendStatics = function (d, b) {
13330
13742
  extendStatics = Object.setPrototypeOf ||
13331
13743
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -13340,8 +13752,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
13340
13752
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
13341
13753
  };
13342
13754
  })();
13343
- var __assign$2 = (window && window.__assign) || function () {
13344
- __assign$2 = Object.assign || function(t) {
13755
+ var __assign$3 = (window && window.__assign) || function () {
13756
+ __assign$3 = Object.assign || function(t) {
13345
13757
  for (var s, i = 1, n = arguments.length; i < n; i++) {
13346
13758
  s = arguments[i];
13347
13759
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
@@ -13349,14 +13761,14 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
13349
13761
  }
13350
13762
  return t;
13351
13763
  };
13352
- return __assign$2.apply(this, arguments);
13764
+ return __assign$3.apply(this, arguments);
13353
13765
  };
13354
13766
  /**
13355
13767
  * Renders point based data as symbols on the map using text and/or icons.
13356
13768
  * Symbols can also be created for line and polygon data as well.
13357
13769
  */
13358
13770
  var SymbolLayer = /** @class */ (function (_super) {
13359
- __extends$I(SymbolLayer, _super);
13771
+ __extends$P(SymbolLayer, _super);
13360
13772
  /**
13361
13773
  * Constructs a new SymbolLayer.
13362
13774
  * @param source The id or instance of a data source which the layer will render.
@@ -13407,7 +13819,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
13407
13819
  this._updateLayoutProperty("symbol-spacing", newOptions.lineSpacing, thisOpts.lineSpacing);
13408
13820
  this._updateLayoutProperty("symbol-placement", newOptions.placement, thisOpts.placement);
13409
13821
  this._updateLayoutProperty("symbol-sort-key", newOptions.sortKey, thisOpts.sortKey);
13410
- // REVIEW: @types/mapboxgl-js doesn't show "auto" for "symbol-z-order"
13822
+ // REVIEW: @types/maplibregl-js doesn't show "auto" for "symbol-z-order"
13411
13823
  this._updateLayoutProperty("symbol-z-order", newOptions.zOrder, thisOpts.zOrder);
13412
13824
  // Icon options.
13413
13825
  this._updateLayoutProperty("icon-allow-overlap", newIconOpts.allowOverlap, thisIconOpts.allowOverlap);
@@ -13450,9 +13862,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
13450
13862
  * @internal
13451
13863
  */
13452
13864
  SymbolLayer.prototype._buildLayers = function () {
13453
- var layer = __assign$2(__assign$2(__assign$2(__assign$2({ id: this.id, type: "symbol" }, (this.options.sourceLayer && { "source-layer": this.options.sourceLayer })), { source: this.options.source instanceof Source ?
13865
+ var layer = __assign$3(__assign$3(__assign$3(__assign$3({ id: this.id, type: "symbol" }, (this.options.sourceLayer && { "source-layer": this.options.sourceLayer })), { source: this.options.source instanceof Source ?
13454
13866
  this.options.source.getId() :
13455
- this.options.source, layout: __assign$2(__assign$2({ visibility: this.options.visible ? "visible" : "none", "symbol-placement": this.options.placement, "symbol-spacing": this.options.lineSpacing, "symbol-z-order": this.options.zOrder,
13867
+ this.options.source, layout: __assign$3(__assign$3({ visibility: this.options.visible ? "visible" : "none", "symbol-placement": this.options.placement, "symbol-spacing": this.options.lineSpacing, "symbol-z-order": this.options.zOrder,
13456
13868
  // Text options.
13457
13869
  "text-allow-overlap": this.options.textOptions.allowOverlap, "text-anchor": this.options.textOptions.anchor }, (this.options.textOptions.textField && { "text-field": this.options.textOptions.textField })), { "text-font": this.options.textOptions.font, "text-ignore-placement": this.options.textOptions.ignorePlacement, "text-justify": this.options.textOptions.justify, "text-offset": this.options.textOptions.offset, "text-optional": this.options.textOptions.optional, "text-padding": this.options.textOptions.padding, "text-pitch-alignment": this.options.textOptions.pitchAlignment, "text-rotate": this.options.textOptions.rotation, "text-rotation-alignment": this.options.textOptions.rotationAlignment, "text-size": this.options.textOptions.size,
13458
13870
  // Icon options.
@@ -13498,7 +13910,124 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
13498
13910
  return SymbolLayer;
13499
13911
  }(Layer));
13500
13912
 
13501
- var __extends$J = (window && window.__extends) || (function () {
13913
+ var __extends$Q = (window && window.__extends) || (function () {
13914
+ var extendStatics = function (d, b) {
13915
+ extendStatics = Object.setPrototypeOf ||
13916
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
13917
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
13918
+ return extendStatics(d, b);
13919
+ };
13920
+ return function (d, b) {
13921
+ if (typeof b !== "function" && b !== null)
13922
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
13923
+ extendStatics(d, b);
13924
+ function __() { this.constructor = d; }
13925
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
13926
+ };
13927
+ })();
13928
+ var __assign$4 = (window && window.__assign) || function () {
13929
+ __assign$4 = Object.assign || function(t) {
13930
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
13931
+ s = arguments[i];
13932
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
13933
+ t[p] = s[p];
13934
+ }
13935
+ return t;
13936
+ };
13937
+ return __assign$4.apply(this, arguments);
13938
+ };
13939
+ /**
13940
+ * Used to represent the fundamental map source.
13941
+ * @private
13942
+ */
13943
+ var FundamentalMapSource = /** @class */ (function (_super) {
13944
+ __extends$Q(FundamentalMapSource, _super);
13945
+ /**
13946
+ * Constructs a source from the contents of a layer resource file.
13947
+ * @param id The source's id.
13948
+ * @param sourceDef The sources entry of the resource file.
13949
+ * @param options The query parameters to add to the urls listed in the resource file.
13950
+ */
13951
+ function FundamentalMapSource(id, sourceDef, options) {
13952
+ var _this = _super.call(this, id) || this;
13953
+ _this.source = _this._modifySource(sourceDef, options);
13954
+ return _this;
13955
+ }
13956
+ /**
13957
+ * @internal
13958
+ */
13959
+ FundamentalMapSource.prototype._buildSource = function () {
13960
+ return this.source;
13961
+ };
13962
+ /**
13963
+ * @internal
13964
+ */
13965
+ FundamentalMapSource.prototype._isDeepEqual = function (other) {
13966
+ if (this.constructor !== other.constructor) {
13967
+ return false;
13968
+ }
13969
+ var source = this.source;
13970
+ var otherSource = other.source;
13971
+ var baseEqual = source.type === otherSource.type &&
13972
+ source.url === otherSource.url
13973
+ && ((source.tiles === undefined && otherSource.tiles === undefined) ||
13974
+ (source.tiles && otherSource.tiles && source.tiles.length === otherSource.tiles.length && source.tiles.every(function (value, idx) { return value === otherSource.tiles[idx]; })))
13975
+ && source.minzoom === otherSource.minzoom
13976
+ && source.maxzoom === otherSource.maxzoom
13977
+ && source.bounds === otherSource.bounds
13978
+ && source['attribution'] === otherSource['attribution'];
13979
+ var rasterEqual = source.type !== "raster" || (source.type === "raster"
13980
+ && source.type === otherSource.type
13981
+ && source.tileSize === otherSource.tileSize
13982
+ && source.scheme === otherSource.scheme);
13983
+ var rasterDemEqual = source.type !== "raster-dem" || (source.type === "raster-dem"
13984
+ && source.type === otherSource.type
13985
+ && source.tileSize === otherSource.tileSize
13986
+ && source['encoding'] === otherSource['encoding']);
13987
+ var vectorEqual = source.type !== "vector" || (source.type === "vector"
13988
+ && source.type === otherSource.type
13989
+ && source.promoteId === otherSource.promoteId
13990
+ && source.scheme === otherSource.scheme);
13991
+ return baseEqual && rasterEqual && rasterDemEqual && vectorEqual;
13992
+ };
13993
+ /**
13994
+ * Updates the source info to convert the tiles to url strings.
13995
+ * @param sourceDef The original source info.
13996
+ * @param options The query parameters to add to the tile urls.
13997
+ */
13998
+ FundamentalMapSource.prototype._modifySource = function (sourceDef, options) {
13999
+ if ((sourceDef.type === 'raster' || sourceDef.type === 'raster-dem' || sourceDef.type === 'vector') && sourceDef.tiles) {
14000
+ var tileStrings = sourceDef.tiles.map(function (tile) {
14001
+ if (typeof tile === "string") {
14002
+ return tile;
14003
+ }
14004
+ var tileUrl = new Url({
14005
+ domain: constants.domainPlaceHolder,
14006
+ path: tile.path,
14007
+ queryParams: __assign$4(__assign$4({}, options), tile.queryParams)
14008
+ });
14009
+ return tileUrl.toString();
14010
+ });
14011
+ sourceDef.tiles = tileStrings;
14012
+ }
14013
+ else if ((sourceDef.type === 'raster' || sourceDef.type === 'raster-dem' || sourceDef.type === 'vector') && sourceDef.url) {
14014
+ sourceDef.url = (typeof sourceDef.url === "string") ?
14015
+ sourceDef.url :
14016
+ new Url({
14017
+ domain: constants.domainPlaceHolder,
14018
+ path: sourceDef.url.path,
14019
+ queryParams: __assign$4(__assign$4({}, options), sourceDef.url.queryParams)
14020
+ }).toString();
14021
+ }
14022
+ else {
14023
+ throw new Error("Source definition must define a TileJSON 'url' or a 'tiles' array.");
14024
+ }
14025
+ return sourceDef;
14026
+ };
14027
+ return FundamentalMapSource;
14028
+ }(Source));
14029
+
14030
+ var __extends$R = (window && window.__extends) || (function () {
13502
14031
  var extendStatics = function (d, b) {
13503
14032
  extendStatics = Object.setPrototypeOf ||
13504
14033
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -13517,7 +14046,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
13517
14046
  * Options used when rendering raster tiled images in a TileLayer.
13518
14047
  */
13519
14048
  var TileLayerOptions = /** @class */ (function (_super) {
13520
- __extends$J(TileLayerOptions, _super);
14049
+ __extends$R(TileLayerOptions, _super);
13521
14050
  function TileLayerOptions() {
13522
14051
  var _this = _super !== null && _super.apply(this, arguments) || this;
13523
14052
  /**
@@ -13573,7 +14102,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
13573
14102
  return TileLayerOptions;
13574
14103
  }(MediaLayerOptions));
13575
14104
 
13576
- var __extends$K = (window && window.__extends) || (function () {
14105
+ var __extends$S = (window && window.__extends) || (function () {
13577
14106
  var extendStatics = function (d, b) {
13578
14107
  extendStatics = Object.setPrototypeOf ||
13579
14108
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -13588,8 +14117,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
13588
14117
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
13589
14118
  };
13590
14119
  })();
13591
- var __assign$3 = (window && window.__assign) || function () {
13592
- __assign$3 = Object.assign || function(t) {
14120
+ var __assign$5 = (window && window.__assign) || function () {
14121
+ __assign$5 = Object.assign || function(t) {
13593
14122
  for (var s, i = 1, n = arguments.length; i < n; i++) {
13594
14123
  s = arguments[i];
13595
14124
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
@@ -13597,7 +14126,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
13597
14126
  }
13598
14127
  return t;
13599
14128
  };
13600
- return __assign$3.apply(this, arguments);
14129
+ return __assign$5.apply(this, arguments);
13601
14130
  };
13602
14131
  var __values$8 = (window && window.__values) || function(o) {
13603
14132
  var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
@@ -13614,7 +14143,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
13614
14143
  * Renders raster tiled images on top of the map tiles.
13615
14144
  */
13616
14145
  var TileLayer = /** @class */ (function (_super) {
13617
- __extends$K(TileLayer, _super);
14146
+ __extends$S(TileLayer, _super);
13618
14147
  /**
13619
14148
  * Constructs a new TileLayer.
13620
14149
  * @param options The options for the tile layer.
@@ -13676,7 +14205,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
13676
14205
  * @internal
13677
14206
  */
13678
14207
  TileLayer.prototype._buildLayers = function () {
13679
- var layer = __assign$3(__assign$3({ id: this.id, type: "raster", source: this._getSourceId(), layout: {
14208
+ var layer = __assign$5(__assign$5({ id: this.id, type: "raster", source: this._getSourceId(), layout: {
13680
14209
  visibility: this.options.visible ? "visible" : "none"
13681
14210
  }, paint: {
13682
14211
  "raster-contrast": this.options.contrast,
@@ -13745,7 +14274,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
13745
14274
  };
13746
14275
  }
13747
14276
  }
13748
- 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 }));
14277
+ return __assign$5({ 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 }));
13749
14278
  };
13750
14279
  /**
13751
14280
  * Gets the id of the source to be paired with this layer.
@@ -13754,10 +14283,20 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
13754
14283
  TileLayer.prototype._getSourceId = function () {
13755
14284
  return this.getId() + "-RasterSource";
13756
14285
  };
14286
+ TileLayer.prototype._getSourceWrapper = function () {
14287
+ var sourceId = this._getSourceId();
14288
+ var source = this._buildSource();
14289
+ return new FundamentalMapSource(sourceId, {
14290
+ name: sourceId,
14291
+ tiles: source.tiles,
14292
+ type: source.type,
14293
+ url: source.url
14294
+ });
14295
+ };
13757
14296
  return TileLayer;
13758
14297
  }(SourceBuildingLayer));
13759
14298
 
13760
- var __extends$L = (window && window.__extends) || (function () {
14299
+ var __extends$T = (window && window.__extends) || (function () {
13761
14300
  var extendStatics = function (d, b) {
13762
14301
  extendStatics = Object.setPrototypeOf ||
13763
14302
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -13776,7 +14315,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
13776
14315
  * Options used to render graphics in a WebGLLayer.
13777
14316
  */
13778
14317
  var WebGLLayerOptions = /** @class */ (function (_super) {
13779
- __extends$L(WebGLLayerOptions, _super);
14318
+ __extends$T(WebGLLayerOptions, _super);
13780
14319
  function WebGLLayerOptions() {
13781
14320
  var _this = _super !== null && _super.apply(this, arguments) || this;
13782
14321
  /**
@@ -13788,7 +14327,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
13788
14327
  return WebGLLayerOptions;
13789
14328
  }(LayerOptions));
13790
14329
 
13791
- var __extends$M = (window && window.__extends) || (function () {
14330
+ var __extends$U = (window && window.__extends) || (function () {
13792
14331
  var extendStatics = function (d, b) {
13793
14332
  extendStatics = Object.setPrototypeOf ||
13794
14333
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -13807,7 +14346,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
13807
14346
  * Enables custom rendering logic with access to the WebGL context of the map.
13808
14347
  */
13809
14348
  var WebGLLayer = /** @class */ (function (_super) {
13810
- __extends$M(WebGLLayer, _super);
14349
+ __extends$U(WebGLLayer, _super);
13811
14350
  /**
13812
14351
  * Constructs a new WebGLLayer.
13813
14352
  * @param id The id of the layer. If not specified a random one will be generated.
@@ -14037,7 +14576,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
14037
14576
 
14038
14577
  var isElement_1 = isElement;
14039
14578
 
14040
- var __extends$N = (window && window.__extends) || (function () {
14579
+ var __extends$V = (window && window.__extends) || (function () {
14041
14580
  var extendStatics = function (d, b) {
14042
14581
  extendStatics = Object.setPrototypeOf ||
14043
14582
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -14056,7 +14595,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
14056
14595
  * The options for a popup.
14057
14596
  */
14058
14597
  var PopupOptions = /** @class */ (function (_super) {
14059
- __extends$N(PopupOptions, _super);
14598
+ __extends$V(PopupOptions, _super);
14060
14599
  function PopupOptions() {
14061
14600
  var _this = _super !== null && _super.apply(this, arguments) || this;
14062
14601
  /**
@@ -14125,7 +14664,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
14125
14664
  return PopupOptions;
14126
14665
  }(Options));
14127
14666
 
14128
- var __extends$O = (window && window.__extends) || (function () {
14667
+ var __extends$W = (window && window.__extends) || (function () {
14129
14668
  var extendStatics = function (d, b) {
14130
14669
  extendStatics = Object.setPrototypeOf ||
14131
14670
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -14160,7 +14699,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
14160
14699
  * An information window anchored at a specified position on a map.
14161
14700
  */
14162
14701
  var Popup = /** @class */ (function (_super) {
14163
- __extends$O(Popup, _super);
14702
+ __extends$W(Popup, _super);
14164
14703
  /**
14165
14704
  * Constructs a Popup object and initializes it with the specified options.
14166
14705
  * @param options The options for the popup.
@@ -14540,7 +15079,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
14540
15079
  if (options.anchor === "none") {
14541
15080
  this.autoAnchor = autoAnchor || "bottom";
14542
15081
  this.containerDiv.classList.add(this.autoAnchor);
14543
- marker = new mapboxgl.Marker({
15082
+ marker = new maplibregl.Marker({
14544
15083
  anchor: this.autoAnchor,
14545
15084
  element: this.containerDiv,
14546
15085
  offset: options.pixelOffset,
@@ -14548,7 +15087,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
14548
15087
  }
14549
15088
  else {
14550
15089
  this.containerDiv.classList.add(options.anchor);
14551
- marker = new mapboxgl.Marker({
15090
+ marker = new maplibregl.Marker({
14552
15091
  anchor: options.anchor,
14553
15092
  element: this.containerDiv,
14554
15093
  offset: options.pixelOffset,
@@ -14631,7 +15170,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
14631
15170
  return Popup;
14632
15171
  }(EventEmitter));
14633
15172
 
14634
- var __extends$P = (window && window.__extends) || (function () {
15173
+ var __extends$X = (window && window.__extends) || (function () {
14635
15174
  var extendStatics = function (d, b) {
14636
15175
  extendStatics = Object.setPrototypeOf ||
14637
15176
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -14650,7 +15189,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
14650
15189
  * Options for rendering an HtmlMarker object
14651
15190
  */
14652
15191
  var HtmlMarkerOptions = /** @class */ (function (_super) {
14653
- __extends$P(HtmlMarkerOptions, _super);
15192
+ __extends$X(HtmlMarkerOptions, _super);
14654
15193
  function HtmlMarkerOptions() {
14655
15194
  var _this = _super !== null && _super.apply(this, arguments) || this;
14656
15195
  /**
@@ -14728,7 +15267,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
14728
15267
  return HtmlMarkerOptions;
14729
15268
  }(Options));
14730
15269
 
14731
- var __extends$Q = (window && window.__extends) || (function () {
15270
+ var __extends$Y = (window && window.__extends) || (function () {
14732
15271
  var extendStatics = function (d, b) {
14733
15272
  extendStatics = Object.setPrototypeOf ||
14734
15273
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -14747,7 +15286,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
14747
15286
  * This class wraps an HTML element that can be displayed on the map.
14748
15287
  */
14749
15288
  var HtmlMarker = /** @class */ (function (_super) {
14750
- __extends$Q(HtmlMarker, _super);
15289
+ __extends$Y(HtmlMarker, _super);
14751
15290
  /**
14752
15291
  * Constructs a new HtmlMarker.
14753
15292
  * @param options The options for the HtmlMarker.
@@ -14944,7 +15483,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
14944
15483
  if (!options.visible) {
14945
15484
  this.element.classList.add(HtmlMarker.hiddenClass);
14946
15485
  }
14947
- this.marker = new mapboxgl.Marker({
15486
+ this.marker = new maplibregl.Marker({
14948
15487
  element: this.element,
14949
15488
  offset: options.pixelOffset,
14950
15489
  draggable: options.draggable,
@@ -15472,7 +16011,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
15472
16011
  return UserAgent;
15473
16012
  }());
15474
16013
 
15475
- var __extends$R = (window && window.__extends) || (function () {
16014
+ var __extends$Z = (window && window.__extends) || (function () {
15476
16015
  var extendStatics = function (d, b) {
15477
16016
  extendStatics = Object.setPrototypeOf ||
15478
16017
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -15517,7 +16056,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
15517
16056
  /**
15518
16057
  * The AAD implicit grant mechanism. Recommended for pages protected by a sign-in.
15519
16058
  * By default the page will be redirected to the AAD login when the map control initializes.
15520
- * Specify a logged-in `AuthenticationContext` in the `AuthenticationOptions`
16059
+ * Specify a logged-in `PublicClientApplication` in the `AuthenticationOptions`
15521
16060
  * for greater control over when/how the users signs in.
15522
16061
  * Literal value `"aad"`
15523
16062
  */
@@ -15538,7 +16077,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
15538
16077
  * Options for specifying how the map control should authenticate with the Azure Maps services.
15539
16078
  */
15540
16079
  var AuthenticationOptions = /** @class */ (function (_super) {
15541
- __extends$R(AuthenticationOptions, _super);
16080
+ __extends$Z(AuthenticationOptions, _super);
15542
16081
  function AuthenticationOptions() {
15543
16082
  var _this = _super !== null && _super.apply(this, arguments) || this;
15544
16083
  /**
@@ -15582,7 +16121,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
15582
16121
  */
15583
16122
  _this.sasToken = undefined;
15584
16123
  /**
15585
- * Optionally provide an existing `AuthenticationContext` from the ADAL.js library.
16124
+ * Optionally provide an existing `PublicClientApplication` from the MSAL.js library.
15586
16125
  * This authentication context will be used to acquire the AAD token.
15587
16126
  * Only used with the AAD authentication type.
15588
16127
  * This auth context must be configured to use the same AAD app ID as `this.aadAppId`.
@@ -15605,7 +16144,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
15605
16144
  * @param aadAppId Azure AD App ID
15606
16145
  * @param aadTenant Azure AD Tenant Name
15607
16146
  * @param aadInstance An optional Azure AD Instance
15608
- * @param authContext An optional `AuthenticationContext` from the ADAL.js library
16147
+ * @param authContext An optional `PublicClientApplication` from the MSAL.js library
15609
16148
  */
15610
16149
  AuthenticationOptions.prototype.setAadProperties = function (clientId, aadAppId, aadTenant, aadInstance, authContext) {
15611
16150
  this.authType = exports.AuthenticationType.aad;
@@ -15722,13 +16261,13 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
15722
16261
  * Gets the worker count that will get created.
15723
16262
  */
15724
16263
  function getWorkerCount() {
15725
- return mapboxgl__default.workerCount;
16264
+ return maplibregl.workerCount;
15726
16265
  }
15727
16266
  /**
15728
16267
  * Gets the Maximum number of images (raster tiles, sprites, icons) to load in parallel
15729
16268
  */
15730
16269
  function getMaxParallelImageRequests() {
15731
- return mapboxgl__default.maxParallelImageRequests;
16270
+ return maplibregl.maxParallelImageRequests;
15732
16271
  }
15733
16272
  /**
15734
16273
  * Gets the default language that was provided.
@@ -15777,13 +16316,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
15777
16316
  * (e.g. a software WebGL renderer would be used).
15778
16317
  */
15779
16318
  function isSupported(failIfMajorPerformanceCaveat) {
16319
+ var result;
15780
16320
  // Always return false for IE since we don't support it ourselves.
15781
- if (UserAgent.isIE()) {
15782
- return false;
15783
- }
15784
- return mapboxgl__default.supported({
15785
- failIfMajorPerformanceCaveat: failIfMajorPerformanceCaveat
15786
- });
16321
+ result = !UserAgent.isIE();
16322
+ return result;
15787
16323
  }
15788
16324
  /**
15789
16325
  * Sets your authentication options as the default options in the atlas namespace
@@ -15840,7 +16376,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
15840
16376
  */
15841
16377
  function setWorkerCount(workerCount) {
15842
16378
  if (workerCount > 0) {
15843
- mapboxgl__default.workerCount = workerCount;
16379
+ maplibregl.workerCount = workerCount;
15844
16380
  hasWorkerCount = true;
15845
16381
  }
15846
16382
  }
@@ -15851,7 +16387,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
15851
16387
  */
15852
16388
  function setMaxParallelImageRequests(maxParallelImageRequests) {
15853
16389
  if (maxParallelImageRequests > 0) {
15854
- mapboxgl__default.maxParallelImageRequests = maxParallelImageRequests;
16390
+ maplibregl.maxParallelImageRequests = maxParallelImageRequests;
15855
16391
  hasMaxParallelImageRequests = true;
15856
16392
  }
15857
16393
  }
@@ -15966,7 +16502,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
15966
16502
  * created and destroyed.
15967
16503
  */
15968
16504
  function prewarm() {
15969
- mapboxgl__default.prewarm();
16505
+ maplibregl.prewarm();
15970
16506
  }
15971
16507
  /**
15972
16508
  * Clears up resources that have previously been created by `atlas.prewarm()`.
@@ -15975,7 +16511,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
15975
16511
  * in your application.
15976
16512
  */
15977
16513
  function clearPrewarmedResources() {
15978
- mapboxgl__default.clearPrewarmedResources();
16514
+ maplibregl.clearPrewarmedResources();
15979
16515
  }
15980
16516
  /**
15981
16517
  * Returns if authentication options are set.
@@ -16139,7 +16675,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
16139
16675
  return Media;
16140
16676
  }());
16141
16677
 
16142
- var __extends$S = (window && window.__extends) || (function () {
16678
+ var __extends$_ = (window && window.__extends) || (function () {
16143
16679
  var extendStatics = function (d, b) {
16144
16680
  extendStatics = Object.setPrototypeOf ||
16145
16681
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -16158,7 +16694,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
16158
16694
  * The options for a CopyrightControl object.
16159
16695
  */
16160
16696
  var CopyrightControlOptions = /** @class */ (function (_super) {
16161
- __extends$S(CopyrightControlOptions, _super);
16697
+ __extends$_(CopyrightControlOptions, _super);
16162
16698
  function CopyrightControlOptions() {
16163
16699
  var _this = _super !== null && _super.apply(this, arguments) || this;
16164
16700
  /**
@@ -16187,7 +16723,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
16187
16723
  return CopyrightControlOptions;
16188
16724
  }(Options));
16189
16725
 
16190
- var __extends$T = (window && window.__extends) || (function () {
16726
+ var __extends$$ = (window && window.__extends) || (function () {
16191
16727
  var extendStatics = function (d, b) {
16192
16728
  extendStatics = Object.setPrototypeOf ||
16193
16729
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -16206,7 +16742,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
16206
16742
  * @private
16207
16743
  */
16208
16744
  var CopyrightControl = /** @class */ (function (_super) {
16209
- __extends$T(CopyrightControl, _super);
16745
+ __extends$$(CopyrightControl, _super);
16210
16746
  function CopyrightControl(options) {
16211
16747
  var _this = _super.call(this) || this;
16212
16748
  _this.textAttribution = function (options) {
@@ -16312,7 +16848,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
16312
16848
  this.logoAnchor = document.createElement("a");
16313
16849
  this.logoAnchor.className = "azure-map-logo";
16314
16850
  this.logoAnchor.href = "https://aka.ms/azuremaps";
16315
- this.logoAnchor.setAttribute("aria-label", "Microsoft");
16851
+ this.logoAnchor.setAttribute("aria-label", "Visit azure.microsoft.com");
16316
16852
  this.logoAnchor.setAttribute("target", "_blank");
16317
16853
  this.container.appendChild(this.logoAnchor);
16318
16854
  this.logoTooltip = buildAccessibleTooltip("Visit azure.microsoft.com");
@@ -16328,8 +16864,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
16328
16864
  return CopyrightControl;
16329
16865
  }(ControlBase));
16330
16866
 
16331
- var __assign$4 = (window && window.__assign) || function () {
16332
- __assign$4 = Object.assign || function(t) {
16867
+ var __assign$6 = (window && window.__assign) || function () {
16868
+ __assign$6 = Object.assign || function(t) {
16333
16869
  for (var s, i = 1, n = arguments.length; i < n; i++) {
16334
16870
  s = arguments[i];
16335
16871
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
@@ -16337,7 +16873,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
16337
16873
  }
16338
16874
  return t;
16339
16875
  };
16340
- return __assign$4.apply(this, arguments);
16876
+ return __assign$6.apply(this, arguments);
16341
16877
  };
16342
16878
 
16343
16879
  var __awaiter$2 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
@@ -16405,6 +16941,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
16405
16941
  function AccessibleMapDelegate(map) {
16406
16942
  var _this = this;
16407
16943
  this.addToMap = function () {
16944
+ if (_this.mapViewDesc != null) {
16945
+ // AccessibleMapDelegate is already initialized and added to the map.
16946
+ return;
16947
+ }
16408
16948
  _this.initializeMapLiveStateInfo();
16409
16949
  _this.initializeMapStyleInfo();
16410
16950
  _this.createMapKeyBindingInfo();
@@ -16480,6 +17020,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
16480
17020
  40
16481
17021
  ];
16482
17022
  // accessibility recommendation: After using any of the map shortcut keys, NVDA should not read all the shortcut keys again.
17023
+ // // TODO: this should be this.map._getMap().getCanvas
16483
17024
  var mapCanvas = _this.map._getMap()._canvas;
16484
17025
  mapCanvas === null || mapCanvas === void 0 ? void 0 : mapCanvas.addEventListener('keyup', function (event) {
16485
17026
  if (baseShortcutKeyCodes.find(function (code) { return event.keyCode === code; })) {
@@ -16533,17 +17074,14 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
16533
17074
  var trafficOptions = _this.map.getTraffic();
16534
17075
  if (trafficOptions.flow !== "none") {
16535
17076
  var trafficFlowComponent = _this.map.layers.getLayerById("traffic_" + trafficOptions.flow);
16536
- if (!trafficFlowComponent && ['absolute', 'relative-delay'].includes(trafficOptions.flow)) {
16537
- // Fallback to relative if deprecated flow type is used
16538
- trafficFlowComponent = _this.map.layers.getLayerById("traffic_relative");
16539
- }
16540
17077
  if (trafficFlowComponent) {
16541
- _this.lastFlowMode = trafficFlowComponent.getId().replace("traffic_", "");
17078
+ _this.lastFlowMode = trafficOptions.flow;
16542
17079
  trafficFlowComponent._updateLayoutProperty("visibility", "visible", "none");
16543
17080
  }
16544
17081
  }
16545
17082
  };
16546
17083
  this.removeFromMap = function () {
17084
+ var trafficOptions = _this.map.getTraffic();
16547
17085
  if (_this.lastFlowMode != "none") {
16548
17086
  var trafficFlowComponent = _this.map.layers.getLayerById("traffic_" + _this.lastFlowMode);
16549
17087
  if (trafficFlowComponent) {
@@ -16562,7 +17100,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
16562
17100
  return FlowServiceDelegate;
16563
17101
  }());
16564
17102
 
16565
- var __extends$U = (window && window.__extends) || (function () {
17103
+ var __extends$10 = (window && window.__extends) || (function () {
16566
17104
  var extendStatics = function (d, b) {
16567
17105
  extendStatics = Object.setPrototypeOf ||
16568
17106
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -16581,7 +17119,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
16581
17119
  * The options for enabling/disabling user interaction with the map.
16582
17120
  */
16583
17121
  var UserInteractionOptions = /** @class */ (function (_super) {
16584
- __extends$U(UserInteractionOptions, _super);
17122
+ __extends$10(UserInteractionOptions, _super);
16585
17123
  function UserInteractionOptions() {
16586
17124
  var _this = _super !== null && _super.apply(this, arguments) || this;
16587
17125
  /**
@@ -16972,8 +17510,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
16972
17510
  return ControlManager;
16973
17511
  }());
16974
17512
 
16975
- var __assign$5 = (window && window.__assign) || function () {
16976
- __assign$5 = Object.assign || function(t) {
17513
+ var __assign$7 = (window && window.__assign) || function () {
17514
+ __assign$7 = Object.assign || function(t) {
16977
17515
  for (var s, i = 1, n = arguments.length; i < n; i++) {
16978
17516
  s = arguments[i];
16979
17517
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
@@ -16981,7 +17519,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
16981
17519
  }
16982
17520
  return t;
16983
17521
  };
16984
- return __assign$5.apply(this, arguments);
17522
+ return __assign$7.apply(this, arguments);
16985
17523
  };
16986
17524
  /**
16987
17525
  * @private
@@ -17025,7 +17563,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
17025
17563
  case "sourcedata":
17026
17564
  case "styledata":
17027
17565
  modifiedCallback = function (data) {
17028
- 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 && {
17566
+ var mapEventData = __assign$7(__assign$7({ dataType: data.dataType }, (data.dataType === "source" && __assign$7(__assign$7(__assign$7({ isSourceLoaded: data.isSourceLoaded }, (data.sourceDataType && { sourceDataType: data.sourceDataType })), { source: _this.map.sources.getById(data.sourceId) }), (data.tile && {
17029
17567
  tile: {
17030
17568
  id: {
17031
17569
  x: data.tile.tileID.canonical.x,
@@ -17802,7 +18340,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
17802
18340
  var timeoutId_1;
17803
18341
  var timedOut_1 = false;
17804
18342
  // Use the map to send the request so transformRequest is used.
17805
- _this.map._sendRequest(imageSrc, "Image").then(function (response) {
18343
+ _this.map._sendRequest(imageSrc, "Image" /* Image */).then(function (response) {
17806
18344
  return !timedOut_1 ? response.blob() : undefined;
17807
18345
  }).then(function (blob) {
17808
18346
  if (!timedOut_1 && blob) {
@@ -17910,7 +18448,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
17910
18448
  return ImageSpriteManager;
17911
18449
  }());
17912
18450
 
17913
- var __extends$V = (window && window.__extends) || (function () {
18451
+ var __extends$11 = (window && window.__extends) || (function () {
17914
18452
  var extendStatics = function (d, b) {
17915
18453
  extendStatics = Object.setPrototypeOf ||
17916
18454
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -17942,7 +18480,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
17942
18480
  * @private
17943
18481
  */
17944
18482
  var FundamentalMapLayer = /** @class */ (function (_super) {
17945
- __extends$V(FundamentalMapLayer, _super);
18483
+ __extends$11(FundamentalMapLayer, _super);
17946
18484
  /**
17947
18485
  * Constructs a base layer used to represent the base, transit, and labels layers.
17948
18486
  * @param mbLayers The stylesheet used to define the style sources and style layers.
@@ -17974,11 +18512,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
17974
18512
  try {
17975
18513
  for (var _b = __values$c(this.layers), _c = _b.next(); !_c.done; _c = _b.next()) {
17976
18514
  var layer = _c.value;
17977
- if (typeof layer.source === "string") {
18515
+ if ('source' in layer && typeof layer.source === "string") {
17978
18516
  // If the layer's source is just a string id use that.
17979
18517
  ids.add(layer.source);
17980
18518
  }
17981
- else if (layer.source) {
18519
+ else if ('source' in layer && layer.source) {
17982
18520
  // If the layer has an inline source definition the id will match the layer's.
17983
18521
  ids.add(layer.id);
17984
18522
  }
@@ -18178,6 +18716,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
18178
18716
  // If adding a SourceBuildingLayer the source associated must also be added.
18179
18717
  if (layer instanceof SourceBuildingLayer) {
18180
18718
  this.map._getMap().addSource(layer._getSourceId(), layer._buildSource());
18719
+ // we also need the abstraction for those source building layers added to the map if it is not already there
18720
+ this.map.sources.setSourceState(layer._getSourceWrapper());
18181
18721
  }
18182
18722
  var mbBefore = this._getMapboxBefore(before);
18183
18723
  try {
@@ -18548,6 +19088,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
18548
19088
  if (userLayerIndex != -1) {
18549
19089
  this.userLayers.splice(userLayerIndex, 1);
18550
19090
  }
19091
+ if (layer instanceof SourceBuildingLayer) {
19092
+ this.map.sources.unsetSourceState(layer._getSourceId());
19093
+ }
18551
19094
  tempLayer.onRemove();
18552
19095
  };
18553
19096
  return LayerManager;
@@ -18718,123 +19261,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
18718
19261
  return PopupManager;
18719
19262
  }());
18720
19263
 
18721
- var __extends$W = (window && window.__extends) || (function () {
18722
- var extendStatics = function (d, b) {
18723
- extendStatics = Object.setPrototypeOf ||
18724
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
18725
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
18726
- return extendStatics(d, b);
18727
- };
18728
- return function (d, b) {
18729
- if (typeof b !== "function" && b !== null)
18730
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
18731
- extendStatics(d, b);
18732
- function __() { this.constructor = d; }
18733
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
18734
- };
18735
- })();
18736
- var __assign$6 = (window && window.__assign) || function () {
18737
- __assign$6 = Object.assign || function(t) {
18738
- for (var s, i = 1, n = arguments.length; i < n; i++) {
18739
- s = arguments[i];
18740
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
18741
- t[p] = s[p];
18742
- }
18743
- return t;
18744
- };
18745
- return __assign$6.apply(this, arguments);
18746
- };
18747
- /**
18748
- * Used to represent the fundamental map source.
18749
- * @private
18750
- */
18751
- var FundamentalMapSource = /** @class */ (function (_super) {
18752
- __extends$W(FundamentalMapSource, _super);
18753
- /**
18754
- * Constructs a source from the contents of a layer resource file.
18755
- * @param id The source's id.
18756
- * @param sourceDef The sources entry of the resource file.
18757
- * @param options The query parameters to add to the urls listed in the resource file.
18758
- */
18759
- function FundamentalMapSource(id, sourceDef, options) {
18760
- var _this = _super.call(this, id) || this;
18761
- _this.source = _this._modifySource(sourceDef, options);
18762
- return _this;
18763
- }
18764
- /**
18765
- * @internal
18766
- */
18767
- FundamentalMapSource.prototype._buildSource = function () {
18768
- return this.source;
18769
- };
18770
- /**
18771
- * @internal
18772
- */
18773
- FundamentalMapSource.prototype._isDeepEqual = function (other) {
18774
- if (this.constructor !== other.constructor) {
18775
- return false;
18776
- }
18777
- var source = this.source;
18778
- var otherSource = other.source;
18779
- var baseEqual = source.type === otherSource.type &&
18780
- source.url === otherSource.url
18781
- && ((source.tiles === undefined && otherSource.tiles === undefined) ||
18782
- (source.tiles && otherSource.tiles && source.tiles.length === otherSource.tiles.length && source.tiles.every(function (value, idx) { return value === otherSource.tiles[idx]; })))
18783
- && source.minzoom === otherSource.minzoom
18784
- && source.maxzoom === otherSource.maxzoom
18785
- && source.bounds === otherSource.bounds
18786
- && source.attribution === otherSource.attribution;
18787
- var rasterEqual = source.type !== "raster" || (source.type === "raster"
18788
- && source.type === otherSource.type
18789
- && source.tileSize === otherSource.tileSize
18790
- && source.scheme === otherSource.scheme);
18791
- var rasterDemEqual = source.type !== "raster-dem" || (source.type === "raster-dem"
18792
- && source.type === otherSource.type
18793
- && source.tileSize === otherSource.tileSize
18794
- && source.encoding === otherSource.encoding);
18795
- var vectorEqual = source.type !== "vector" || (source.type === "vector"
18796
- && source.type === otherSource.type
18797
- && source.promoteId === otherSource.promoteId
18798
- && source.scheme === otherSource.scheme);
18799
- return baseEqual && rasterEqual && rasterDemEqual && vectorEqual;
18800
- };
18801
- /**
18802
- * Updates the source info to convert the tiles to url strings.
18803
- * @param sourceDef The original source info.
18804
- * @param options The query parameters to add to the tile urls.
18805
- */
18806
- FundamentalMapSource.prototype._modifySource = function (sourceDef, options) {
18807
- if (sourceDef.tiles) {
18808
- var tileStrings = sourceDef.tiles.map(function (tile) {
18809
- if (typeof tile === "string") {
18810
- return tile;
18811
- }
18812
- var tileUrl = new Url({
18813
- domain: constants.domainPlaceHolder,
18814
- path: tile.path,
18815
- queryParams: __assign$6(__assign$6({}, options), tile.queryParams)
18816
- });
18817
- return tileUrl.toString();
18818
- });
18819
- sourceDef.tiles = tileStrings;
18820
- }
18821
- else if (sourceDef.url) {
18822
- sourceDef.url = (typeof sourceDef.url === "string") ?
18823
- sourceDef.url :
18824
- new Url({
18825
- domain: constants.domainPlaceHolder,
18826
- path: sourceDef.url.path,
18827
- queryParams: __assign$6(__assign$6({}, options), sourceDef.url.queryParams)
18828
- }).toString();
18829
- }
18830
- else {
18831
- throw new Error("Source definition must define a TileJSON 'url' or a 'tiles' array.");
18832
- }
18833
- return sourceDef;
18834
- };
18835
- return FundamentalMapSource;
18836
- }(Source));
18837
-
18838
19264
  var __values$f = (window && window.__values) || function(o) {
18839
19265
  var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
18840
19266
  if (m) return m.call(o);
@@ -19007,6 +19433,23 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
19007
19433
  this._removeSource(source, update);
19008
19434
  }
19009
19435
  };
19436
+ /**
19437
+ * @internal
19438
+ */
19439
+ SourceManager.prototype.setSourceState = function (newSource, shouldInvokeAddEvent) {
19440
+ if (shouldInvokeAddEvent === void 0) { shouldInvokeAddEvent = true; }
19441
+ this.sources.set(newSource.getId(), newSource);
19442
+ newSource._setMap(this.map, shouldInvokeAddEvent);
19443
+ };
19444
+ /**
19445
+ * @internal
19446
+ */
19447
+ SourceManager.prototype.unsetSourceState = function (id) {
19448
+ if (this.sources.has(id)) {
19449
+ this.sources.get(id)._setMap(null);
19450
+ this.sources.delete(id);
19451
+ }
19452
+ };
19010
19453
  SourceManager.prototype._removeSource = function (source, update) {
19011
19454
  var id = source instanceof Source ? source.getId() : source;
19012
19455
  if (this.sources.has(id)) {
@@ -19014,8 +19457,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
19014
19457
  this.map._getMap().removeSource(id);
19015
19458
  }
19016
19459
  if (!this.map._getMap().getSource(id) || !update) {
19017
- this.sources.get(id)._setMap(null);
19018
- this.sources.delete(id);
19460
+ this.unsetSourceState(id);
19019
19461
  }
19020
19462
  else {
19021
19463
  throw new Error("One or more layers have a dependency on the source '" + id + "'");
@@ -19032,8 +19474,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
19032
19474
  throw new Error("'" + source.getId() + "' is already added to the map");
19033
19475
  }
19034
19476
  else {
19035
- this.sources.get(source.getId())._setMap(null);
19036
- this.sources.delete(source.getId());
19477
+ this.unsetSourceState(source.getId());
19037
19478
  }
19038
19479
  }
19039
19480
  if (update) {
@@ -19045,8 +19486,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
19045
19486
  }
19046
19487
  this.map._getMap().addSource(source.getId(), source._buildSource());
19047
19488
  }
19048
- this.sources.set(source.getId(), source);
19049
- source._setMap(this.map);
19489
+ this.setSourceState(source);
19050
19490
  };
19051
19491
  /**
19052
19492
  * Converts an array of features as returned by one of Mapbox's query*Features(...) function
@@ -19088,64 +19528,90 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
19088
19528
  };
19089
19529
  /**
19090
19530
  * Sync SourceManager with mapbox sources.
19531
+ * This function is responsible for creating wrappers for mapbox sources
19532
+ * and setting the approperiate sourceManager state with them
19091
19533
  * @internal
19092
19534
  */
19093
19535
  SourceManager.prototype._syncSources = function (sources) {
19094
19536
  var _this = this;
19095
- if (sources) {
19096
- Object.keys(sources).forEach(function (sourceId) {
19097
- var sourceToAdd = sources[sourceId];
19098
- var newSource;
19099
- if (sourceToAdd.type === "vector") {
19537
+ if (!sources) {
19538
+ console.warn('syncSources called with no style sources which is unexpected.');
19539
+ return;
19540
+ }
19541
+ // 1. add / update the source wrappers
19542
+ Object.keys(sources)
19543
+ .map(function (sourceId) {
19544
+ var sourceToAdd = sources[sourceId];
19545
+ var newSource;
19546
+ switch (sourceToAdd.type) {
19547
+ case 'vector':
19548
+ case 'raster':
19549
+ case 'raster-dem': {
19100
19550
  newSource = new FundamentalMapSource(sourceId, {
19101
19551
  name: sourceId,
19102
19552
  tiles: sourceToAdd.tiles,
19103
- type: "vector",
19104
- url: sourceToAdd.url
19553
+ type: sourceToAdd.type,
19554
+ url: sourceToAdd.url,
19555
+ tileSize: 'tileSize' in sourceToAdd ? sourceToAdd.tileSize : undefined
19105
19556
  });
19557
+ break;
19106
19558
  }
19107
- else if (sourceToAdd.type === "raster") {
19108
- newSource = new FundamentalMapSource(sourceId, {
19109
- name: sourceId,
19110
- tiles: sourceToAdd.tiles,
19111
- type: "raster",
19112
- url: sourceToAdd.url
19559
+ case 'canvas': {
19560
+ newSource = new CanvasSource(sourceId, sourceToAdd);
19561
+ break;
19562
+ }
19563
+ case 'geojson': {
19564
+ var dataSource = new DataSource(sourceId, {
19565
+ maxZoom: sourceToAdd.maxzoom,
19566
+ cluster: sourceToAdd.cluster,
19567
+ clusterRadius: sourceToAdd.clusterRadius,
19568
+ tolerance: sourceToAdd.tolerance,
19569
+ lineMetrics: sourceToAdd.lineMetrics,
19570
+ clusterProperties: sourceToAdd.clusterProperties,
19571
+ buffer: sourceToAdd.buffer,
19572
+ clusterMinPoints: sourceToAdd.clusterMinPoints,
19573
+ generateId: sourceToAdd.generateId,
19574
+ promoteId: sourceToAdd.promoteId,
19575
+ filter: sourceToAdd.filter,
19576
+ // attribution?: sourceToAdd.attribution
19113
19577
  });
19578
+ if (typeof sourceToAdd.data !== 'string' && sourceToAdd.data !== undefined) {
19579
+ dataSource._addNoUpdate(sourceToAdd.data);
19580
+ }
19581
+ newSource = dataSource;
19582
+ break;
19114
19583
  }
19115
- else {
19116
- // Do not throw for the source of unknown type.
19117
- // throw new Error(`Unable to construct source with ID ${sourceId}.`);
19118
- // no other handling for the source we don't sync into the state here
19119
- return;
19584
+ case 'image': {
19585
+ newSource = new ImageSource(sourceId, sourceToAdd);
19586
+ break;
19120
19587
  }
19121
- if (!_this.sources.has(sourceId)) {
19122
- _this.sources.set(sourceId, newSource);
19123
- newSource._setMap(_this.map);
19588
+ case 'video': {
19589
+ newSource = new VideoSource(sourceId, sourceToAdd);
19590
+ break;
19124
19591
  }
19125
- else if (_this.sources.has(sourceId) && !_this.sources.get(sourceId)._isDeepEqual(newSource)) {
19126
- // source with same id but different properties: update
19127
- _this.sources.set(sourceId, newSource);
19128
- newSource._setMap(_this.map, false);
19592
+ default: {
19593
+ newSource = new UnknownSource(sourceId, sourceToAdd);
19129
19594
  }
19130
- });
19131
- // counter-intuitive: below is a bug and will do nothing since Object.keys(this.sources) will always return [], it should rather be:
19132
- // Array.from(this.sources.keys()).forEach(sourceId => {
19133
- // however, we have seen the first party users are compensating for this with their code containing explicit azm.sources.remove but not containing the check for existing
19134
- // such removal will cause the exception, since the source would already be removed
19135
- //
19136
- // given this bug was here historically, we keep the removal unfixed here (already fixed in v3) to make sure we don't cause any unintented side effects for existing users
19137
- // Object.keys(this.sources).forEach(sourceId => {
19138
- // if (!sources.hasOwnProperty(sourceId)) {
19139
- // this.sources.get(sourceId)._setMap(null);
19140
- // this.sources.delete(sourceId);
19141
- // }
19142
- // });
19143
- }
19595
+ }
19596
+ return newSource;
19597
+ }).forEach(function (newSource) {
19598
+ // use deep equality of underlying maplibre sources to determine if the source has been updated or overriden on style update
19599
+ var existing = _this.sources.get(newSource.getId());
19600
+ var isUpdate = existing && newSource._isDeepEqual(existing);
19601
+ if (!isUpdate && existing) {
19602
+ _this.unsetSourceState(existing.getId());
19603
+ }
19604
+ _this.setSourceState(newSource, !isUpdate);
19605
+ });
19606
+ // 2. remove the source wrappers that are not in the style
19607
+ Array.from(this.sources.keys())
19608
+ .filter(function (sourceId) { return !(sourceId in sources); })
19609
+ .forEach(function (sourceId) { return _this.unsetSourceState(sourceId); });
19144
19610
  };
19145
19611
  return SourceManager;
19146
19612
  }());
19147
19613
 
19148
- var __extends$X = (window && window.__extends) || (function () {
19614
+ var __extends$12 = (window && window.__extends) || (function () {
19149
19615
  var extendStatics = function (d, b) {
19150
19616
  extendStatics = Object.setPrototypeOf ||
19151
19617
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -19164,7 +19630,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
19164
19630
  * The options for animating changes to the map control's camera.
19165
19631
  */
19166
19632
  var AnimationOptions = /** @class */ (function (_super) {
19167
- __extends$X(AnimationOptions, _super);
19633
+ __extends$12(AnimationOptions, _super);
19168
19634
  function AnimationOptions() {
19169
19635
  var _this = _super !== null && _super.apply(this, arguments) || this;
19170
19636
  /**
@@ -19188,7 +19654,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
19188
19654
  return AnimationOptions;
19189
19655
  }(Options));
19190
19656
 
19191
- var __extends$Y = (window && window.__extends) || (function () {
19657
+ var __extends$13 = (window && window.__extends) || (function () {
19192
19658
  var extendStatics = function (d, b) {
19193
19659
  extendStatics = Object.setPrototypeOf ||
19194
19660
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -19207,7 +19673,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
19207
19673
  * Represent the amount of padding in pixels to add to the side of a BoundingBox when setting the camera of a map.
19208
19674
  */
19209
19675
  var Padding = /** @class */ (function (_super) {
19210
- __extends$Y(Padding, _super);
19676
+ __extends$13(Padding, _super);
19211
19677
  function Padding() {
19212
19678
  var _this = _super !== null && _super.apply(this, arguments) || this;
19213
19679
  /**
@@ -19239,7 +19705,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
19239
19705
  return Padding;
19240
19706
  }(Options));
19241
19707
 
19242
- var __extends$Z = (window && window.__extends) || (function () {
19708
+ var __extends$14 = (window && window.__extends) || (function () {
19243
19709
  var extendStatics = function (d, b) {
19244
19710
  extendStatics = Object.setPrototypeOf ||
19245
19711
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -19290,7 +19756,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
19290
19756
  * The options for setting the bounds of the map control's camera.
19291
19757
  */
19292
19758
  var CameraBoundsOptions = /** @class */ (function (_super) {
19293
- __extends$Z(CameraBoundsOptions, _super);
19759
+ __extends$14(CameraBoundsOptions, _super);
19294
19760
  function CameraBoundsOptions() {
19295
19761
  var _this = _super !== null && _super.apply(this, arguments) || this;
19296
19762
  /**
@@ -19361,7 +19827,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
19361
19827
  return CameraBoundsOptions;
19362
19828
  }(Options));
19363
19829
 
19364
- var __extends$_ = (window && window.__extends) || (function () {
19830
+ var __extends$15 = (window && window.__extends) || (function () {
19365
19831
  var extendStatics = function (d, b) {
19366
19832
  extendStatics = Object.setPrototypeOf ||
19367
19833
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -19380,7 +19846,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
19380
19846
  * The options for setting the map control's camera.
19381
19847
  */
19382
19848
  var CameraOptions = /** @class */ (function (_super) {
19383
- __extends$_(CameraOptions, _super);
19849
+ __extends$15(CameraOptions, _super);
19384
19850
  function CameraOptions() {
19385
19851
  var _this = _super !== null && _super.apply(this, arguments) || this;
19386
19852
  /**
@@ -19426,6 +19892,18 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
19426
19892
  * @default 20
19427
19893
  */
19428
19894
  _this.maxZoom = 20;
19895
+ /**
19896
+ * The minimum pitch that the map can be pitched to during the animation. Must be between 0 and 85, and less than or equal to `maxPitch`.
19897
+ * Default `0`.
19898
+ * @default 0
19899
+ */
19900
+ _this.minPitch = 0;
19901
+ /**
19902
+ * The maximum pitch that the map can be pitched to during the animation. Must be between 0 and 85, and greater than or equal to `minPitch`
19903
+ * Default `60`.
19904
+ * @default 60
19905
+ */
19906
+ _this.maxPitch = 60;
19429
19907
  /**
19430
19908
  * A bounding box in which to constrain the viewable map area to.
19431
19909
  * Users won't be able to pan the center of the map outside of this bounding box.
@@ -19439,7 +19917,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
19439
19917
  return CameraOptions;
19440
19918
  }(Options));
19441
19919
 
19442
- var __extends$$ = (window && window.__extends) || (function () {
19920
+ var __extends$16 = (window && window.__extends) || (function () {
19443
19921
  var extendStatics = function (d, b) {
19444
19922
  extendStatics = Object.setPrototypeOf ||
19445
19923
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -19458,7 +19936,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
19458
19936
  * The options for a layer of the map.
19459
19937
  */
19460
19938
  var LayerOptions$1 = /** @class */ (function (_super) {
19461
- __extends$$(LayerOptions, _super);
19939
+ __extends$16(LayerOptions, _super);
19462
19940
  function LayerOptions() {
19463
19941
  var _this = _super !== null && _super.apply(this, arguments) || this;
19464
19942
  /**
@@ -19491,7 +19969,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
19491
19969
  return LayerOptions;
19492
19970
  }(Options));
19493
19971
 
19494
- var __extends$10 = (window && window.__extends) || (function () {
19972
+ var __extends$17 = (window && window.__extends) || (function () {
19495
19973
  var extendStatics = function (d, b) {
19496
19974
  extendStatics = Object.setPrototypeOf ||
19497
19975
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -19511,7 +19989,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
19511
19989
  * @deprecated Use BubbleLayerOptions with atlas.layer.BubbleLayer instead.
19512
19990
  */
19513
19991
  var CircleLayerOptions = /** @class */ (function (_super) {
19514
- __extends$10(CircleLayerOptions, _super);
19992
+ __extends$17(CircleLayerOptions, _super);
19515
19993
  function CircleLayerOptions() {
19516
19994
  var _this = _super !== null && _super.apply(this, arguments) || this;
19517
19995
  /**
@@ -19543,7 +20021,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
19543
20021
  return CircleLayerOptions;
19544
20022
  }(LayerOptions$1));
19545
20023
 
19546
- var __extends$11 = (window && window.__extends) || (function () {
20024
+ var __extends$18 = (window && window.__extends) || (function () {
19547
20025
  var extendStatics = function (d, b) {
19548
20026
  extendStatics = Object.setPrototypeOf ||
19549
20027
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -19563,7 +20041,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
19563
20041
  * @deprecated Use LineLayerOptions with atlas.layer.LineLayer instead.
19564
20042
  */
19565
20043
  var LinestringLayerOptions = /** @class */ (function (_super) {
19566
- __extends$11(LinestringLayerOptions, _super);
20044
+ __extends$18(LinestringLayerOptions, _super);
19567
20045
  function LinestringLayerOptions() {
19568
20046
  var _this = _super !== null && _super.apply(this, arguments) || this;
19569
20047
  /**
@@ -19599,7 +20077,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
19599
20077
  return LinestringLayerOptions;
19600
20078
  }(LayerOptions$1));
19601
20079
 
19602
- var __extends$12 = (window && window.__extends) || (function () {
20080
+ var __extends$19 = (window && window.__extends) || (function () {
19603
20081
  var extendStatics = function (d, b) {
19604
20082
  extendStatics = Object.setPrototypeOf ||
19605
20083
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -19619,7 +20097,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
19619
20097
  * @deprecated Use SymbolLayerOptions with atlas.layer.SymbolLayer instead.
19620
20098
  */
19621
20099
  var PinLayerOptions = /** @class */ (function (_super) {
19622
- __extends$12(PinLayerOptions, _super);
20100
+ __extends$19(PinLayerOptions, _super);
19623
20101
  function PinLayerOptions() {
19624
20102
  var _this = _super !== null && _super.apply(this, arguments) || this;
19625
20103
  /**
@@ -19669,7 +20147,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
19669
20147
  return PinLayerOptions;
19670
20148
  }(LayerOptions$1));
19671
20149
 
19672
- var __extends$13 = (window && window.__extends) || (function () {
20150
+ var __extends$1a = (window && window.__extends) || (function () {
19673
20151
  var extendStatics = function (d, b) {
19674
20152
  extendStatics = Object.setPrototypeOf ||
19675
20153
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -19689,7 +20167,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
19689
20167
  * @deprecated Use new PolygonLayerOptions with atlas.layer.PolygonLayer instead.
19690
20168
  */
19691
20169
  var PolygonLayerOptions$1 = /** @class */ (function (_super) {
19692
- __extends$13(PolygonLayerOptions, _super);
20170
+ __extends$1a(PolygonLayerOptions, _super);
19693
20171
  function PolygonLayerOptions() {
19694
20172
  var _this = _super !== null && _super.apply(this, arguments) || this;
19695
20173
  /**
@@ -19712,7 +20190,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
19712
20190
  return PolygonLayerOptions;
19713
20191
  }(LayerOptions$1));
19714
20192
 
19715
- var __extends$14 = (window && window.__extends) || (function () {
20193
+ var __extends$1b = (window && window.__extends) || (function () {
19716
20194
  var extendStatics = function (d, b) {
19717
20195
  extendStatics = Object.setPrototypeOf ||
19718
20196
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -19732,7 +20210,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
19732
20210
  * @deprecated Use TileLayerOptions with atlas.layer.TileLayer instead.
19733
20211
  */
19734
20212
  var RasterLayerOptions = /** @class */ (function (_super) {
19735
- __extends$14(RasterLayerOptions, _super);
20213
+ __extends$1b(RasterLayerOptions, _super);
19736
20214
  function RasterLayerOptions() {
19737
20215
  var _this = _super !== null && _super.apply(this, arguments) || this;
19738
20216
  /**
@@ -19744,7 +20222,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
19744
20222
  return RasterLayerOptions;
19745
20223
  }(LayerOptions$1));
19746
20224
 
19747
- var __extends$15 = (window && window.__extends) || (function () {
20225
+ var __extends$1c = (window && window.__extends) || (function () {
19748
20226
  var extendStatics = function (d, b) {
19749
20227
  extendStatics = Object.setPrototypeOf ||
19750
20228
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -19763,7 +20241,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
19763
20241
  * The options for the map's lighting.
19764
20242
  */
19765
20243
  var LightOptions = /** @class */ (function (_super) {
19766
- __extends$15(LightOptions, _super);
20244
+ __extends$1c(LightOptions, _super);
19767
20245
  function LightOptions() {
19768
20246
  var _this = _super !== null && _super.apply(this, arguments) || this;
19769
20247
  /**
@@ -19803,7 +20281,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
19803
20281
  return LightOptions;
19804
20282
  }(Options));
19805
20283
 
19806
- var __extends$16 = (window && window.__extends) || (function () {
20284
+ var __extends$1d = (window && window.__extends) || (function () {
19807
20285
  var extendStatics = function (d, b) {
19808
20286
  extendStatics = Object.setPrototypeOf ||
19809
20287
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -19854,7 +20332,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
19854
20332
  * The options for the map's style.
19855
20333
  */
19856
20334
  var StyleOptions = /** @class */ (function (_super) {
19857
- __extends$16(StyleOptions, _super);
20335
+ __extends$1d(StyleOptions, _super);
19858
20336
  function StyleOptions() {
19859
20337
  var _this = _super !== null && _super.apply(this, arguments) || this;
19860
20338
  /**
@@ -19911,6 +20389,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
19911
20389
  * If false all buildings will be rendered as just their footprints.
19912
20390
  * Default `false`
19913
20391
  * @default false
20392
+ * @deprecated
19914
20393
  */
19915
20394
  _this.showBuildingModels = false;
19916
20395
  /**
@@ -20016,7 +20495,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
20016
20495
  return StyleOptions;
20017
20496
  }(Options));
20018
20497
 
20019
- var __extends$17 = (window && window.__extends) || (function () {
20498
+ var __extends$1e = (window && window.__extends) || (function () {
20020
20499
  var extendStatics = function (d, b) {
20021
20500
  extendStatics = Object.setPrototypeOf ||
20022
20501
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -20031,8 +20510,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
20031
20510
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
20032
20511
  };
20033
20512
  })();
20034
- var __assign$7 = (window && window.__assign) || function () {
20035
- __assign$7 = Object.assign || function(t) {
20513
+ var __assign$8 = (window && window.__assign) || function () {
20514
+ __assign$8 = Object.assign || function(t) {
20036
20515
  for (var s, i = 1, n = arguments.length; i < n; i++) {
20037
20516
  s = arguments[i];
20038
20517
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
@@ -20040,7 +20519,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
20040
20519
  }
20041
20520
  return t;
20042
20521
  };
20043
- return __assign$7.apply(this, arguments);
20522
+ return __assign$8.apply(this, arguments);
20044
20523
  };
20045
20524
  var __values$i = (window && window.__values) || function(o) {
20046
20525
  var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
@@ -20079,14 +20558,14 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
20079
20558
  : transformers.slice(1).reduce(function (chained, transform) {
20080
20559
  return function (url, resourceType) {
20081
20560
  var resourceParams = chained(url, resourceType);
20082
- return __assign$7(__assign$7({}, resourceParams), transform(resourceParams.url, resourceType));
20561
+ return __assign$8(__assign$8({}, resourceParams), transform(resourceParams.url, resourceType));
20083
20562
  };
20084
20563
  }, transformers[0]); };
20085
20564
  /**
20086
20565
  * Global properties used in all atlas service requests.
20087
20566
  */
20088
20567
  var ServiceOptions = /** @class */ (function (_super) {
20089
- __extends$17(ServiceOptions, _super);
20568
+ __extends$1e(ServiceOptions, _super);
20090
20569
  function ServiceOptions() {
20091
20570
  var _this = _super !== null && _super.apply(this, arguments) || this;
20092
20571
  /**
@@ -20228,9 +20707,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
20228
20707
  * Validation takes significant(few hundred ms) time to process styles during initial load.
20229
20708
  * Can be set to false for production environment to improve performance.
20230
20709
  * @internal
20231
- * @default 'true'
20710
+ * @default 'false'
20232
20711
  */
20233
- _this.validateStyle = true;
20712
+ _this.validateStyle = false;
20234
20713
  return _this;
20235
20714
  }
20236
20715
  /**
@@ -20317,7 +20796,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
20317
20796
  }
20318
20797
  // reassign properties from legacy mapConfiguration to new structure if needed
20319
20798
  if (merged.mapConfiguration && typeof merged.mapConfiguration !== 'string') {
20320
- merged.mapConfiguration = __assign$7(__assign$7({}, merged.mapConfiguration), { defaultConfiguration: merged.mapConfiguration.defaultConfiguration || merged.mapConfiguration['defaultStyle'], configurations: merged.mapConfiguration.configurations || merged.mapConfiguration['styles'] });
20799
+ merged.mapConfiguration = __assign$8(__assign$8({}, merged.mapConfiguration), { defaultConfiguration: merged.mapConfiguration.defaultConfiguration || merged.mapConfiguration['defaultStyle'], configurations: merged.mapConfiguration.configurations || merged.mapConfiguration['styles'] });
20321
20800
  }
20322
20801
  this._transformers = __spreadArray$7(__spreadArray$7([], __read$c(currentTransforms || [])), __read$c(transformersToMerge.filter(function (toMerge) { return !currentTransforms.includes(toMerge); })));
20323
20802
  if (this.transformRequest && !this._transformers.includes(this.transformRequest)) {
@@ -20372,11 +20851,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
20372
20851
  * @internal
20373
20852
  */
20374
20853
  LayerGroupComparator.getLayerGroup = function (layer) {
20375
- var _a;
20376
- if ((layer === null || layer === void 0 ? void 0 : layer.metadata) && layer.metadata['microsoft.maps:layerGroup']) {
20854
+ if (typeof layer !== 'string' && layer.metadata && layer.metadata['microsoft.maps:layerGroup']) {
20377
20855
  return layer.metadata['microsoft.maps:layerGroup'];
20378
20856
  }
20379
- var layerId = (_a = layer === null || layer === void 0 ? void 0 : layer.id) !== null && _a !== void 0 ? _a : layer;
20857
+ var layerId = typeof layer !== 'string' ? layer.id : layer;
20380
20858
  if (!layerId.startsWith("microsoft.")) {
20381
20859
  return undefined;
20382
20860
  }
@@ -20504,8 +20982,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
20504
20982
  high_contrast_light: "High contrast (Light)"
20505
20983
  };
20506
20984
 
20507
- var __assign$8 = (window && window.__assign) || function () {
20508
- __assign$8 = Object.assign || function(t) {
20985
+ var __assign$9 = (window && window.__assign) || function () {
20986
+ __assign$9 = Object.assign || function(t) {
20509
20987
  for (var s, i = 1, n = arguments.length; i < n; i++) {
20510
20988
  s = arguments[i];
20511
20989
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
@@ -20513,7 +20991,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
20513
20991
  }
20514
20992
  return t;
20515
20993
  };
20516
- return __assign$8.apply(this, arguments);
20994
+ return __assign$9.apply(this, arguments);
20517
20995
  };
20518
20996
  var __awaiter$3 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
20519
20997
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -20572,6 +21050,17 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
20572
21050
  to[j] = from[i];
20573
21051
  return to;
20574
21052
  };
21053
+ var __values$j = (window && window.__values) || function(o) {
21054
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
21055
+ if (m) return m.call(o);
21056
+ if (o && typeof o.length === "number") return {
21057
+ next: function () {
21058
+ if (o && i >= o.length) o = void 0;
21059
+ return { value: o && o[i++], done: !o };
21060
+ }
21061
+ };
21062
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
21063
+ };
20575
21064
  /**
20576
21065
  * @private
20577
21066
  */
@@ -20584,7 +21073,16 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
20584
21073
  */
20585
21074
  function StyleManager(map, serviceOptions) {
20586
21075
  var _this = this;
20587
- this.definitions = function () { return _this.initPromise ? _this.initPromise : _this.initStyleset(); };
21076
+ this.definitions = function () {
21077
+ var resultPromise;
21078
+ if (_this.initPromise) {
21079
+ resultPromise = _this.initPromise;
21080
+ }
21081
+ else {
21082
+ resultPromise = _this.initStyleset();
21083
+ }
21084
+ return resultPromise;
21085
+ };
20588
21086
  /**
20589
21087
  * Compatibility indoor state used in styleDefinition filtering.
20590
21088
  * Legacy indoor module (2.0.6) will not set tilesetId
@@ -20683,20 +21181,46 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
20683
21181
  * Looks up the style type info from the style definitions: this is async unsafe
20684
21182
  */
20685
21183
  this._lookUp = function (options) {
20686
- var definitionsFetchError = _this.definitions().errorIfRejected();
20687
- var definitions = _this.definitions().resultIfResolved();
21184
+ var e_1, _a;
21185
+ var definitionsPromise = _this.definitions();
21186
+ var definitionsFetchError = definitionsPromise.errorIfRejected();
21187
+ var definitions = definitionsPromise.resultIfResolved();
20688
21188
  if (definitionsFetchError) {
20689
21189
  return null;
20690
21190
  }
20691
- else if (definitions === undefined) {
21191
+ else if (!definitions) {
20692
21192
  return null;
20693
21193
  }
20694
21194
  else {
20695
- return definitions.configurations.find(function (style) { return style.name === (options.style || definitions.defaultConfiguration); })
20696
- // retrieve default style definition unless option.style's one was found
20697
- || definitions.configurations.find(function (style) { return style.name === definitions.defaultConfiguration; })
20698
- // no default style in the mapConfiguration -> pick the first style
20699
- || definitions.configurations[0];
21195
+ var configrationsArray = definitions.configurations;
21196
+ // retrieve default style definition unless option.style's one was found
21197
+ var result = void 0;
21198
+ try {
21199
+ for (var configrationsArray_1 = __values$j(configrationsArray), configrationsArray_1_1 = configrationsArray_1.next(); !configrationsArray_1_1.done; configrationsArray_1_1 = configrationsArray_1.next()) {
21200
+ var style = configrationsArray_1_1.value;
21201
+ if (style.name === options.style) {
21202
+ // this result is the highest priority, can immediately return
21203
+ return style;
21204
+ }
21205
+ if (style.name === definitions.defaultConfiguration && !result) {
21206
+ // backup result, so dont break here yet.
21207
+ // Later in the loop there might be another one matching options.style
21208
+ result = style;
21209
+ }
21210
+ }
21211
+ }
21212
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
21213
+ finally {
21214
+ try {
21215
+ if (configrationsArray_1_1 && !configrationsArray_1_1.done && (_a = configrationsArray_1.return)) _a.call(configrationsArray_1);
21216
+ }
21217
+ finally { if (e_1) throw e_1.error; }
21218
+ }
21219
+ // no default style in the mapConfiguration, pick the first style
21220
+ if (!result) {
21221
+ result = configrationsArray[0];
21222
+ }
21223
+ return result;
20700
21224
  }
20701
21225
  };
20702
21226
  this._lookUpAsync = function (options) { return __awaiter$3(_this, void 0, void 0, function () {
@@ -20829,7 +21353,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
20829
21353
  var ensureAuthentication = this.map.authentication ? this.map.authentication.initialize() : Promise.resolve();
20830
21354
  newPromise = new HijackablePromise(ensureAuthentication.then(function () { return _this._request(_this.serviceOptions.domain, constants.styleResourcePath + "/mapconfigurations/metadata/" + _this.serviceOptions.mapConfiguration, "StyleDefinitions"
20831
21355
  // reassign properties from legacy mapConfiguration to new structure if needed
20832
- ).then(function (definitions) { return (__assign$8(__assign$8({}, definitions), { defaultConfiguration: definitions.defaultConfiguration || definitions['defaultStyle'], configurations: definitions.configurations || definitions['styles'] })); }); }));
21356
+ ).then(function (definitions) { return (__assign$9(__assign$9({}, definitions), { defaultConfiguration: definitions.defaultConfiguration || definitions['defaultStyle'], configurations: definitions.configurations || definitions['styles'] })); }); }));
20833
21357
  }
20834
21358
  else {
20835
21359
  newPromise = HijackablePromise.resolve(this.serviceOptions.mapConfiguration);
@@ -20948,7 +21472,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
20948
21472
  });
20949
21473
  }
20950
21474
  return style;
20951
- }, __assign$8({}, nextStyle));
21475
+ }, __assign$9({}, nextStyle));
20952
21476
  };
20953
21477
  /**
20954
21478
  * @internal
@@ -20984,17 +21508,17 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
20984
21508
  else {
20985
21509
  transformStyleFunc = function (previousStyle, style) {
20986
21510
  // make sure we always have a shallow clone to prevent mutating explicit json(rather then url) styles being set
20987
- var nextStyle = __assign$8(__assign$8({}, style), { layers: __spreadArray$8([], __read$d(style.layers)), sources: __assign$8({}, style.sources) });
21511
+ var nextStyle = __assign$9(__assign$9({}, style), { layers: __spreadArray$8([], __read$d(style.layers)), sources: __assign$9({}, style.sources) });
20988
21512
  var shouldProgressiveLoading = (styleOptions.progressiveLoading &&
20989
21513
  // The feature only effective at the initial load.
20990
21514
  !_this.map._isLoaded());
20991
21515
  // Shallow-clone the style object and duplicate layer.layout properties to avoid side-effects.
20992
21516
  if (shouldProgressiveLoading && Array.isArray(style === null || style === void 0 ? void 0 : style.layers)) {
20993
- nextStyle = __assign$8({}, style);
21517
+ nextStyle = __assign$9({}, style);
20994
21518
  nextStyle.layers = nextStyle.layers.map(function (layer) {
20995
- var nextLayer = __assign$8({}, layer);
21519
+ var nextLayer = __assign$9({}, layer);
20996
21520
  if (layer.layout) {
20997
- nextLayer.layout = __assign$8({}, layer.layout);
21521
+ nextLayer.layout = __assign$9({}, layer.layout);
20998
21522
  }
20999
21523
  return nextLayer;
21000
21524
  });
@@ -21154,7 +21678,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
21154
21678
  protocol: "https",
21155
21679
  domain: domain,
21156
21680
  path: path,
21157
- queryParams: __assign$8((_c = {}, _c[constants.apiVersionQueryParameter] = this.serviceOptions.styleAPIVersion,
21681
+ queryParams: __assign$9((_c = {}, _c[constants.apiVersionQueryParameter] = this.serviceOptions.styleAPIVersion,
21158
21682
  // Generate a hash code to avoid cache conflict
21159
21683
  // TODO: Remove this once style version 2023-01-01 is publicly available
21160
21684
  _c.hash = StyleManager._hashCode((_a = this.map.authentication) === null || _a === void 0 ? void 0 : _a.getToken()), _c), customQueryParams)
@@ -21209,7 +21733,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
21209
21733
  */
21210
21734
  var isHMREnabled = function () { return 'ENVIRONMENT' in window && !!window['ENVIRONMENT']['hmr']; };
21211
21735
 
21212
- var __values$j = (window && window.__values) || function(o) {
21736
+ var __values$k = (window && window.__values) || function(o) {
21213
21737
  var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
21214
21738
  if (m) return m.call(o);
21215
21739
  if (o && typeof o.length === "number") return {
@@ -21244,7 +21768,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
21244
21768
  var e_1, _a;
21245
21769
  indicator = Array.isArray(indicator) ? indicator : [indicator];
21246
21770
  try {
21247
- for (var indicator_1 = __values$j(indicator), indicator_1_1 = indicator_1.next(); !indicator_1_1.done; indicator_1_1 = indicator_1.next()) {
21771
+ for (var indicator_1 = __values$k(indicator), indicator_1_1 = indicator_1.next(); !indicator_1_1.done; indicator_1_1 = indicator_1.next()) {
21248
21772
  var i = indicator_1_1.value;
21249
21773
  if (!this.indicators.has(i)) {
21250
21774
  this.indicators.add(i);
@@ -21278,7 +21802,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
21278
21802
  var e_2, _a;
21279
21803
  indicator = Array.isArray(indicator) ? indicator : [indicator];
21280
21804
  try {
21281
- for (var indicator_2 = __values$j(indicator), indicator_2_1 = indicator_2.next(); !indicator_2_1.done; indicator_2_1 = indicator_2.next()) {
21805
+ for (var indicator_2 = __values$k(indicator), indicator_2_1 = indicator_2.next(); !indicator_2_1.done; indicator_2_1 = indicator_2.next()) {
21282
21806
  var i = indicator_2_1.value;
21283
21807
  if (this.indicators.has(i)) {
21284
21808
  this.indicators.delete(i);
@@ -21326,7 +21850,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
21326
21850
  return AccessibleIndicatorManager;
21327
21851
  }());
21328
21852
 
21329
- var __extends$18 = (window && window.__extends) || (function () {
21853
+ var __extends$1f = (window && window.__extends) || (function () {
21330
21854
  var extendStatics = function (d, b) {
21331
21855
  extendStatics = Object.setPrototypeOf ||
21332
21856
  ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
@@ -21341,8 +21865,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
21341
21865
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
21342
21866
  };
21343
21867
  })();
21344
- var __assign$9 = (window && window.__assign) || function () {
21345
- __assign$9 = Object.assign || function(t) {
21868
+ var __assign$a = (window && window.__assign) || function () {
21869
+ __assign$a = Object.assign || function(t) {
21346
21870
  for (var s, i = 1, n = arguments.length; i < n; i++) {
21347
21871
  s = arguments[i];
21348
21872
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
@@ -21350,7 +21874,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
21350
21874
  }
21351
21875
  return t;
21352
21876
  };
21353
- return __assign$9.apply(this, arguments);
21877
+ return __assign$a.apply(this, arguments);
21354
21878
  };
21355
21879
  var __awaiter$4 = (window && window.__awaiter) || function (thisArg, _arguments, P, generator) {
21356
21880
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
@@ -21409,7 +21933,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
21409
21933
  to[j] = from[i];
21410
21934
  return to;
21411
21935
  };
21412
- var __values$k = (window && window.__values) || function(o) {
21936
+ var __values$l = (window && window.__values) || function(o) {
21413
21937
  var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
21414
21938
  if (m) return m.call(o);
21415
21939
  if (o && typeof o.length === "number") return {
@@ -21424,7 +21948,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
21424
21948
  * The control for a visual and interactive web map.
21425
21949
  */
21426
21950
  var Map$2 = /** @class */ (function (_super) {
21427
- __extends$18(Map, _super);
21951
+ __extends$1f(Map, _super);
21428
21952
  /**
21429
21953
  * Displays a map in the specified container.
21430
21954
  * @param container The id of the element where the map should be displayed.
@@ -21440,7 +21964,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
21440
21964
  * The callback used when styleOptions.autoResize is true.
21441
21965
  */
21442
21966
  _this._windowResizeCallback = function () { return _this.resize(); };
21443
- var successfulLoad = true;
21444
21967
  // Update global defaults based on which options were specified to this constructor.
21445
21968
  _this._updateGlobalDefaults(options);
21446
21969
  _this.serviceOptions = new ServiceOptions().merge(options);
@@ -21501,10 +22024,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
21501
22024
  if (_this.serviceOptions.transformRequest) {
21502
22025
  merge_1(requestParams, _this.serviceOptions.transformRequest(requestParams.url, resourceType));
21503
22026
  }
22027
+ // TODO: fix type variation
21504
22028
  return requestParams;
21505
22029
  }
21506
22030
  };
21507
- mapboxMap = new mapboxgl__default.Map(mapboxMapOptions);
22031
+ mapboxMap = new maplibregl.Map(mapboxMapOptions);
21508
22032
  }
21509
22033
  try {
21510
22034
  _this.map = mapboxMap;
@@ -21577,9 +22101,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
21577
22101
  _this.copyrightDelegate && _this.copyrightDelegate.addToMap();
21578
22102
  }).catch(function (reason) {
21579
22103
  var error = reason instanceof Error ? reason : new Error(reason);
21580
- if (_this.insights) {
21581
- _this.insights.trackException({ error: error });
21582
- }
21583
22104
  // Invoke the error event to report any errors initializing the styles or auth.
21584
22105
  var errorData = {
21585
22106
  map: _this,
@@ -21589,7 +22110,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
21589
22110
  _this.events.invoke("error", errorData);
21590
22111
  });
21591
22112
  // --> Set initial camera state of map
21592
- _this.setCamera(__assign$9(__assign$9({
22113
+ _this.setCamera(__assign$a(__assign$a({
21593
22114
  // Default minZoom to ensure the map doesn't zoom out to unsupported zoom levels.
21594
22115
  minZoom: 1 }, options), { type: "jump", duration: 0 }));
21595
22116
  _this.flowDelegate = new FlowServiceDelegate(_this);
@@ -21603,22 +22124,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
21603
22124
  }
21604
22125
  }
21605
22126
  catch (err) {
21606
- successfulLoad = false;
21607
- if (_this.insights) {
21608
- _this.insights.trackException({ error: err instanceof Error ? err : new Error(err) });
21609
- }
21610
22127
  throw err;
21611
22128
  }
21612
22129
  finally {
21613
- // Track the successful session load
21614
- if (_this.insights) {
21615
- _this.insights.trackEvent({ name: "MapLoad" }, {
21616
- success: successfulLoad,
21617
- supported: isSupported(false),
21618
- supportedWithPerformance: isSupported(true)
21619
- });
21620
- _this.insights.flush();
21621
- }
21622
22130
  }
21623
22131
  return _this;
21624
22132
  }
@@ -21693,6 +22201,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
21693
22201
  */
21694
22202
  Map.prototype.removeRequestTransformer = function (transformer) { this.serviceOptions.removeTransformer(transformer); };
21695
22203
  Map.prototype.setCamera = function (options, fromControl) {
22204
+ var _a;
21696
22205
  if (fromControl === void 0) { fromControl = false; }
21697
22206
  var mapboxCameraOptions;
21698
22207
  var maxBounds;
@@ -21701,13 +22210,22 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
21701
22210
  var cameraBoundsOptions = new CameraBoundsOptions()
21702
22211
  .merge({ maxZoom: this.getCamera().maxZoom }, options);
21703
22212
  var bounds = this._generateSafeBounds(cameraBoundsOptions.bounds);
21704
- mapboxCameraOptions = this.map.cameraForBounds(bounds, {
22213
+ var cameraForBoundsOptions = {
21705
22214
  padding: cameraBoundsOptions.padding,
21706
22215
  offset: cameraBoundsOptions.offset,
21707
22216
  maxZoom: cameraBoundsOptions.maxZoom
21708
- });
22217
+ };
22218
+ mapboxCameraOptions = this.map.cameraForBounds(bounds, cameraForBoundsOptions);
21709
22219
  if (!mapboxCameraOptions) {
21710
- throw new Error("The map cannot be fit to the current canvas with the given CameraBoundsOptions.");
22220
+ var currentContainer = (_a = this.map) === null || _a === void 0 ? void 0 : _a.getContainer();
22221
+ var errorDetails = {
22222
+ message: "The map cannot be fit to the current canvas with the given CameraBoundsOptions.",
22223
+ containerWidth: currentContainer === null || currentContainer === void 0 ? void 0 : currentContainer.clientWidth,
22224
+ containerHeight: currentContainer === null || currentContainer === void 0 ? void 0 : currentContainer.clientHeight,
22225
+ safeBounds: bounds,
22226
+ cameraForBoundsOptions: cameraForBoundsOptions
22227
+ };
22228
+ throw new Error(JSON.stringify(errorDetails));
21711
22229
  }
21712
22230
  if ('pitch' in options) {
21713
22231
  mapboxCameraOptions.pitch = options.pitch;
@@ -21715,6 +22233,12 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
21715
22233
  if ('bearing' in options) {
21716
22234
  mapboxCameraOptions.bearing = options.bearing;
21717
22235
  }
22236
+ if ('minPitch' in options) {
22237
+ this.map.setMinPitch(options.minPitch);
22238
+ }
22239
+ if ('maxPitch' in options) {
22240
+ this.map.setMaxPitch(options.maxPitch);
22241
+ }
21718
22242
  this.map.setMaxZoom(cameraBoundsOptions.maxZoom);
21719
22243
  this._invokeEvent("maxzoomchanged", this.map.getMaxZoom());
21720
22244
  maxBounds = this._generateSafeBounds(cameraBoundsOptions.maxBounds);
@@ -21739,6 +22263,12 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
21739
22263
  };
21740
22264
  this.map.setMinZoom(cameraOptions.minZoom);
21741
22265
  this.map.setMaxZoom(cameraOptions.maxZoom);
22266
+ if (cameraOptions.minPitch) {
22267
+ this.map.setMinPitch(cameraOptions.minPitch);
22268
+ }
22269
+ if (cameraOptions.maxPitch) {
22270
+ this.map.setMaxPitch(cameraOptions.maxPitch);
22271
+ }
21742
22272
  this._invokeEvent("minzoomchanged", this.map.getMinZoom());
21743
22273
  this._invokeEvent("maxzoomchanged", this.map.getMaxZoom());
21744
22274
  maxBounds = this._generateSafeBounds(cameraOptions.maxBounds);
@@ -21763,10 +22293,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
21763
22293
  this.map.jumpTo(mapboxCameraOptions, eventData);
21764
22294
  }
21765
22295
  else if (animOptions.type === "ease") {
21766
- this.map.easeTo(__assign$9(__assign$9({}, mapboxCameraOptions), mapboxAnimationOptions), eventData);
22296
+ this.map.easeTo(__assign$a(__assign$a({}, mapboxCameraOptions), mapboxAnimationOptions), eventData);
21767
22297
  }
21768
22298
  else if (animOptions.type === "fly") {
21769
- this.map.flyTo(__assign$9(__assign$9({}, mapboxCameraOptions), mapboxAnimationOptions), eventData);
22299
+ this.map.flyTo(__assign$a(__assign$a({}, mapboxCameraOptions), mapboxAnimationOptions), eventData);
21770
22300
  }
21771
22301
  };
21772
22302
  /**
@@ -21833,6 +22363,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
21833
22363
  if (newOptions.showTileBoundaries !== this.styleOptions.showTileBoundaries) {
21834
22364
  this.map.showTileBoundaries = newOptions.showTileBoundaries;
21835
22365
  }
22366
+ if (newOptions.showBuildingModels) {
22367
+ console.warn("showBuildingModels is deprecated.");
22368
+ }
21836
22369
  // Some delegates may rely on a styledata event to know when to check if the language changes.
21837
22370
  // If this function is restructured such that a styledata event won't always trigger
21838
22371
  // if the language is changed, then either those delegates need changed
@@ -22252,7 +22785,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
22252
22785
  Map.prototype.removeLayers = function (layerNames) {
22253
22786
  var e_1, _a;
22254
22787
  try {
22255
- for (var layerNames_1 = __values$k(layerNames), layerNames_1_1 = layerNames_1.next(); !layerNames_1_1.done; layerNames_1_1 = layerNames_1.next()) {
22788
+ for (var layerNames_1 = __values$l(layerNames), layerNames_1_1 = layerNames_1.next(); !layerNames_1_1.done; layerNames_1_1 = layerNames_1.next()) {
22256
22789
  var layerName = layerNames_1_1.value;
22257
22790
  // Previously calling removeLayers for layers that didn't exist in the map just did nothing.
22258
22791
  // Now, LayerManager will throw an error, so we need to check if the layer exists before calling remove.
@@ -22357,6 +22890,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
22357
22890
  }
22358
22891
  }
22359
22892
  if (this.trafficOptions.flow && this.trafficOptions.flow !== "none") {
22893
+ if (["absolute", "relative-delay"].includes(this.trafficOptions.flow)) {
22894
+ console.warn("The 'absolute' and 'relative-delay' flow options are deprecated. Please use 'relative' instead.");
22895
+ }
22360
22896
  try {
22361
22897
  if (this.trafficOptions.flow !== previousFlowOption) {
22362
22898
  this.flowDelegate.addToMap();
@@ -22447,7 +22983,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
22447
22983
  var e_2, _a;
22448
22984
  var positions = [];
22449
22985
  try {
22450
- for (var pixels_1 = __values$k(pixels), pixels_1_1 = pixels_1.next(); !pixels_1_1.done; pixels_1_1 = pixels_1.next()) {
22986
+ for (var pixels_1 = __values$l(pixels), pixels_1_1 = pixels_1.next(); !pixels_1_1.done; pixels_1_1 = pixels_1.next()) {
22451
22987
  var pixel = pixels_1_1.value;
22452
22988
  var lngLat = this.map.unproject(pixel);
22453
22989
  positions.push(new Position(lngLat.lng, lngLat.lat));
@@ -22470,7 +23006,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
22470
23006
  var e_3, _a;
22471
23007
  var pixels = [];
22472
23008
  try {
22473
- for (var positions_1 = __values$k(positions), positions_1_1 = positions_1.next(); !positions_1_1.done; positions_1_1 = positions_1.next()) {
23009
+ for (var positions_1 = __values$l(positions), positions_1_1 = positions_1.next(); !positions_1_1.done; positions_1_1 = positions_1.next()) {
22474
23010
  var position = positions_1_1.value;
22475
23011
  var point = this.map.project(position);
22476
23012
  pixels.push(new Pixel(point.x, point.y));
@@ -22507,6 +23043,21 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
22507
23043
  Map.prototype.triggerRepaint = function () {
22508
23044
  this.map.triggerRepaint();
22509
23045
  };
23046
+ /**
23047
+ * Loads a 3D terrain mesh, based on a "raster-dem" source.
23048
+ *
23049
+ * @param elevationSource elevation tile source
23050
+ * @param exaggeration the elevation exaggeration factor
23051
+ */
23052
+ Map.prototype.enableElevation = function (elevationSource, exaggeration) {
23053
+ this.map.setTerrain(typeof elevationSource === 'string' ? { source: elevationSource, exaggeration: exaggeration } : { source: elevationSource.getId(), exaggeration: exaggeration });
23054
+ };
23055
+ /**
23056
+ * Disables the 3D terrain mesh.
23057
+ */
23058
+ Map.prototype.disableElevation = function () {
23059
+ this.map.setTerrain(null);
23060
+ };
22510
23061
  /**
22511
23062
  * @internal
22512
23063
  */
@@ -22519,10 +23070,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
22519
23070
  Map.prototype._rebuildStyle = function (diff) {
22520
23071
  if (diff === void 0) { diff = true; }
22521
23072
  return __awaiter$4(this, void 0, void 0, function () {
22522
- var _this = this;
22523
23073
  return __generator$4(this, function (_a) {
22524
23074
  this.styles.setStyle(this.styleOptions, diff);
22525
- this.events.addOnce("stylechanged", function () { return _this.imageSprite._restoreImages(); });
23075
+ this.imageSprite._restoreImages();
22526
23076
  return [2 /*return*/];
22527
23077
  });
22528
23078
  });
@@ -22565,7 +23115,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
22565
23115
  // Send the fetch using the transformed parameters.
22566
23116
  return fetch(requestParams.url || url, {
22567
23117
  credentials: requestParams.credentials,
22568
- headers: __assign$9(__assign$9({}, headers), requestParams.headers),
23118
+ headers: __assign$a(__assign$a({}, headers), requestParams.headers),
22569
23119
  method: "GET",
22570
23120
  mode: "cors",
22571
23121
  });
@@ -22638,11 +23188,38 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
22638
23188
  if (this.removed) {
22639
23189
  return;
22640
23190
  }
22641
- // Check if the default style is set by the client and if it exists in the current style set
22642
- this.styles.definitions().then(function (mapConfiguration) {
22643
- if (!_this.styleOptions.style || !mapConfiguration.configurations.map(function (mapConfigurationStyle) { return mapConfigurationStyle.name; }).includes(_this.styleOptions.style)) {
23191
+ var styleDefinitionPromise = this.styles.definitions();
23192
+ styleDefinitionPromise.then(function (mapConfiguration) {
23193
+ var e_4, _a;
23194
+ // a flag indicating if need to set this.styleOptions.style
23195
+ var needSetStyleOptionStyle = true;
23196
+ // Check if the default style is set by the client and if it exists in the current style set
23197
+ if (_this.styleOptions.style) {
23198
+ try {
23199
+ for (var _b = __values$l(mapConfiguration.configurations), _c = _b.next(); !_c.done; _c = _b.next()) {
23200
+ var mapConfigurationStyle = _c.value;
23201
+ if (_this.styleOptions.style === mapConfigurationStyle.name) {
23202
+ needSetStyleOptionStyle = false;
23203
+ break;
23204
+ }
23205
+ }
23206
+ }
23207
+ catch (e_4_1) { e_4 = { error: e_4_1 }; }
23208
+ finally {
23209
+ try {
23210
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
23211
+ }
23212
+ finally { if (e_4) throw e_4.error; }
23213
+ }
23214
+ }
23215
+ if (needSetStyleOptionStyle) {
23216
+ // FIXME: this is very counter intuitive and unstable
23217
+ // see details: https://msazure.visualstudio.com/One/_workitems/edit/19409195
22644
23218
  _this.styleOptions.style = mapConfiguration.defaultConfiguration;
22645
23219
  }
23220
+ // it appears this line is overwriting everything done above
23221
+ // but "styleOptions" has actually been changed by line 1578.
23222
+ // NEED BETTER logic
22646
23223
  _this.styleOptions = styleOptions;
22647
23224
  _this._rebuildStyle(diff);
22648
23225
  });
@@ -23304,7 +23881,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
23304
23881
  domain: env.staticAssetsDomain,
23305
23882
  path: "sdk/javascript/mapcontrol/" + Version.getEndpointVersion() + "/mapbox-gl-rtl-text.min.js"
23306
23883
  });
23307
- mapboxgl.setRTLTextPlugin(rtlPluginUrl.toString(), function (error) {
23884
+ maplibregl.setRTLTextPlugin(rtlPluginUrl.toString(), function (error) {
23308
23885
  if (error) {
23309
23886
  console.warn(error);
23310
23887
  }