azure-maps-control 3.2.0 → 3.2.1

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.
@@ -91,12 +91,12 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
91
91
 
92
92
  var azuremapsMaplibreGlDev = {exports: {}};
93
93
 
94
- /* Build timestamp: Mon, 04 Mar 2024 19:21:28 GMT */
94
+ /* Build timestamp: Mon, 22 Apr 2024 08:56:33 GMT */
95
95
 
96
96
  (function (module, exports) {
97
97
  /**
98
98
  * The Azure Maps fork of MapLibre GL JS
99
- * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v4.0.2/LICENSE.txt
99
+ * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v4.1.2/LICENSE.txt
100
100
  */
101
101
  (function (global, factory) {
102
102
  module.exports = factory() ;
@@ -1281,9 +1281,16 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
1281
1281
  const body = yield response.blob();
1282
1282
  throw new AJAXError(response.status, response.statusText, requestParameters.url, body);
1283
1283
  }
1284
- const parsePromise = (requestParameters.type === 'arrayBuffer' || requestParameters.type === 'image') ? response.arrayBuffer() :
1285
- requestParameters.type === 'json' ? response.json() :
1286
- response.text();
1284
+ let parsePromise;
1285
+ if ((requestParameters.type === 'arrayBuffer' || requestParameters.type === 'image')) {
1286
+ parsePromise = response.arrayBuffer();
1287
+ }
1288
+ else if (requestParameters.type === 'json') {
1289
+ parsePromise = response.json();
1290
+ }
1291
+ else {
1292
+ parsePromise = response.text();
1293
+ }
1287
1294
  const result = yield parsePromise;
1288
1295
  if (abortController.signal.aborted) {
1289
1296
  throw createAbortError();
@@ -1354,7 +1361,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
1354
1361
  return protocolLoadFn(requestParameters, abortController);
1355
1362
  }
1356
1363
  if (isWorker(self) && self.worker && self.worker.actor) {
1357
- return self.worker.actor.sendAsync({ type: 'getResource', data: requestParameters, targetMapId: GLOBAL_DISPATCHER_ID }, abortController);
1364
+ return self.worker.actor.sendAsync({ type: "GR" /* MessageType.getResource */, data: requestParameters, targetMapId: GLOBAL_DISPATCHER_ID }, abortController);
1358
1365
  }
1359
1366
  }
1360
1367
  if (!isFileURL(requestParameters.url)) {
@@ -1362,7 +1369,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
1362
1369
  return makeFetchRequest(requestParameters, abortController);
1363
1370
  }
1364
1371
  if (isWorker(self) && self.worker && self.worker.actor) {
1365
- return self.worker.actor.sendAsync({ type: 'getResource', data: requestParameters, mustQueue: true, targetMapId: GLOBAL_DISPATCHER_ID }, abortController);
1372
+ return self.worker.actor.sendAsync({ type: "GR" /* MessageType.getResource */, data: requestParameters, mustQueue: true, targetMapId: GLOBAL_DISPATCHER_ID }, abortController);
1366
1373
  }
1367
1374
  }
1368
1375
  return makeXMLHttpRequest(requestParameters, abortController);
@@ -11879,6 +11886,12 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
11879
11886
  this.pluginStatus = state.pluginStatus;
11880
11887
  this.pluginURL = state.pluginURL;
11881
11888
  }
11889
+ getState() {
11890
+ return {
11891
+ pluginStatus: this.pluginStatus,
11892
+ pluginURL: this.pluginURL
11893
+ };
11894
+ }
11882
11895
  setMethods(rtlTextPlugin) {
11883
11896
  this.applyArabicShaping = rtlTextPlugin.applyArabicShaping;
11884
11897
  this.processBidirectionalText = rtlTextPlugin.processBidirectionalText;
@@ -15693,6 +15706,17 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
15693
15706
  */
15694
15707
 
15695
15708
  var ortho = orthoNO;
15709
+ /**
15710
+ * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)
15711
+ *
15712
+ * @param {ReadonlyMat4} a The first matrix.
15713
+ * @param {ReadonlyMat4} b The second matrix.
15714
+ * @returns {Boolean} True if the matrices are equal, false otherwise.
15715
+ */
15716
+
15717
+ function exactEquals$5(a, b) {
15718
+ return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7] && a[8] === b[8] && a[9] === b[9] && a[10] === b[10] && a[11] === b[11] && a[12] === b[12] && a[13] === b[13] && a[14] === b[14] && a[15] === b[15];
15719
+ }
15696
15720
  /**
15697
15721
  * Returns whether or not the matrices have approximately the same elements in the same position.
15698
15722
  *
@@ -21223,12 +21247,11 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
21223
21247
  // conversion here.
21224
21248
  const resolvedTokens = layer.getValueAndResolveTokens('text-field', evaluationFeature, canonical, availableImages);
21225
21249
  const formattedText = Formatted.factory(resolvedTokens);
21226
- if (containsRTLText(formattedText)) {
21227
- this.hasRTLText = true;
21228
- }
21229
- if (!this.hasRTLText || // non-rtl text so can proceed safely
21250
+ // on this instance: if hasRTLText is already true, all future calls to containsRTLText can be skipped.
21251
+ const bucketHasRTLText = this.hasRTLText = (this.hasRTLText || containsRTLText(formattedText));
21252
+ if (!bucketHasRTLText || // non-rtl text so can proceed safely
21230
21253
  rtlWorkerPlugin.getRTLTextPluginStatus() === 'unavailable' || // We don't intend to lazy-load the rtl text plugin, so proceed with incorrect shaping
21231
- this.hasRTLText && rtlWorkerPlugin.isParsed() // Use the rtlText plugin to shape text
21254
+ bucketHasRTLText && rtlWorkerPlugin.isParsed() // Use the rtlText plugin to shape text
21232
21255
  ) {
21233
21256
  text = transformText(formattedText, layer, evaluationFeature);
21234
21257
  }
@@ -24868,6 +24891,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
24868
24891
  exports.equals = equals$6;
24869
24892
  exports.evaluateSizeForFeature = evaluateSizeForFeature;
24870
24893
  exports.evaluateSizeForZoom = evaluateSizeForZoom;
24894
+ exports.exactEquals = exactEquals$5;
24871
24895
  exports.extend = extend;
24872
24896
  exports.filterObject = filterObject;
24873
24897
  exports.findLineIntersection = findLineIntersection;
@@ -25109,6 +25133,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
25109
25133
  featureIndex.bucketLayerIDs.push(family.map((l) => l.id));
25110
25134
  }
25111
25135
  }
25136
+ // options.glyphDependencies looks like: {"SomeFontName":{"10":true,"32":true}}
25137
+ // this line makes an object like: {"SomeFontName":[10,32]}
25112
25138
  const stacks = performance.mapObject(options.glyphDependencies, (glyphs) => Object.keys(glyphs).map(Number));
25113
25139
  this.inFlightDependencies.forEach((request) => request === null || request === void 0 ? void 0 : request.abort());
25114
25140
  this.inFlightDependencies = [];
@@ -25116,21 +25142,21 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
25116
25142
  if (Object.keys(stacks).length) {
25117
25143
  const abortController = new AbortController();
25118
25144
  this.inFlightDependencies.push(abortController);
25119
- getGlyphsPromise = actor.sendAsync({ type: 'getGlyphs', data: { stacks, source: this.source, tileID: this.tileID, type: 'glyphs' } }, abortController);
25145
+ getGlyphsPromise = actor.sendAsync({ type: "GG" /* MessageType.getGlyphs */, data: { stacks, source: this.source, tileID: this.tileID, type: 'glyphs' } }, abortController);
25120
25146
  }
25121
25147
  const icons = Object.keys(options.iconDependencies);
25122
25148
  let getIconsPromise = Promise.resolve({});
25123
25149
  if (icons.length) {
25124
25150
  const abortController = new AbortController();
25125
25151
  this.inFlightDependencies.push(abortController);
25126
- getIconsPromise = actor.sendAsync({ type: 'getImages', data: { icons, source: this.source, tileID: this.tileID, type: 'icons' } }, abortController);
25152
+ getIconsPromise = actor.sendAsync({ type: "GI" /* MessageType.getImages */, data: { icons, source: this.source, tileID: this.tileID, type: 'icons' } }, abortController);
25127
25153
  }
25128
25154
  const patterns = Object.keys(options.patternDependencies);
25129
25155
  let getPatternsPromise = Promise.resolve({});
25130
25156
  if (patterns.length) {
25131
25157
  const abortController = new AbortController();
25132
25158
  this.inFlightDependencies.push(abortController);
25133
- getPatternsPromise = actor.sendAsync({ type: 'getImages', data: { icons: patterns, source: this.source, tileID: this.tileID, type: 'patterns' } }, abortController);
25159
+ getPatternsPromise = actor.sendAsync({ type: "GI" /* MessageType.getImages */, data: { icons: patterns, source: this.source, tileID: this.tileID, type: 'patterns' } }, abortController);
25134
25160
  }
25135
25161
  const [glyphMap, iconMap, patternMap] = yield Promise.all([getGlyphsPromise, getIconsPromise, getPatternsPromise]);
25136
25162
  const glyphAtlas = new GlyphAtlas(glyphMap);
@@ -27180,8 +27206,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
27180
27206
  * @returns a promise that resolves when the data is loaded and parsed into a GeoJSON object
27181
27207
  */
27182
27208
  loadData(params) {
27183
- var _a;
27184
27209
  return performance.__awaiter(this, void 0, void 0, function* () {
27210
+ var _a;
27185
27211
  (_a = this._pendingRequest) === null || _a === void 0 ? void 0 : _a.abort();
27186
27212
  const perf = (params && params.request && params.request.collectResourceTiming) ?
27187
27213
  new performance.RequestPerformance(params.request) : false;
@@ -27358,37 +27384,37 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
27358
27384
  }
27359
27385
  performance.rtlWorkerPlugin.setMethods(rtlTextPlugin);
27360
27386
  };
27361
- this.actor.registerMessageHandler('loadDEMTile', (mapId, params) => {
27387
+ this.actor.registerMessageHandler("LDT" /* MessageType.loadDEMTile */, (mapId, params) => {
27362
27388
  return this._getDEMWorkerSource(mapId, params.source).loadTile(params);
27363
27389
  });
27364
- this.actor.registerMessageHandler('removeDEMTile', (mapId, params) => performance.__awaiter(this, void 0, void 0, function* () {
27390
+ this.actor.registerMessageHandler("RDT" /* MessageType.removeDEMTile */, (mapId, params) => performance.__awaiter(this, void 0, void 0, function* () {
27365
27391
  this._getDEMWorkerSource(mapId, params.source).removeTile(params);
27366
27392
  }));
27367
- this.actor.registerMessageHandler('getClusterExpansionZoom', (mapId, params) => performance.__awaiter(this, void 0, void 0, function* () {
27393
+ this.actor.registerMessageHandler("GCEZ" /* MessageType.getClusterExpansionZoom */, (mapId, params) => performance.__awaiter(this, void 0, void 0, function* () {
27368
27394
  return this._getWorkerSource(mapId, params.type, params.source).getClusterExpansionZoom(params);
27369
27395
  }));
27370
- this.actor.registerMessageHandler('getClusterChildren', (mapId, params) => performance.__awaiter(this, void 0, void 0, function* () {
27396
+ this.actor.registerMessageHandler("GCC" /* MessageType.getClusterChildren */, (mapId, params) => performance.__awaiter(this, void 0, void 0, function* () {
27371
27397
  return this._getWorkerSource(mapId, params.type, params.source).getClusterChildren(params);
27372
27398
  }));
27373
- this.actor.registerMessageHandler('getClusterLeaves', (mapId, params) => performance.__awaiter(this, void 0, void 0, function* () {
27399
+ this.actor.registerMessageHandler("GCL" /* MessageType.getClusterLeaves */, (mapId, params) => performance.__awaiter(this, void 0, void 0, function* () {
27374
27400
  return this._getWorkerSource(mapId, params.type, params.source).getClusterLeaves(params);
27375
27401
  }));
27376
- this.actor.registerMessageHandler('loadData', (mapId, params) => {
27402
+ this.actor.registerMessageHandler("LD" /* MessageType.loadData */, (mapId, params) => {
27377
27403
  return this._getWorkerSource(mapId, params.type, params.source).loadData(params);
27378
27404
  });
27379
- this.actor.registerMessageHandler('loadTile', (mapId, params) => {
27405
+ this.actor.registerMessageHandler("LT" /* MessageType.loadTile */, (mapId, params) => {
27380
27406
  return this._getWorkerSource(mapId, params.type, params.source).loadTile(params);
27381
27407
  });
27382
- this.actor.registerMessageHandler('reloadTile', (mapId, params) => {
27408
+ this.actor.registerMessageHandler("RT" /* MessageType.reloadTile */, (mapId, params) => {
27383
27409
  return this._getWorkerSource(mapId, params.type, params.source).reloadTile(params);
27384
27410
  });
27385
- this.actor.registerMessageHandler('abortTile', (mapId, params) => {
27411
+ this.actor.registerMessageHandler("AT" /* MessageType.abortTile */, (mapId, params) => {
27386
27412
  return this._getWorkerSource(mapId, params.type, params.source).abortTile(params);
27387
27413
  });
27388
- this.actor.registerMessageHandler('removeTile', (mapId, params) => {
27414
+ this.actor.registerMessageHandler("RMT" /* MessageType.removeTile */, (mapId, params) => {
27389
27415
  return this._getWorkerSource(mapId, params.type, params.source).removeTile(params);
27390
27416
  });
27391
- this.actor.registerMessageHandler('removeSource', (mapId, params) => performance.__awaiter(this, void 0, void 0, function* () {
27417
+ this.actor.registerMessageHandler("RS" /* MessageType.removeSource */, (mapId, params) => performance.__awaiter(this, void 0, void 0, function* () {
27392
27418
  if (!this.workerSources[mapId] ||
27393
27419
  !this.workerSources[mapId][params.type] ||
27394
27420
  !this.workerSources[mapId][params.type][params.source]) {
@@ -27400,22 +27426,28 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
27400
27426
  worker.removeSource(params);
27401
27427
  }
27402
27428
  }));
27403
- this.actor.registerMessageHandler('setReferrer', (_mapId, params) => performance.__awaiter(this, void 0, void 0, function* () {
27429
+ this.actor.registerMessageHandler("RM" /* MessageType.removeMap */, (mapId) => performance.__awaiter(this, void 0, void 0, function* () {
27430
+ delete this.layerIndexes[mapId];
27431
+ delete this.availableImages[mapId];
27432
+ delete this.workerSources[mapId];
27433
+ delete this.demWorkerSources[mapId];
27434
+ }));
27435
+ this.actor.registerMessageHandler("SR" /* MessageType.setReferrer */, (_mapId, params) => performance.__awaiter(this, void 0, void 0, function* () {
27404
27436
  this.referrer = params;
27405
27437
  }));
27406
- this.actor.registerMessageHandler('syncRTLPluginState', (mapId, params) => {
27438
+ this.actor.registerMessageHandler("SRPS" /* MessageType.syncRTLPluginState */, (mapId, params) => {
27407
27439
  return this._syncRTLPluginState(mapId, params);
27408
27440
  });
27409
- this.actor.registerMessageHandler('importScript', (_mapId, params) => performance.__awaiter(this, void 0, void 0, function* () {
27441
+ this.actor.registerMessageHandler("IS" /* MessageType.importScript */, (_mapId, params) => performance.__awaiter(this, void 0, void 0, function* () {
27410
27442
  this.self.importScripts(params);
27411
27443
  }));
27412
- this.actor.registerMessageHandler('setImages', (mapId, params) => {
27444
+ this.actor.registerMessageHandler("SI" /* MessageType.setImages */, (mapId, params) => {
27413
27445
  return this._setImages(mapId, params);
27414
27446
  });
27415
- this.actor.registerMessageHandler('updateLayers', (mapId, params) => performance.__awaiter(this, void 0, void 0, function* () {
27447
+ this.actor.registerMessageHandler("UL" /* MessageType.updateLayers */, (mapId, params) => performance.__awaiter(this, void 0, void 0, function* () {
27416
27448
  this._getLayerIndex(mapId).update(params.layers, params.removedIds);
27417
27449
  }));
27418
- this.actor.registerMessageHandler('setLayers', (mapId, params) => performance.__awaiter(this, void 0, void 0, function* () {
27450
+ this.actor.registerMessageHandler("SL" /* MessageType.setLayers */, (mapId, params) => performance.__awaiter(this, void 0, void 0, function* () {
27419
27451
  this._getLayerIndex(mapId).replace(params);
27420
27452
  }));
27421
27453
  }
@@ -27430,19 +27462,34 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
27430
27462
  }
27431
27463
  });
27432
27464
  }
27433
- _syncRTLPluginState(map, state) {
27465
+ _syncRTLPluginState(mapId, incomingState) {
27434
27466
  return performance.__awaiter(this, void 0, void 0, function* () {
27435
- performance.rtlWorkerPlugin.setState(state);
27436
- const pluginURL = performance.rtlWorkerPlugin.getPluginURL();
27437
- if (state.pluginStatus === 'loaded' && !performance.rtlWorkerPlugin.isParsed() && pluginURL != null) {
27438
- this.self.importScripts(pluginURL);
27439
- const complete = performance.rtlWorkerPlugin.isParsed();
27440
- if (complete) {
27441
- return complete;
27442
- }
27443
- throw new Error(`RTL Text Plugin failed to import scripts from ${pluginURL}`);
27467
+ // Parsed plugin cannot be changed, so just return its current state.
27468
+ if (performance.rtlWorkerPlugin.isParsed()) {
27469
+ return performance.rtlWorkerPlugin.getState();
27470
+ }
27471
+ if (incomingState.pluginStatus !== 'loading') {
27472
+ // simply sync and done
27473
+ performance.rtlWorkerPlugin.setState(incomingState);
27474
+ return incomingState;
27475
+ }
27476
+ const urlToLoad = incomingState.pluginURL;
27477
+ this.self.importScripts(urlToLoad);
27478
+ const complete = performance.rtlWorkerPlugin.isParsed();
27479
+ if (complete) {
27480
+ const loadedState = {
27481
+ pluginStatus: 'loaded',
27482
+ pluginURL: urlToLoad
27483
+ };
27484
+ performance.rtlWorkerPlugin.setState(loadedState);
27485
+ return loadedState;
27444
27486
  }
27445
- return false;
27487
+ // error case
27488
+ performance.rtlWorkerPlugin.setState({
27489
+ pluginStatus: 'error',
27490
+ pluginURL: ''
27491
+ });
27492
+ throw new Error(`RTL Text Plugin failed to import scripts from ${urlToLoad}`);
27446
27493
  });
27447
27494
  }
27448
27495
  _getAvailableImages(mapId) {
@@ -27520,11 +27567,15 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
27520
27567
  define('index', ['exports', './shared'], (function (exports, performance$1) {
27521
27568
  var name = "azuremaps-maplibre-gl";
27522
27569
  var description = "BSD licensed community fork of mapbox-gl, a WebGL interactive maps library";
27523
- var version$2 = "4.0.2";
27570
+ var version$2 = "4.1.2";
27524
27571
  var main = "dist/azuremaps-maplibre-gl.js";
27525
27572
  var style = "dist/azuremaps-maplibre-gl.css";
27526
27573
  var license = "BSD-3-Clause";
27574
+ var homepage = "https://maplibre.org/";
27527
27575
  var funding = "https://github.com/maplibre/maplibre-gl-js?sponsor=1";
27576
+ var bugs = {
27577
+ url: "https://github.com/maplibre/maplibre-gl-js/issues/"
27578
+ };
27528
27579
  var repository = {
27529
27580
  type: "git",
27530
27581
  url: "https://dev.azure.com/msazure/One/_git/Azure-IoT-Maps-maplibre-gl-js"
@@ -27574,7 +27625,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
27574
27625
  "@types/d3": "^7.4.3",
27575
27626
  "@types/diff": "^5.0.9",
27576
27627
  "@types/earcut": "^2.1.4",
27577
- "@types/eslint": "^8.56.2",
27628
+ "@types/eslint": "^8.56.7",
27578
27629
  "@types/gl": "^6.0.5",
27579
27630
  "@types/glob": "^8.1.0",
27580
27631
  "@types/jest": "^29.5.12",
@@ -27582,74 +27633,74 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
27582
27633
  "@types/minimist": "^1.2.5",
27583
27634
  "@types/murmurhash-js": "^1.0.6",
27584
27635
  "@types/nise": "^1.4.4",
27585
- "@types/node": "^20.11.19",
27636
+ "@types/node": "^20.12.6",
27586
27637
  "@types/offscreencanvas": "^2019.7.3",
27587
27638
  "@types/pixelmatch": "^5.2.6",
27588
27639
  "@types/pngjs": "^6.0.4",
27589
- "@types/react": "^18.2.56",
27590
- "@types/react-dom": "^18.2.19",
27640
+ "@types/react": "^18.2.75",
27641
+ "@types/react-dom": "^18.2.24",
27591
27642
  "@types/request": "^2.48.12",
27592
27643
  "@types/shuffle-seed": "^1.1.3",
27593
27644
  "@types/window-or-global": "^1.0.6",
27594
- "@typescript-eslint/eslint-plugin": "^7.0.0",
27595
- "@typescript-eslint/parser": "^6.21.0",
27596
- address: "^2.0.1",
27645
+ "@typescript-eslint/eslint-plugin": "^7.6.0",
27646
+ "@typescript-eslint/parser": "^7.6.0",
27647
+ address: "^2.0.2",
27597
27648
  benchmark: "^2.1.4",
27598
27649
  canvas: "^2.11.2",
27599
- cssnano: "^6.0.3",
27600
- d3: "^7.8.5",
27650
+ cssnano: "^6.1.2",
27651
+ d3: "^7.9.0",
27601
27652
  "d3-queue": "^3.0.7",
27602
- "devtools-protocol": "^0.0.1262051",
27653
+ "devtools-protocol": "^0.0.1284279",
27603
27654
  diff: "^5.2.0",
27604
27655
  "dts-bundle-generator": "^9.3.1",
27605
- eslint: "^8.56.0",
27656
+ eslint: "^8.57.0",
27606
27657
  "eslint-config-mourner": "^3.0.0",
27607
27658
  "eslint-plugin-html": "^8.0.0",
27608
27659
  "eslint-plugin-import": "^2.29.1",
27609
- "eslint-plugin-jest": "^27.9.0",
27610
- "eslint-plugin-react": "^7.33.2",
27660
+ "eslint-plugin-jest": "^28.2.0",
27661
+ "eslint-plugin-react": "^7.34.1",
27611
27662
  "eslint-plugin-tsdoc": "0.2.17",
27612
27663
  expect: "^29.7.0",
27613
- glob: "^10.3.10",
27664
+ glob: "^10.3.12",
27614
27665
  "is-builtin-module": "^3.2.1",
27615
27666
  jest: "^29.7.0",
27616
27667
  "jest-environment-jsdom": "^29.7.0",
27617
- "jest-monocart-coverage": "^1.0.2",
27668
+ "jest-monocart-coverage": "^1.1.0",
27618
27669
  "jest-webgl-canvas-mock": "^2.5.3",
27619
27670
  jsdom: "^24.0.0",
27620
27671
  "json-stringify-pretty-compact": "^4.0.0",
27621
27672
  minimist: "^1.2.8",
27622
27673
  "mock-geolocation": "^1.0.11",
27623
- "monocart-coverage-reports": "^2.5.0",
27674
+ "monocart-coverage-reports": "^2.7.8",
27624
27675
  nise: "^5.1.9",
27625
27676
  "npm-font-open-sans": "^1.1.0",
27626
27677
  "npm-run-all": "^4.1.5",
27627
27678
  "pdf-merger-js": "^5.1.1",
27628
27679
  pixelmatch: "^5.3.0",
27629
27680
  pngjs: "^7.0.0",
27630
- postcss: "^8.4.35",
27681
+ postcss: "^8.4.38",
27631
27682
  "postcss-cli": "^11.0.0",
27632
27683
  "postcss-inline-svg": "^6.0.0",
27633
27684
  "pretty-bytes": "^6.1.1",
27634
- puppeteer: "^22.1.0",
27685
+ puppeteer: "^22.6.3",
27635
27686
  react: "^18.2.0",
27636
27687
  "react-dom": "^18.2.0",
27637
- rollup: "^4.12.0",
27688
+ rollup: "^4.14.1",
27638
27689
  "rollup-plugin-sourcemaps": "^0.6.3",
27639
27690
  rw: "^1.3.3",
27640
27691
  semver: "^7.6.0",
27641
27692
  "shuffle-seed": "^1.1.6",
27642
27693
  "source-map-explorer": "^2.5.3",
27643
27694
  st: "^3.0.0",
27644
- stylelint: "^16.2.1",
27695
+ stylelint: "^16.3.1",
27645
27696
  "stylelint-config-standard": "^36.0.0",
27646
27697
  "ts-jest": "^29.1.2",
27647
27698
  "ts-node": "^10.9.2",
27648
27699
  tslib: "^2.6.2",
27649
- typedoc: "^0.25.8",
27700
+ typedoc: "^0.25.13",
27650
27701
  "typedoc-plugin-markdown": "^3.17.1",
27651
27702
  "typedoc-plugin-missing-exports": "^2.2.0",
27652
- typescript: "^5.3.3"
27703
+ typescript: "^5.4.4"
27653
27704
  };
27654
27705
  var overrides = {
27655
27706
  "postcss-inline-svg": {
@@ -27664,18 +27715,17 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
27664
27715
  "generate-shaders": "node --no-warnings --loader ts-node/esm build/generate-shaders.ts",
27665
27716
  "generate-struct-arrays": "node --no-warnings --loader ts-node/esm build/generate-struct-arrays.ts",
27666
27717
  "generate-style-code": "node --no-warnings --loader ts-node/esm build/generate-style-code.ts",
27667
- "generate-typings": "dts-bundle-generator --export-referenced-types --umd-module-name=maplibregl -o ./dist/azuremaps-maplibre-gl.d.ts ./src/index.ts",
27718
+ "generate-typings": "dts-bundle-generator --export-referenced-types --umd-module-name=maplibregl -o ./dist/maplibre-gl.d.ts ./src/index.ts",
27668
27719
  "generate-docs": "typedoc && node --no-warnings --loader ts-node/esm build/generate-docs.ts",
27669
27720
  "generate-images": "node --no-warnings --loader ts-node/esm build/generate-doc-images.ts",
27670
27721
  "build-dist": "npm run build-css && npm run generate-typings && npm run build-dev && npm run build-csp-dev && npm run build-prod && npm run build-csp",
27671
- "build-aml-package": "npm run build-dist && node ./build/build-aml-package.js",
27672
27722
  "build-dev": "rollup --configPlugin @rollup/plugin-typescript -c --environment BUILD:dev",
27673
27723
  "watch-dev": "rollup --configPlugin @rollup/plugin-typescript -c --environment BUILD:dev --watch",
27674
27724
  "build-prod": "rollup --configPlugin @rollup/plugin-typescript -c --environment BUILD:production",
27675
27725
  "build-csp": "rollup --configPlugin @rollup/plugin-typescript -c rollup.config.csp.ts",
27676
27726
  "build-csp-dev": "rollup --configPlugin @rollup/plugin-typescript -c rollup.config.csp.ts --environment BUILD:dev",
27677
- "build-css": "postcss -o dist/azuremaps-maplibre-gl.css src/css/azuremaps-maplibre-gl.css",
27678
- "watch-css": "postcss --watch -o dist/azuremaps-maplibre-gl.css src/css/azuremaps-maplibre-gl.css",
27727
+ "build-css": "postcss -o dist/maplibre-gl.css src/css/maplibre-gl.css",
27728
+ "watch-css": "postcss --watch -o dist/maplibre-gl.css src/css/maplibre-gl.css",
27679
27729
  "build-benchmarks": "npm run build-dev && rollup --configPlugin @rollup/plugin-typescript -c test/bench/rollup_config_benchmarks.ts",
27680
27730
  "watch-benchmarks": "rollup --configPlugin @rollup/plugin-typescript -c test/bench/rollup_config_benchmarks.ts --watch",
27681
27731
  "start-server": "st --no-cache -H 0.0.0.0 --port 9966 .",
@@ -27699,7 +27749,14 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
27699
27749
  "gl-stats": "node --no-warnings --loader ts-node/esm test/bench/gl-stats.ts",
27700
27750
  prepare: "npm run codegen",
27701
27751
  typecheck: "tsc --noEmit && tsc --project tsconfig.dist.json",
27702
- tsnode: "node --experimental-loader=ts-node/esm --no-warnings"
27752
+ tsnode: "node --experimental-loader=ts-node/esm --no-warnings",
27753
+ "build-aml-css": "postcss -o dist/azuremaps-maplibre-gl.css src/css/azuremaps-maplibre-gl.css",
27754
+ "watch-aml-css": "postcss --watch -o dist/azuremaps-maplibre-gl.css src/css/azuremaps-maplibre-gl.css",
27755
+ "build-es2017-dev": "rollup --configPlugin @rollup/plugin-typescript -c rollup.config.es2017.ts --environment BUILD:dev",
27756
+ "build-es2017": "rollup --configPlugin @rollup/plugin-typescript -c rollup.config.es2017.ts --environment BUILD:production",
27757
+ "generate-aml-typings": "dts-bundle-generator --export-referenced-types --umd-module-name=maplibregl -o ./dist/azuremaps-maplibre-gl.d.ts ./src/index.ts",
27758
+ "build-aml-dist": "npm run generate-aml-typings && run-p --print-label build-aml-css build-dev build-prod build-es2017-dev build-es2017",
27759
+ "build-aml-package": "npm run build-aml-dist && node ./build/build-aml-package.js"
27703
27760
  };
27704
27761
  var files = [
27705
27762
  "build/",
@@ -27718,7 +27775,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
27718
27775
  main: main,
27719
27776
  style: style,
27720
27777
  license: license,
27778
+ homepage: homepage,
27721
27779
  funding: funding,
27780
+ bugs: bugs,
27722
27781
  repository: repository,
27723
27782
  types: types,
27724
27783
  type: type,
@@ -28148,20 +28207,6 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
28148
28207
  })(ImageRequest || (ImageRequest = {}));
28149
28208
  ImageRequest.resetRequestQueue();
28150
28209
 
28151
- /**
28152
- * A type of MapLibre resource.
28153
- */
28154
- var ResourceType;
28155
- (function (ResourceType) {
28156
- ResourceType["Glyphs"] = "Glyphs";
28157
- ResourceType["Image"] = "Image";
28158
- ResourceType["Source"] = "Source";
28159
- ResourceType["SpriteImage"] = "SpriteImage";
28160
- ResourceType["SpriteJSON"] = "SpriteJSON";
28161
- ResourceType["Style"] = "Style";
28162
- ResourceType["Tile"] = "Tile";
28163
- ResourceType["Unknown"] = "Unknown";
28164
- })(ResourceType || (ResourceType = {}));
28165
28210
  class RequestManager {
28166
28211
  constructor(transformRequestFn) {
28167
28212
  this._transformRequestFn = transformRequestFn;
@@ -28231,9 +28276,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
28231
28276
  const jsonsMap = {};
28232
28277
  const imagesMap = {};
28233
28278
  for (const { id, url } of spriteArray) {
28234
- const jsonRequestParameters = requestManager.transformRequest(requestManager.normalizeSpriteURL(url, format, '.json'), ResourceType.SpriteJSON);
28279
+ const jsonRequestParameters = requestManager.transformRequest(requestManager.normalizeSpriteURL(url, format, '.json'), "SpriteJSON" /* ResourceType.SpriteJSON */);
28235
28280
  jsonsMap[id] = performance$1.getJSON(jsonRequestParameters, abortController);
28236
- const imageRequestParameters = requestManager.transformRequest(requestManager.normalizeSpriteURL(url, format, '.png'), ResourceType.SpriteImage);
28281
+ const imageRequestParameters = requestManager.transformRequest(requestManager.normalizeSpriteURL(url, format, '.png'), "SpriteImage" /* ResourceType.SpriteImage */);
28237
28282
  imagesMap[id] = ImageRequest.getImage(imageRequestParameters, abortController);
28238
28283
  }
28239
28284
  yield Promise.all([...Object.values(jsonsMap), ...Object.values(imagesMap)]);
@@ -28605,7 +28650,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
28605
28650
  return performance$1.__awaiter(this, void 0, void 0, function* () {
28606
28651
  const begin = range * 256;
28607
28652
  const end = begin + 255;
28608
- const request = requestManager.transformRequest(urlTemplate.replace('{fontstack}', fontstack).replace('{range}', `${begin}-${end}`), ResourceType.Glyphs);
28653
+ const request = requestManager.transformRequest(urlTemplate.replace('{fontstack}', fontstack).replace('{range}', `${begin}-${end}`), "Glyphs" /* ResourceType.Glyphs */);
28609
28654
  const response = yield performance$1.getArrayBuffer(request, new AbortController());
28610
28655
  if (!response || !response.data) {
28611
28656
  throw new Error(`Could not load glyph range. range: ${range}, ${begin}-${end}`);
@@ -29308,7 +29353,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
29308
29353
  function getGlobalDispatcher() {
29309
29354
  if (!globalDispatcher) {
29310
29355
  globalDispatcher = new Dispatcher(getGlobalWorkerPool(), performance$1.GLOBAL_DISPATCHER_ID);
29311
- globalDispatcher.registerMessageHandler('getResource', (_mapId, params, abortController) => {
29356
+ globalDispatcher.registerMessageHandler("GR" /* MessageType.getResource */, (_mapId, params, abortController) => {
29312
29357
  return performance$1.makeRequest(params, abortController);
29313
29358
  });
29314
29359
  }
@@ -29472,7 +29517,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
29472
29517
  return performance$1.__awaiter(this, void 0, void 0, function* () {
29473
29518
  let tileJSON = options;
29474
29519
  if (options.url) {
29475
- const response = yield performance$1.getJSON(requestManager.transformRequest(options.url, ResourceType.Source), abortController);
29520
+ const response = yield performance$1.getJSON(requestManager.transformRequest(options.url, "Source" /* ResourceType.Source */), abortController);
29476
29521
  tileJSON = response.data;
29477
29522
  }
29478
29523
  else {
@@ -29940,7 +29985,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
29940
29985
  return performance$1.__awaiter(this, void 0, void 0, function* () {
29941
29986
  const url = tile.tileID.canonical.url(this.tiles, this.map.getPixelRatio(), this.scheme);
29942
29987
  const params = {
29943
- request: this.map._requestManager.transformRequest(url, ResourceType.Tile),
29988
+ request: this.map._requestManager.transformRequest(url, "Tile" /* ResourceType.Tile */),
29944
29989
  uid: tile.uid,
29945
29990
  tileID: tile.tileID,
29946
29991
  zoom: tile.tileID.overscaledZ,
@@ -29952,10 +29997,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
29952
29997
  promoteId: this.promoteId
29953
29998
  };
29954
29999
  params.request.collectResourceTiming = this._collectResourceTiming;
29955
- let messageType = 'reloadTile';
30000
+ let messageType = "RT" /* MessageType.reloadTile */;
29956
30001
  if (!tile.actor || tile.state === 'expired') {
29957
30002
  tile.actor = this.dispatcher.getActor();
29958
- messageType = 'loadTile';
30003
+ messageType = "LT" /* MessageType.loadTile */;
29959
30004
  }
29960
30005
  else if (tile.state === 'loading') {
29961
30006
  return new Promise((resolve, reject) => {
@@ -30004,7 +30049,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
30004
30049
  delete tile.abortController;
30005
30050
  }
30006
30051
  if (tile.actor) {
30007
- yield tile.actor.sendAsync({ type: 'abortTile', data: { uid: tile.uid, type: this.type, source: this.id } });
30052
+ yield tile.actor.sendAsync({
30053
+ type: "AT" /* MessageType.abortTile */,
30054
+ data: { uid: tile.uid, type: this.type, source: this.id }
30055
+ });
30008
30056
  }
30009
30057
  });
30010
30058
  }
@@ -30012,7 +30060,14 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
30012
30060
  return performance$1.__awaiter(this, void 0, void 0, function* () {
30013
30061
  tile.unloadVectorData();
30014
30062
  if (tile.actor) {
30015
- yield tile.actor.sendAsync({ type: 'removeTile', data: { uid: tile.uid, type: this.type, source: this.id } });
30063
+ yield tile.actor.sendAsync({
30064
+ type: "RMT" /* MessageType.removeTile */,
30065
+ data: {
30066
+ uid: tile.uid,
30067
+ type: this.type,
30068
+ source: this.id
30069
+ }
30070
+ });
30016
30071
  }
30017
30072
  });
30018
30073
  }
@@ -30149,7 +30204,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
30149
30204
  const url = tile.tileID.canonical.url(this.tiles, this.map.getPixelRatio(), this.scheme);
30150
30205
  tile.abortController = new AbortController();
30151
30206
  try {
30152
- const response = yield ImageRequest.getImage(this.map._requestManager.transformRequest(url, ResourceType.Tile), tile.abortController, this.map._refreshExpiredTiles);
30207
+ const response = yield ImageRequest.getImage(this.map._requestManager.transformRequest(url, "Tile" /* ResourceType.Tile */), tile.abortController, this.map._refreshExpiredTiles);
30153
30208
  delete tile.abortController;
30154
30209
  if (tile.aborted) {
30155
30210
  tile.state = 'unloaded';
@@ -30239,7 +30294,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
30239
30294
  loadTile(tile) {
30240
30295
  return performance$1.__awaiter(this, void 0, void 0, function* () {
30241
30296
  const url = tile.tileID.canonical.url(this.tiles, this.map.getPixelRatio(), this.scheme);
30242
- const request = this.map._requestManager.transformRequest(url, ResourceType.Tile);
30297
+ const request = this.map._requestManager.transformRequest(url, "Tile" /* ResourceType.Tile */);
30243
30298
  tile.neighboringTiles = this._getNeighboringTiles(tile.tileID);
30244
30299
  tile.abortController = new AbortController();
30245
30300
  try {
@@ -30270,7 +30325,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
30270
30325
  if (!tile.actor || tile.state === 'expired') {
30271
30326
  tile.actor = this.dispatcher.getActor();
30272
30327
  /* eslint-disable require-atomic-updates */
30273
- const data = yield tile.actor.sendAsync({ type: 'loadDEMTile', data: params });
30328
+ const data = yield tile.actor.sendAsync({ type: "LDT" /* MessageType.loadDEMTile */, data: params });
30274
30329
  tile.dem = data;
30275
30330
  tile.needsHillshadePrepare = true;
30276
30331
  tile.needsTerrainPrepare = true;
@@ -30344,7 +30399,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
30344
30399
  delete tile.neighboringTiles;
30345
30400
  tile.state = 'unloaded';
30346
30401
  if (tile.actor) {
30347
- yield tile.actor.sendAsync({ type: 'removeDEMTile', data: { type: this.type, uid: tile.uid, source: this.id } });
30402
+ yield tile.actor.sendAsync({ type: "RDT" /* MessageType.removeDEMTile */, data: { type: this.type, uid: tile.uid, source: this.id } });
30348
30403
  }
30349
30404
  });
30350
30405
  }
@@ -30530,7 +30585,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
30530
30585
  * @returns a promise that is resolved with the zoom number
30531
30586
  */
30532
30587
  getClusterExpansionZoom(clusterId) {
30533
- return this.actor.sendAsync({ type: 'getClusterExpansionZoom', data: { type: this.type, clusterId, source: this.id } });
30588
+ return this.actor.sendAsync({ type: "GCEZ" /* MessageType.getClusterExpansionZoom */, data: { type: this.type, clusterId, source: this.id } });
30534
30589
  }
30535
30590
  /**
30536
30591
  * For clustered sources, fetches the children of the given cluster on the next zoom level (as an array of GeoJSON features).
@@ -30539,7 +30594,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
30539
30594
  * @returns a promise that is resolved when the features are retrieved
30540
30595
  */
30541
30596
  getClusterChildren(clusterId) {
30542
- return this.actor.sendAsync({ type: 'getClusterChildren', data: { type: this.type, clusterId, source: this.id } });
30597
+ return this.actor.sendAsync({ type: "GCC" /* MessageType.getClusterChildren */, data: { type: this.type, clusterId, source: this.id } });
30543
30598
  }
30544
30599
  /**
30545
30600
  * For clustered sources, fetches the original points that belong to the cluster (as an array of GeoJSON features).
@@ -30567,7 +30622,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
30567
30622
  * ```
30568
30623
  */
30569
30624
  getClusterLeaves(clusterId, limit, offset) {
30570
- return this.actor.sendAsync({ type: 'getClusterLeaves', data: {
30625
+ return this.actor.sendAsync({ type: "GCL" /* MessageType.getClusterLeaves */, data: {
30571
30626
  type: this.type,
30572
30627
  source: this.id,
30573
30628
  clusterId,
@@ -30588,7 +30643,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
30588
30643
  options.dataDiff = diff;
30589
30644
  }
30590
30645
  else if (typeof this._data === 'string') {
30591
- options.request = this.map._requestManager.transformRequest(browser.resolveURL(this._data), ResourceType.Source);
30646
+ options.request = this.map._requestManager.transformRequest(browser.resolveURL(this._data), "Source" /* ResourceType.Source */);
30592
30647
  options.request.collectResourceTiming = this._collectResourceTiming;
30593
30648
  }
30594
30649
  else {
@@ -30597,7 +30652,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
30597
30652
  this._pendingLoads++;
30598
30653
  this.fire(new performance$1.Event('dataloading', { dataType: 'source' }));
30599
30654
  try {
30600
- const result = yield this.actor.sendAsync({ type: 'loadData', data: options });
30655
+ const result = yield this.actor.sendAsync({ type: "LD" /* MessageType.loadData */, data: options });
30601
30656
  this._pendingLoads--;
30602
30657
  if (this._removed || result.abandoned) {
30603
30658
  this.fire(new performance$1.Event('dataabort', { dataType: 'source' }));
@@ -30631,7 +30686,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
30631
30686
  }
30632
30687
  loadTile(tile) {
30633
30688
  return performance$1.__awaiter(this, void 0, void 0, function* () {
30634
- const message = !tile.actor ? 'loadTile' : 'reloadTile';
30689
+ const message = !tile.actor ? "LT" /* MessageType.loadTile */ : "RT" /* MessageType.reloadTile */;
30635
30690
  tile.actor = this.actor;
30636
30691
  const params = {
30637
30692
  type: this.type,
@@ -30650,7 +30705,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
30650
30705
  delete tile.abortController;
30651
30706
  tile.unloadVectorData();
30652
30707
  if (!tile.aborted) {
30653
- tile.loadVectorData(data, this.map.painter, message === 'reloadTile');
30708
+ tile.loadVectorData(data, this.map.painter, message === "RT" /* MessageType.reloadTile */);
30654
30709
  }
30655
30710
  });
30656
30711
  }
@@ -30666,12 +30721,12 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
30666
30721
  unloadTile(tile) {
30667
30722
  return performance$1.__awaiter(this, void 0, void 0, function* () {
30668
30723
  tile.unloadVectorData();
30669
- yield this.actor.sendAsync({ type: 'removeTile', data: { uid: tile.uid, type: this.type, source: this.id } });
30724
+ yield this.actor.sendAsync({ type: "RMT" /* MessageType.removeTile */, data: { uid: tile.uid, type: this.type, source: this.id } });
30670
30725
  });
30671
30726
  }
30672
30727
  onRemove() {
30673
30728
  this._removed = true;
30674
- this.actor.sendAsync({ type: 'removeSource', data: { type: this.type, source: this.id } });
30729
+ this.actor.sendAsync({ type: "RS" /* MessageType.removeSource */, data: { type: this.type, source: this.id } });
30675
30730
  }
30676
30731
  serialize() {
30677
30732
  return performance$1.extend({}, this._options, {
@@ -30755,7 +30810,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
30755
30810
  this.url = this.options.url;
30756
30811
  this._request = new AbortController();
30757
30812
  try {
30758
- const image = yield ImageRequest.getImage(this.map._requestManager.transformRequest(this.url, ResourceType.Image), this._request);
30813
+ const image = yield ImageRequest.getImage(this.map._requestManager.transformRequest(this.url, "Image" /* ResourceType.Image */), this._request);
30759
30814
  this._request = null;
30760
30815
  this._loaded = true;
30761
30816
  if (image && image.data) {
@@ -30983,7 +31038,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
30983
31038
  const options = this.options;
30984
31039
  this.urls = [];
30985
31040
  for (const url of options.urls) {
30986
- this.urls.push(this.map._requestManager.transformRequest(url, ResourceType.Source).url);
31041
+ this.urls.push(this.map._requestManager.transformRequest(url, "Source" /* ResourceType.Source */).url);
30987
31042
  }
30988
31043
  try {
30989
31044
  const video = yield performance$1.getVideo(this.urls);
@@ -31350,65 +31405,78 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
31350
31405
  return output;
31351
31406
  }
31352
31407
 
31408
+ const RTLPluginLoadedEventName = 'RTLPluginLoaded';
31409
+
31353
31410
  class RTLMainThreadPlugin extends performance$1.Evented {
31354
31411
  constructor() {
31355
31412
  super(...arguments);
31356
- this.pluginStatus = 'unavailable';
31357
- this.pluginURL = null;
31413
+ this.status = 'unavailable';
31414
+ this.url = null;
31358
31415
  this.dispatcher = getGlobalDispatcher();
31359
- this.queue = [];
31360
31416
  }
31361
- _sendPluginStateToWorker() {
31362
- return performance$1.__awaiter(this, void 0, void 0, function* () {
31363
- yield this.dispatcher.broadcast('syncRTLPluginState', { pluginStatus: this.pluginStatus, pluginURL: this.pluginURL });
31364
- this.fire(new performance$1.Event('pluginStateChange', { pluginStatus: this.pluginStatus, pluginURL: this.pluginURL }));
31417
+ /** Sync RTL plugin state by broadcasting a message to the worker */
31418
+ _syncState(statusToSend) {
31419
+ this.status = statusToSend;
31420
+ return this.dispatcher.broadcast("SRPS" /* MessageType.syncRTLPluginState */, { pluginStatus: statusToSend, pluginURL: this.url })
31421
+ .catch((e) => {
31422
+ this.status = 'error';
31423
+ throw e;
31365
31424
  });
31366
31425
  }
31426
+ /** This one is exposed to outside */
31367
31427
  getRTLTextPluginStatus() {
31368
- return this.pluginStatus;
31428
+ return this.status;
31369
31429
  }
31370
31430
  clearRTLTextPlugin() {
31371
- this.pluginStatus = 'unavailable';
31372
- this.pluginURL = null;
31431
+ this.status = 'unavailable';
31432
+ this.url = null;
31373
31433
  }
31374
- setRTLTextPlugin(url, deferred = false) {
31375
- return performance$1.__awaiter(this, void 0, void 0, function* () {
31376
- if (this.pluginStatus === 'deferred' || this.pluginStatus === 'loading' || this.pluginStatus === 'loaded') {
31434
+ setRTLTextPlugin(url_1) {
31435
+ return performance$1.__awaiter(this, arguments, void 0, function* (url, deferred = false) {
31436
+ if (this.url) {
31437
+ // error
31377
31438
  throw new Error('setRTLTextPlugin cannot be called multiple times.');
31378
31439
  }
31379
- this.pluginURL = browser.resolveURL(url);
31380
- this.pluginStatus = 'deferred';
31381
- yield this._sendPluginStateToWorker();
31382
- if (!deferred) {
31383
- //Start downloading the plugin immediately if not intending to lazy-load
31384
- yield this._downloadRTLTextPlugin();
31385
- }
31386
- });
31387
- }
31388
- _downloadRTLTextPlugin() {
31389
- return performance$1.__awaiter(this, void 0, void 0, function* () {
31390
- if (this.pluginStatus !== 'deferred' || !this.pluginURL) {
31391
- throw new Error('rtl-text-plugin cannot be downloaded unless a pluginURL is specified');
31392
- }
31393
- try {
31394
- this.pluginStatus = 'loading';
31395
- yield this._sendPluginStateToWorker();
31396
- yield performance$1.getArrayBuffer({ url: this.pluginURL }, new AbortController());
31397
- this.pluginStatus = 'loaded';
31440
+ this.url = browser.resolveURL(url);
31441
+ if (!this.url) {
31442
+ throw new Error(`requested url ${url} is invalid`);
31443
+ }
31444
+ if (this.status === 'unavailable') {
31445
+ // from initial state:
31446
+ if (deferred) {
31447
+ this.status = 'deferred';
31448
+ // fire and forget: in this case it does not need wait for the broadcasting result
31449
+ // it is important to sync the deferred status once because
31450
+ // symbol_bucket will be checking it in worker
31451
+ this._syncState(this.status);
31452
+ }
31453
+ else {
31454
+ return this._requestImport();
31455
+ }
31398
31456
  }
31399
- catch (_a) {
31400
- this.pluginStatus = 'error';
31457
+ else if (this.status === 'requested') {
31458
+ return this._requestImport();
31401
31459
  }
31402
- yield this._sendPluginStateToWorker();
31403
31460
  });
31404
31461
  }
31405
- lazyLoadRTLTextPlugin() {
31462
+ /** Send a message to worker which will import the RTL plugin script */
31463
+ _requestImport() {
31406
31464
  return performance$1.__awaiter(this, void 0, void 0, function* () {
31407
- if (this.pluginStatus === 'deferred') {
31408
- yield this._downloadRTLTextPlugin();
31409
- }
31465
+ // all errors/exceptions will be handled by _syncState
31466
+ yield this._syncState('loading');
31467
+ this.status = 'loaded';
31468
+ this.fire(new performance$1.Event(RTLPluginLoadedEventName));
31410
31469
  });
31411
31470
  }
31471
+ /** Start a lazy loading process of RTL plugin */
31472
+ lazyLoad() {
31473
+ if (this.status === 'unavailable') {
31474
+ this.status = 'requested';
31475
+ }
31476
+ else if (this.status === 'deferred') {
31477
+ this._requestImport();
31478
+ }
31479
+ }
31412
31480
  }
31413
31481
  let rtlMainThreadPlugin = null;
31414
31482
  function rtlMainThreadPluginFactory() {
@@ -31520,7 +31588,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
31520
31588
  if (bucket instanceof performance$1.SymbolBucket) {
31521
31589
  if (bucket.hasRTLText) {
31522
31590
  this.hasRTLText = true;
31523
- rtlMainThreadPluginFactory().lazyLoadRTLTextPlugin();
31591
+ rtlMainThreadPluginFactory().lazyLoad();
31524
31592
  break;
31525
31593
  }
31526
31594
  }
@@ -35278,7 +35346,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
35278
35346
  class Style extends performance$1.Evented {
35279
35347
  constructor(map, options = {}) {
35280
35348
  super();
35281
- this._rtlTextPluginStateChange = () => {
35349
+ this._rtlPluginLoaded = () => {
35282
35350
  for (const id in this.sourceCaches) {
35283
35351
  const sourceType = this.sourceCaches[id].getSource().type;
35284
35352
  if (sourceType === 'vector' || sourceType === 'geojson') {
@@ -35291,10 +35359,10 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
35291
35359
  };
35292
35360
  this.map = map;
35293
35361
  this.dispatcher = new Dispatcher(getGlobalWorkerPool(), map._getMapId());
35294
- this.dispatcher.registerMessageHandler('getGlyphs', (mapId, params) => {
35362
+ this.dispatcher.registerMessageHandler("GG" /* MessageType.getGlyphs */, (mapId, params) => {
35295
35363
  return this.getGlyphs(mapId, params);
35296
35364
  });
35297
- this.dispatcher.registerMessageHandler('getImages', (mapId, params) => {
35365
+ this.dispatcher.registerMessageHandler("GI" /* MessageType.getImages */, (mapId, params) => {
35298
35366
  return this.getImages(mapId, params);
35299
35367
  });
35300
35368
  this.imageManager = new ImageManager();
@@ -35310,8 +35378,8 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
35310
35378
  this._loaded = false;
35311
35379
  this._availableImages = [];
35312
35380
  this._resetUpdates();
35313
- this.dispatcher.broadcast('setReferrer', performance$1.getReferrer());
35314
- rtlMainThreadPluginFactory().on('pluginStateChange', this._rtlTextPluginStateChange);
35381
+ this.dispatcher.broadcast("SR" /* MessageType.setReferrer */, performance$1.getReferrer());
35382
+ rtlMainThreadPluginFactory().on(RTLPluginLoadedEventName, this._rtlPluginLoaded);
35315
35383
  this.on('data', (event) => {
35316
35384
  if (event.dataType !== 'source' || event.sourceDataType !== 'metadata') {
35317
35385
  return;
@@ -35336,7 +35404,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
35336
35404
  this.fire(new performance$1.Event('dataloading', { dataType: 'style' }));
35337
35405
  options.validate = typeof options.validate === 'boolean' ?
35338
35406
  options.validate : true;
35339
- const request = this.map._requestManager.transformRequest(url, ResourceType.Style);
35407
+ const request = this.map._requestManager.transformRequest(url, "Style" /* ResourceType.Style */);
35340
35408
  this._loadStyleRequest = new AbortController();
35341
35409
  performance$1.getJSON(request, this._loadStyleRequest).then((response) => {
35342
35410
  this._loadStyleRequest = null;
@@ -35389,7 +35457,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
35389
35457
  const dereferencedLayers = performance$1.derefLayers(this.stylesheet.layers);
35390
35458
  // Broadcast layers to workers first, so that expensive style processing (createStyleLayer)
35391
35459
  // can happen in parallel on both main and worker threads.
35392
- this.dispatcher.broadcast('setLayers', dereferencedLayers);
35460
+ this.dispatcher.broadcast("SL" /* MessageType.setLayers */, dereferencedLayers);
35393
35461
  this._order = dereferencedLayers.map((layer) => layer.id);
35394
35462
  this._layers = {};
35395
35463
  // reset serialization field, to be populated only when needed
@@ -35442,7 +35510,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
35442
35510
  if (isUpdate) {
35443
35511
  this._changed = true;
35444
35512
  }
35445
- this.dispatcher.broadcast('setImages', this._availableImages);
35513
+ this.dispatcher.broadcast("SI" /* MessageType.setImages */, this._availableImages);
35446
35514
  this.fire(new performance$1.Event('data', { dataType: 'style' }));
35447
35515
  if (completion) {
35448
35516
  completion(err);
@@ -35457,7 +35525,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
35457
35525
  this._spritesImagesIds = {};
35458
35526
  this._availableImages = this.imageManager.listImages();
35459
35527
  this._changed = true;
35460
- this.dispatcher.broadcast('setImages', this._availableImages);
35528
+ this.dispatcher.broadcast("SI" /* MessageType.setImages */, this._availableImages);
35461
35529
  this.fire(new performance$1.Event('data', { dataType: 'style' }));
35462
35530
  }
35463
35531
  _validateLayer(layer) {
@@ -35628,7 +35696,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
35628
35696
  }
35629
35697
  }
35630
35698
  _updateWorkerLayers(updatedIds, removedIds) {
35631
- this.dispatcher.broadcast('updateLayers', {
35699
+ this.dispatcher.broadcast("UL" /* MessageType.updateLayers */, {
35632
35700
  layers: this._serializeByIds(updatedIds),
35633
35701
  removedIds
35634
35702
  });
@@ -35763,7 +35831,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
35763
35831
  this._availableImages = this.imageManager.listImages();
35764
35832
  this._changedImages[id] = true;
35765
35833
  this._changed = true;
35766
- this.dispatcher.broadcast('setImages', this._availableImages);
35834
+ this.dispatcher.broadcast("SI" /* MessageType.setImages */, this._availableImages);
35767
35835
  this.fire(new performance$1.Event('data', { dataType: 'style' }));
35768
35836
  }
35769
35837
  listImages() {
@@ -36342,7 +36410,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
36342
36410
  this._spriteRequest.abort();
36343
36411
  this._spriteRequest = null;
36344
36412
  }
36345
- rtlMainThreadPluginFactory().off('pluginStateChange', this._rtlTextPluginStateChange);
36413
+ rtlMainThreadPluginFactory().off(RTLPluginLoadedEventName, this._rtlPluginLoaded);
36346
36414
  for (const layerId in this._layers) {
36347
36415
  const layer = this._layers[layerId];
36348
36416
  layer.setEventedParent(null);
@@ -36354,6 +36422,9 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
36354
36422
  }
36355
36423
  this.imageManager.setEventedParent(null);
36356
36424
  this.setEventedParent(null);
36425
+ if (mapRemoved) {
36426
+ this.dispatcher.broadcast("RM" /* MessageType.removeMap */, undefined);
36427
+ }
36357
36428
  this.dispatcher.remove(mapRemoved);
36358
36429
  }
36359
36430
  _clearSource(id) {
@@ -36528,7 +36599,7 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
36528
36599
  delete this._spritesImagesIds[id];
36529
36600
  this._availableImages = this.imageManager.listImages();
36530
36601
  this._changed = true;
36531
- this.dispatcher.broadcast('setImages', this._availableImages);
36602
+ this.dispatcher.broadcast("SI" /* MessageType.setImages */, this._availableImages);
36532
36603
  this.fire(new performance$1.Event('data', { dataType: 'style' }));
36533
36604
  }
36534
36605
  /**
@@ -39071,12 +39142,10 @@ uniform ${precision} ${type} u_${name};
39071
39142
  for (const segmentState of tileRenderState) {
39072
39143
  const state = segmentState.state;
39073
39144
  context.activeTexture.set(gl.TEXTURE0);
39074
- // @ts-ignore
39075
39145
  state.atlasTexture.bind(state.atlasInterpolation, gl.CLAMP_TO_EDGE);
39076
39146
  if (state.atlasTextureIcon) {
39077
39147
  context.activeTexture.set(gl.TEXTURE1);
39078
39148
  if (state.atlasTextureIcon) {
39079
- // @ts-ignore
39080
39149
  state.atlasTextureIcon.bind(state.atlasInterpolationIcon, gl.CLAMP_TO_EDGE);
39081
39150
  }
39082
39151
  }
@@ -39944,7 +40013,7 @@ uniform ${precision} ${type} u_${name};
39944
40013
  this.context = new Context(gl);
39945
40014
  this.transform = transform;
39946
40015
  this._tileTextures = {};
39947
- this.terrainFacilitator = { dirty: true, matrix: performance$1.create(), renderTime: 0 };
40016
+ this.terrainFacilitator = { dirty: true, matrix: performance$1.identity(new Float64Array(16)), renderTime: 0 };
39948
40017
  this.setup();
39949
40018
  // Within each layer there are multiple distinct z-planes that can be drawn to.
39950
40019
  // This is implemented using the WebGL depth buffer.
@@ -40153,19 +40222,11 @@ uniform ${precision} ${type} u_${name};
40153
40222
  break;
40154
40223
  }
40155
40224
  }
40225
+ this.maybeDrawDepthAndCoords(false);
40156
40226
  if (this.renderToTexture) {
40157
40227
  this.renderToTexture.prepareForRender(this.style, this.transform.zoom);
40158
40228
  // this is disabled, because render-to-texture is rendering all layers from bottom to top.
40159
40229
  this.opaquePassCutoff = 0;
40160
- // update coords/depth-framebuffer on camera movement, or tile reloading
40161
- const newTiles = this.style.map.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime);
40162
- if (this.terrainFacilitator.dirty || !performance$1.equals(this.terrainFacilitator.matrix, this.transform.projMatrix) || newTiles.length) {
40163
- performance$1.copy(this.terrainFacilitator.matrix, this.transform.projMatrix);
40164
- this.terrainFacilitator.renderTime = Date.now();
40165
- this.terrainFacilitator.dirty = false;
40166
- drawDepth(this, this.style.map.terrain);
40167
- drawCoords(this, this.style.map.terrain);
40168
- }
40169
40230
  }
40170
40231
  // Offscreen pass ===============================================
40171
40232
  // We first do all rendering that requires rendering to a separate
@@ -40228,6 +40289,30 @@ uniform ${precision} ${type} u_${name};
40228
40289
  // encounters more expected values.
40229
40290
  this.context.setDefault();
40230
40291
  }
40292
+ /**
40293
+ * Update the depth and coords framebuffers, if the contents of those frame buffers is out of date.
40294
+ * If requireExact is false, then the contents of those frame buffers is not updated if it is close
40295
+ * to accurate (that is, the camera has not moved much since it was updated last).
40296
+ */
40297
+ maybeDrawDepthAndCoords(requireExact) {
40298
+ if (!this.style || !this.style.map || !this.style.map.terrain) {
40299
+ return;
40300
+ }
40301
+ const prevMatrix = this.terrainFacilitator.matrix;
40302
+ const currMatrix = this.transform.projMatrix;
40303
+ // Update coords/depth-framebuffer on camera movement, or tile reloading
40304
+ let doUpdate = this.terrainFacilitator.dirty;
40305
+ doUpdate || (doUpdate = requireExact ? !performance$1.exactEquals(prevMatrix, currMatrix) : !performance$1.equals(prevMatrix, currMatrix));
40306
+ doUpdate || (doUpdate = this.style.map.terrain.sourceCache.tilesAfterTime(this.terrainFacilitator.renderTime).length > 0);
40307
+ if (!doUpdate) {
40308
+ return;
40309
+ }
40310
+ performance$1.copy(prevMatrix, currMatrix);
40311
+ this.terrainFacilitator.renderTime = Date.now();
40312
+ this.terrainFacilitator.dirty = false;
40313
+ drawDepth(this, this.style.map.terrain);
40314
+ drawCoords(this, this.style.map.terrain);
40315
+ }
40231
40316
  renderLayer(painter, sourceCache, layer, coords) {
40232
40317
  if (layer.isHidden(this.transform.zoom))
40233
40318
  return;
@@ -40575,6 +40660,7 @@ uniform ${precision} ${type} u_${name};
40575
40660
  }
40576
40661
  }
40577
40662
 
40663
+ const MAX_VALID_LATITUDE = 85.051129;
40578
40664
  /**
40579
40665
  * @internal
40580
40666
  * A single transform, generally used for a single tile to be
@@ -40583,7 +40669,6 @@ uniform ${precision} ${type} u_${name};
40583
40669
  class Transform {
40584
40670
  constructor(minZoom, maxZoom, minPitch, maxPitch, renderWorldCopies) {
40585
40671
  this.tileSize = 512; // constant
40586
- this.maxValidLatitude = 85.051129; // constant
40587
40672
  this._renderWorldCopies = renderWorldCopies === undefined ? true : !!renderWorldCopies;
40588
40673
  this._minZoom = minZoom || 0;
40589
40674
  this._maxZoom = maxZoom || 22;
@@ -40729,6 +40814,9 @@ uniform ${precision} ${type} u_${name};
40729
40814
  this._constrain();
40730
40815
  this._calcMatrices();
40731
40816
  }
40817
+ /**
40818
+ * Elevation at current center point, meters above sea level
40819
+ */
40732
40820
  get elevation() { return this._elevation; }
40733
40821
  set elevation(elevation) {
40734
40822
  if (elevation === this._elevation)
@@ -40926,7 +41014,7 @@ uniform ${precision} ${type} u_${name};
40926
41014
  * @returns Point
40927
41015
  */
40928
41016
  project(lnglat) {
40929
- const lat = performance$1.clamp(lnglat.lat, -this.maxValidLatitude, this.maxValidLatitude);
41017
+ const lat = performance$1.clamp(lnglat.lat, -MAX_VALID_LATITUDE, MAX_VALID_LATITUDE);
40930
41018
  return new performance$1.Point(performance$1.mercatorXfromLng(lnglat.lng) * this.worldSize, performance$1.mercatorYfromLat(lat) * this.worldSize);
40931
41019
  }
40932
41020
  /**
@@ -40954,20 +41042,24 @@ uniform ${precision} ${type} u_${name};
40954
41042
  * @param terrain - the terrain
40955
41043
  */
40956
41044
  recalculateZoom(terrain) {
41045
+ const origElevation = this.elevation;
41046
+ const origAltitude = Math.cos(this._pitch) * this.cameraToCenterDistance / this._pixelPerMeter;
40957
41047
  // find position the camera is looking on
40958
41048
  const center = this.pointLocation(this.centerPoint, terrain);
40959
41049
  const elevation = terrain.getElevationForLngLatZoom(center, this.tileZoom);
40960
41050
  const deltaElevation = this.elevation - elevation;
40961
41051
  if (!deltaElevation)
40962
41052
  return;
40963
- // calculate mercator distance between camera & target
40964
- const cameraPosition = this.getCameraPosition();
40965
- const camera = performance$1.MercatorCoordinate.fromLngLat(cameraPosition.lngLat, cameraPosition.altitude);
40966
- const target = performance$1.MercatorCoordinate.fromLngLat(center, elevation);
40967
- const dx = camera.x - target.x, dy = camera.y - target.y, dz = camera.z - target.z;
40968
- const distance = Math.sqrt(dx * dx + dy * dy + dz * dz);
40969
- // from this distance we calculate the new zoomlevel
40970
- const zoom = this.scaleZoom(this.cameraToCenterDistance / distance / this.tileSize);
41053
+ // The camera's altitude off the ground + the ground's elevation = a constant:
41054
+ // this means the camera stays at the same total height.
41055
+ const requiredAltitude = origAltitude + origElevation - elevation;
41056
+ // Since altitude = Math.cos(this._pitch) * this.cameraToCenterDistance / pixelPerMeter:
41057
+ const requiredPixelPerMeter = Math.cos(this._pitch) * this.cameraToCenterDistance / requiredAltitude;
41058
+ // Since pixelPerMeter = mercatorZfromAltitude(1, center.lat) * worldSize:
41059
+ const requiredWorldSize = requiredPixelPerMeter / performance$1.mercatorZfromAltitude(1, center.lat);
41060
+ // Since worldSize = this.tileSize * scale:
41061
+ const requiredScale = requiredWorldSize / this.tileSize;
41062
+ const zoom = this.scaleZoom(requiredScale);
40971
41063
  // update matrices
40972
41064
  this._elevation = elevation;
40973
41065
  this._center = center;
@@ -41110,7 +41202,7 @@ uniform ${precision} ${type} u_${name};
41110
41202
  }
41111
41203
  else {
41112
41204
  this.lngRange = null;
41113
- this.latRange = [-this.maxValidLatitude, this.maxValidLatitude];
41205
+ this.latRange = [-MAX_VALID_LATITUDE, MAX_VALID_LATITUDE];
41114
41206
  }
41115
41207
  }
41116
41208
  /**
@@ -41136,60 +41228,92 @@ uniform ${precision} ${type} u_${name};
41136
41228
  customLayerMatrix() {
41137
41229
  return this.mercatorMatrix.slice();
41138
41230
  }
41139
- _constrain() {
41140
- if (!this.center || !this.width || !this.height || this._constraining)
41141
- return;
41142
- this._constraining = true;
41143
- let minY = -90;
41144
- let maxY = 90;
41145
- let minX = -180;
41146
- let maxX = 180;
41147
- let sy, sx, x2, y2;
41148
- const size = this.size, unmodified = this._unmodified;
41231
+ /**
41232
+ * Get center lngLat and zoom to ensure that
41233
+ * 1) everything beyond the bounds is excluded
41234
+ * 2) a given lngLat is as near the center as possible
41235
+ * Bounds are those set by maxBounds or North & South "Poles" and, if only 1 globe is displayed, antimeridian.
41236
+ */
41237
+ getConstrained(lngLat, zoom) {
41238
+ zoom = performance$1.clamp(+zoom, this.minZoom, this.maxZoom);
41239
+ const result = {
41240
+ center: new performance$1.LngLat(lngLat.lng, lngLat.lat),
41241
+ zoom
41242
+ };
41243
+ let lngRange = this.lngRange;
41244
+ if (!this._renderWorldCopies && lngRange === null) {
41245
+ const almost180 = 180 - 1e-10;
41246
+ lngRange = [-almost180, almost180];
41247
+ }
41248
+ const worldSize = this.tileSize * this.zoomScale(result.zoom); // A world size for the requested zoom level, not the current world size
41249
+ let minY = 0;
41250
+ let maxY = worldSize;
41251
+ let minX = 0;
41252
+ let maxX = worldSize;
41253
+ let scaleY = 0;
41254
+ let scaleX = 0;
41255
+ const { x: screenWidth, y: screenHeight } = this.size;
41149
41256
  if (this.latRange) {
41150
41257
  const latRange = this.latRange;
41151
- minY = performance$1.mercatorYfromLat(latRange[1]) * this.worldSize;
41152
- maxY = performance$1.mercatorYfromLat(latRange[0]) * this.worldSize;
41153
- sy = maxY - minY < size.y ? size.y / (maxY - minY) : 0;
41154
- }
41155
- if (this.lngRange) {
41156
- const lngRange = this.lngRange;
41157
- minX = performance$1.wrap(performance$1.mercatorXfromLng(lngRange[0]) * this.worldSize, 0, this.worldSize);
41158
- maxX = performance$1.wrap(performance$1.mercatorXfromLng(lngRange[1]) * this.worldSize, 0, this.worldSize);
41258
+ minY = performance$1.mercatorYfromLat(latRange[1]) * worldSize;
41259
+ maxY = performance$1.mercatorYfromLat(latRange[0]) * worldSize;
41260
+ const shouldZoomIn = maxY - minY < screenHeight;
41261
+ if (shouldZoomIn)
41262
+ scaleY = screenHeight / (maxY - minY);
41263
+ }
41264
+ if (lngRange) {
41265
+ minX = performance$1.wrap(performance$1.mercatorXfromLng(lngRange[0]) * worldSize, 0, worldSize);
41266
+ maxX = performance$1.wrap(performance$1.mercatorXfromLng(lngRange[1]) * worldSize, 0, worldSize);
41159
41267
  if (maxX < minX)
41160
- maxX += this.worldSize;
41161
- sx = maxX - minX < size.x ? size.x / (maxX - minX) : 0;
41162
- }
41163
- const point = this.point;
41164
- // how much the map should scale to fit the screen into given latitude/longitude ranges
41165
- const s = Math.max(sx || 0, sy || 0);
41166
- if (s) {
41167
- this.center = this.unproject(new performance$1.Point(sx ? (maxX + minX) / 2 : point.x, sy ? (maxY + minY) / 2 : point.y));
41168
- this.zoom += this.scaleZoom(s);
41169
- this._unmodified = unmodified;
41170
- this._constraining = false;
41171
- return;
41268
+ maxX += worldSize;
41269
+ const shouldZoomIn = maxX - minX < screenWidth;
41270
+ if (shouldZoomIn)
41271
+ scaleX = screenWidth / (maxX - minX);
41272
+ }
41273
+ const { x: originalX, y: originalY } = this.project.call({ worldSize }, lngLat);
41274
+ let modifiedX, modifiedY;
41275
+ const scale = Math.max(scaleX || 0, scaleY || 0);
41276
+ if (scale) {
41277
+ // zoom in to exclude all beyond the given lng/lat ranges
41278
+ const newPoint = new performance$1.Point(scaleX ? (maxX + minX) / 2 : originalX, scaleY ? (maxY + minY) / 2 : originalY);
41279
+ result.center = this.unproject.call({ worldSize }, newPoint).wrap();
41280
+ result.zoom += this.scaleZoom(scale);
41281
+ return result;
41172
41282
  }
41173
41283
  if (this.latRange) {
41174
- const y = point.y, h2 = size.y / 2;
41175
- if (y - h2 < minY)
41176
- y2 = minY + h2;
41177
- if (y + h2 > maxY)
41178
- y2 = maxY - h2;
41284
+ const h2 = screenHeight / 2;
41285
+ if (originalY - h2 < minY)
41286
+ modifiedY = minY + h2;
41287
+ if (originalY + h2 > maxY)
41288
+ modifiedY = maxY - h2;
41179
41289
  }
41180
- if (this.lngRange) {
41290
+ if (lngRange) {
41181
41291
  const centerX = (minX + maxX) / 2;
41182
- const x = performance$1.wrap(point.x, centerX - this.worldSize / 2, centerX + this.worldSize / 2);
41183
- const w2 = size.x / 2;
41184
- if (x - w2 < minX)
41185
- x2 = minX + w2;
41186
- if (x + w2 > maxX)
41187
- x2 = maxX - w2;
41292
+ let wrappedX = originalX;
41293
+ if (this._renderWorldCopies) {
41294
+ wrappedX = performance$1.wrap(originalX, centerX - worldSize / 2, centerX + worldSize / 2);
41295
+ }
41296
+ const w2 = screenWidth / 2;
41297
+ if (wrappedX - w2 < minX)
41298
+ modifiedX = minX + w2;
41299
+ if (wrappedX + w2 > maxX)
41300
+ modifiedX = maxX - w2;
41188
41301
  }
41189
41302
  // pan the map if the screen goes off the range
41190
- if (x2 !== undefined || y2 !== undefined) {
41191
- this.center = this.unproject(new performance$1.Point(x2 !== undefined ? x2 : point.x, y2 !== undefined ? y2 : point.y)).wrap();
41303
+ if (modifiedX !== undefined || modifiedY !== undefined) {
41304
+ const newPoint = new performance$1.Point(modifiedX !== null && modifiedX !== void 0 ? modifiedX : originalX, modifiedY !== null && modifiedY !== void 0 ? modifiedY : originalY);
41305
+ result.center = this.unproject.call({ worldSize }, newPoint).wrap();
41192
41306
  }
41307
+ return result;
41308
+ }
41309
+ _constrain() {
41310
+ if (!this.center || !this.width || !this.height || this._constraining)
41311
+ return;
41312
+ this._constraining = true;
41313
+ const unmodified = this._unmodified;
41314
+ const { center, zoom } = this.getConstrained(this.center, this.zoom);
41315
+ this.center = center;
41316
+ this.zoom = zoom;
41193
41317
  this._unmodified = unmodified;
41194
41318
  this._constraining = false;
41195
41319
  }
@@ -44699,6 +44823,7 @@ uniform ${precision} ${type} u_${name};
44699
44823
  * @see [Navigate the map with game-like controls](https://maplibre.org/maplibre-gl-js/docs/examples/game-controls/)
44700
44824
  */
44701
44825
  easeTo(options, eventData) {
44826
+ var _a;
44702
44827
  this._stop(false, options.easeId);
44703
44828
  options = performance$1.extend({
44704
44829
  offset: [0, 0],
@@ -44707,11 +44832,11 @@ uniform ${precision} ${type} u_${name};
44707
44832
  }, options);
44708
44833
  if (options.animate === false || (!options.essential && browser.prefersReducedMotion))
44709
44834
  options.duration = 0;
44710
- const tr = this._getTransformForUpdate(), startZoom = this.getZoom(), startBearing = this.getBearing(), startPitch = this.getPitch(), startPadding = this.getPadding(), zoom = 'zoom' in options ? +options.zoom : startZoom, bearing = 'bearing' in options ? this._normalizeBearing(options.bearing, startBearing) : startBearing, pitch = 'pitch' in options ? +options.pitch : startPitch, padding = 'padding' in options ? options.padding : tr.padding;
44835
+ const tr = this._getTransformForUpdate(), startZoom = this.getZoom(), startBearing = this.getBearing(), startPitch = this.getPitch(), startPadding = this.getPadding(), bearing = 'bearing' in options ? this._normalizeBearing(options.bearing, startBearing) : startBearing, pitch = 'pitch' in options ? +options.pitch : startPitch, padding = 'padding' in options ? options.padding : tr.padding;
44711
44836
  const offsetAsPoint = performance$1.Point.convert(options.offset);
44712
44837
  let pointAtOffset = tr.centerPoint.add(offsetAsPoint);
44713
44838
  const locationAtOffset = tr.pointLocation(pointAtOffset);
44714
- const center = performance$1.LngLat.convert(options.center || locationAtOffset);
44839
+ const { center, zoom } = tr.getConstrained(performance$1.LngLat.convert(options.center || locationAtOffset), (_a = options.zoom) !== null && _a !== void 0 ? _a : startZoom);
44715
44840
  this._normalizeCenter(center);
44716
44841
  const from = tr.project(locationAtOffset);
44717
44842
  const delta = tr.project(center).sub(from);
@@ -44927,6 +45052,7 @@ uniform ${precision} ${type} u_${name};
44927
45052
  * @see [Fly to a location based on scroll position](https://maplibre.org/maplibre-gl-js/docs/examples/scroll-fly-to/)
44928
45053
  */
44929
45054
  flyTo(options, eventData) {
45055
+ var _a;
44930
45056
  // Fall through to jumpTo if user has set prefers-reduced-motion
44931
45057
  if (!options.essential && browser.prefersReducedMotion) {
44932
45058
  const coercedOptions = performance$1.pick(options, ['center', 'zoom', 'bearing', 'pitch', 'around']);
@@ -44947,16 +45073,15 @@ uniform ${precision} ${type} u_${name};
44947
45073
  easing: performance$1.defaultEasing
44948
45074
  }, options);
44949
45075
  const tr = this._getTransformForUpdate(), startZoom = this.getZoom(), startBearing = this.getBearing(), startPitch = this.getPitch(), startPadding = this.getPadding();
44950
- const zoom = 'zoom' in options ? performance$1.clamp(+options.zoom, tr.minZoom, tr.maxZoom) : startZoom;
44951
45076
  const bearing = 'bearing' in options ? this._normalizeBearing(options.bearing, startBearing) : startBearing;
44952
45077
  const pitch = 'pitch' in options ? +options.pitch : startPitch;
44953
45078
  const padding = 'padding' in options ? options.padding : tr.padding;
44954
- const scale = tr.zoomScale(zoom - startZoom);
44955
45079
  const offsetAsPoint = performance$1.Point.convert(options.offset);
44956
45080
  let pointAtOffset = tr.centerPoint.add(offsetAsPoint);
44957
45081
  const locationAtOffset = tr.pointLocation(pointAtOffset);
44958
- const center = performance$1.LngLat.convert(options.center || locationAtOffset);
45082
+ const { center, zoom } = tr.getConstrained(performance$1.LngLat.convert(options.center || locationAtOffset), (_a = options.zoom) !== null && _a !== void 0 ? _a : startZoom);
44959
45083
  this._normalizeCenter(center);
45084
+ const scale = tr.zoomScale(zoom - startZoom);
44960
45085
  const from = tr.project(locationAtOffset);
44961
45086
  const delta = tr.project(center).sub(from);
44962
45087
  let rho = options.curve;
@@ -45126,21 +45251,19 @@ uniform ${precision} ${type} u_${name};
45126
45251
  delta < -180 ? 360 : 0;
45127
45252
  }
45128
45253
  /**
45129
- * Query the current elevation of location. Returns `null` if terrain is not enabled. Elevation is in meters relative to mean sea-level.
45254
+ * Get the elevation difference between a given point
45255
+ * and a point that is currently in the middle of the screen.
45256
+ * This method should be used for proper positioning of custom 3d objects, as explained [here](https://maplibre.org/maplibre-gl-js/docs/examples/add-3d-model-with-terrain/)
45257
+ * Returns null if terrain is not enabled.
45258
+ * This method is subject to change in Maplibre GL JS v5.
45130
45259
  * @param lngLatLike - [x,y] or LngLat coordinates of the location
45131
- * @returns elevation in meters
45260
+ * @returns elevation offset in meters
45132
45261
  */
45133
45262
  queryTerrainElevation(lngLatLike) {
45134
45263
  if (!this.terrain) {
45135
45264
  return null;
45136
45265
  }
45137
45266
  const elevation = this.terrain.getElevationForLngLatZoom(performance$1.LngLat.convert(lngLatLike), this.transform.tileZoom);
45138
- /**
45139
- * Different zoomlevels with different terrain-tiles the elevation-values are not the same.
45140
- * map.transform.elevation variable with the center-altitude.
45141
- * In maplibre the proj-matrix is translated by this value in negative z-direction.
45142
- * So we need to add this value to the elevation to get the correct value.
45143
- */
45144
45267
  return elevation - this.transform.elevation;
45145
45268
  }
45146
45269
  }
@@ -45787,11 +45910,16 @@ uniform ${precision} ${type} u_${name};
45787
45910
  * @returns mercator coordinate for a screen pixel
45788
45911
  */
45789
45912
  pointCoordinate(p) {
45913
+ // First, ensure the coords framebuffer is up to date.
45914
+ this.painter.maybeDrawDepthAndCoords(true);
45790
45915
  const rgba = new Uint8Array(4);
45791
45916
  const context = this.painter.context, gl = context.gl;
45917
+ const px = Math.round(p.x * this.painter.pixelRatio / devicePixelRatio);
45918
+ const py = Math.round(p.y * this.painter.pixelRatio / devicePixelRatio);
45919
+ const fbHeight = Math.round(this.painter.height / devicePixelRatio);
45792
45920
  // grab coordinate pixel from coordinates framebuffer
45793
45921
  context.bindFramebuffer.set(this.getFramebuffer('coords').framebuffer);
45794
- gl.readPixels(p.x, this.painter.height / devicePixelRatio - p.y - 1, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, rgba);
45922
+ gl.readPixels(px, fbHeight - py - 1, 1, 1, gl.RGBA, gl.UNSIGNED_BYTE, rgba);
45795
45923
  context.bindFramebuffer.set(null);
45796
45924
  // decode coordinates (encoding see getCoordsTexture)
45797
45925
  const x = rgba[0] + ((rgba[2] >> 4) << 8);
@@ -47210,7 +47338,7 @@ uniform ${precision} ${type} u_${name};
47210
47338
  _diffStyle(style, options) {
47211
47339
  if (typeof style === 'string') {
47212
47340
  const url = style;
47213
- const request = this._requestManager.transformRequest(url, ResourceType.Style);
47341
+ const request = this._requestManager.transformRequest(url, "Style" /* ResourceType.Style */);
47214
47342
  performance$1.getJSON(request, new AbortController()).then((response) => {
47215
47343
  this._updateDiff(response.data, options);
47216
47344
  }).catch((error) => {
@@ -47654,7 +47782,7 @@ uniform ${precision} ${type} u_${name};
47654
47782
  * @see [Add an icon to the map](https://maplibre.org/maplibre-gl-js/docs/examples/add-image/)
47655
47783
  */
47656
47784
  loadImage(url) {
47657
- return ImageRequest.getImage(this._requestManager.transformRequest(url, ResourceType.Image), new AbortController());
47785
+ return ImageRequest.getImage(this._requestManager.transformRequest(url, "Image" /* ResourceType.Image */), new AbortController());
47658
47786
  }
47659
47787
  /**
47660
47788
  * Returns an Array of strings containing the IDs of all images currently available in the map.
@@ -48881,8 +49009,8 @@ uniform ${precision} ${type} u_${name};
48881
49009
  }
48882
49010
 
48883
49011
  let supportsGeolocation;
48884
- function checkGeolocationSupport(forceRecalculation = false) {
48885
- return performance$1.__awaiter(this, void 0, void 0, function* () {
49012
+ function checkGeolocationSupport() {
49013
+ return performance$1.__awaiter(this, arguments, void 0, function* (forceRecalculation = false) {
48886
49014
  if (supportsGeolocation !== undefined && !forceRecalculation) {
48887
49015
  return supportsGeolocation;
48888
49016
  }
@@ -49032,6 +49160,7 @@ uniform ${precision} ${type} u_${name};
49032
49160
  }
49033
49161
  };
49034
49162
  this._update = (e) => {
49163
+ var _a;
49035
49164
  if (!this._map)
49036
49165
  return;
49037
49166
  const isFullyLoaded = this._map.loaded() && !this._map.isMoving();
@@ -49041,6 +49170,9 @@ uniform ${precision} ${type} u_${name};
49041
49170
  if (this._map.transform.renderWorldCopies) {
49042
49171
  this._lngLat = smartWrap(this._lngLat, this._flatPos, this._map.transform);
49043
49172
  }
49173
+ else {
49174
+ this._lngLat = (_a = this._lngLat) === null || _a === void 0 ? void 0 : _a.wrap();
49175
+ }
49044
49176
  this._flatPos = this._pos = this._map.project(this._lngLat)._add(this._offset);
49045
49177
  if (this._map.terrain) {
49046
49178
  // flat position is saved because smartWrap needs non-elevated points
@@ -49429,6 +49561,8 @@ uniform ${precision} ${type} u_${name};
49429
49561
  */
49430
49562
  togglePopup() {
49431
49563
  const popup = this._popup;
49564
+ if (this._element.style.opacity === this._opacityWhenCovered)
49565
+ return this;
49432
49566
  if (!popup)
49433
49567
  return this;
49434
49568
  else if (popup.isOpen())
@@ -49440,7 +49574,7 @@ uniform ${precision} ${type} u_${name};
49440
49574
  return this;
49441
49575
  }
49442
49576
  _updateOpacity(force = false) {
49443
- var _a;
49577
+ var _a, _b;
49444
49578
  const terrain = (_a = this._map) === null || _a === void 0 ? void 0 : _a.terrain;
49445
49579
  if (!terrain) {
49446
49580
  if (this._element.style.opacity !== this._opacity) {
@@ -49477,6 +49611,8 @@ uniform ${precision} ${type} u_${name};
49477
49611
  const markerDistanceCenter = map.transform.lngLatToCameraDepth(this._lngLat, elevation + elevationToCenter);
49478
49612
  // Display at full opacity if center is visible.
49479
49613
  const centerIsInvisible = markerDistanceCenter - terrainDistanceCenter > forgiveness;
49614
+ if (((_b = this._popup) === null || _b === void 0 ? void 0 : _b.isOpen()) && centerIsInvisible)
49615
+ this._popup.remove();
49480
49616
  this._element.style.opacity = centerIsInvisible ? this._opacityWhenCovered : this._opacity;
49481
49617
  }
49482
49618
  /**
@@ -50320,10 +50456,14 @@ uniform ${precision} ${type} u_${name};
50320
50456
  constructor(options = {}) {
50321
50457
  super();
50322
50458
  this._onFullscreenChange = () => {
50323
- const fullscreenElement = window.document.fullscreenElement ||
50459
+ var _a;
50460
+ let fullscreenElement = window.document.fullscreenElement ||
50324
50461
  window.document.mozFullScreenElement ||
50325
50462
  window.document.webkitFullscreenElement ||
50326
50463
  window.document.msFullscreenElement;
50464
+ while ((_a = fullscreenElement === null || fullscreenElement === void 0 ? void 0 : fullscreenElement.shadowRoot) === null || _a === void 0 ? void 0 : _a.fullscreenElement) {
50465
+ fullscreenElement = fullscreenElement.shadowRoot.fullscreenElement;
50466
+ }
50327
50467
  if ((fullscreenElement === this._container) !== this._fullscreen) {
50328
50468
  this._handleFullscreenChange();
50329
50469
  }
@@ -50513,7 +50653,8 @@ uniform ${precision} ${type} u_${name};
50513
50653
  closeOnClick: true,
50514
50654
  focusAfterOpen: true,
50515
50655
  className: '',
50516
- maxWidth: '240px'
50656
+ maxWidth: '240px',
50657
+ subpixelPositioning: false
50517
50658
  };
50518
50659
  const focusQuerySelector = [
50519
50660
  'a[href]',
@@ -50613,8 +50754,8 @@ uniform ${precision} ${type} u_${name};
50613
50754
  this._map.off('drag', this._onDrag);
50614
50755
  this._map._canvasContainer.classList.remove('maplibregl-track-pointer');
50615
50756
  delete this._map;
50757
+ this.fire(new performance$1.Event('close'));
50616
50758
  }
50617
- this.fire(new performance$1.Event('close'));
50618
50759
  return this;
50619
50760
  };
50620
50761
  this._onMouseUp = (event) => {
@@ -50627,6 +50768,7 @@ uniform ${precision} ${type} u_${name};
50627
50768
  this._update(event.point);
50628
50769
  };
50629
50770
  this._update = (cursor) => {
50771
+ var _a;
50630
50772
  const hasPosition = this._lngLat || this._trackPointer;
50631
50773
  if (!this._map || !hasPosition || !this._content) {
50632
50774
  return;
@@ -50650,6 +50792,9 @@ uniform ${precision} ${type} u_${name};
50650
50792
  if (this._map.transform.renderWorldCopies && !this._trackPointer) {
50651
50793
  this._lngLat = smartWrap(this._lngLat, this._flatPos, this._map.transform);
50652
50794
  }
50795
+ else {
50796
+ this._lngLat = (_a = this._lngLat) === null || _a === void 0 ? void 0 : _a.wrap();
50797
+ }
50653
50798
  if (this._trackPointer && !cursor)
50654
50799
  return;
50655
50800
  const pos = this._flatPos = this._pos = this._trackPointer && cursor ? cursor : this._map.project(this._lngLat);
@@ -50685,7 +50830,10 @@ uniform ${precision} ${type} u_${name};
50685
50830
  anchor = anchorComponents.join('-');
50686
50831
  }
50687
50832
  }
50688
- const offsetedPos = pos.add(offset[anchor]).round();
50833
+ let offsetedPos = pos.add(offset[anchor]);
50834
+ if (!this.options.subpixelPositioning) {
50835
+ offsetedPos = offsetedPos.round();
50836
+ }
50689
50837
  DOM.setTransform(this._container, `${anchorTranslate[anchor]} translate(${offsetedPos.x}px,${offsetedPos.y}px)`);
50690
50838
  applyAnchorClass(this._container, anchor, 'popup');
50691
50839
  };
@@ -50994,6 +51142,20 @@ uniform ${precision} ${type} u_${name};
50994
51142
  return this._container.classList.toggle(className);
50995
51143
  }
50996
51144
  }
51145
+ /**
51146
+ * Set the option to allow subpixel positioning of the popup by passing a boolean
51147
+ *
51148
+ * @param value - When boolean is true, subpixel positioning is enabled for the popup.
51149
+ *
51150
+ * @example
51151
+ * ```ts
51152
+ * let popup = new Popup()
51153
+ * popup.setSubpixelPositioning(true);
51154
+ * ```
51155
+ */
51156
+ setSubpixelPositioning(value) {
51157
+ this.options.subpixelPositioning = value;
51158
+ }
50997
51159
  _createCloseButton() {
50998
51160
  if (this.options.closeButton) {
50999
51161
  this._closeButton = DOM.create('button', 'maplibregl-popup-close-button', this._content);
@@ -51075,7 +51237,9 @@ uniform ${precision} ${type} u_${name};
51075
51237
  * ```
51076
51238
  * @see [Add support for right-to-left scripts](https://maplibre.org/maplibre-gl-js/docs/examples/mapbox-gl-rtl-text/)
51077
51239
  */
51078
- function setRTLTextPlugin(pluginURL, lazy) { return rtlMainThreadPluginFactory().setRTLTextPlugin(pluginURL, lazy); }
51240
+ function setRTLTextPlugin(pluginURL, lazy) {
51241
+ return rtlMainThreadPluginFactory().setRTLTextPlugin(pluginURL, lazy);
51242
+ }
51079
51243
  /**
51080
51244
  * Gets the map's [RTL text plugin](https://www.mapbox.com/mapbox-gl-js/plugins/#mapbox-gl-rtl-text) status.
51081
51245
  * The status can be `unavailable` (i.e. not requested or removed), `loading`, `loaded` or `error`.
@@ -51086,7 +51250,9 @@ uniform ${precision} ${type} u_${name};
51086
51250
  * const pluginStatus = getRTLTextPluginStatus();
51087
51251
  * ```
51088
51252
  */
51089
- function getRTLTextPluginStatus() { return rtlMainThreadPluginFactory().getRTLTextPluginStatus(); }
51253
+ function getRTLTextPluginStatus() {
51254
+ return rtlMainThreadPluginFactory().getRTLTextPluginStatus();
51255
+ }
51090
51256
  /**
51091
51257
  * Returns the package version of the library
51092
51258
  * @returns Package version of the library
@@ -51176,7 +51342,7 @@ uniform ${precision} ${type} u_${name};
51176
51342
  * importScriptInWorkers('add-protocol-worker.js');
51177
51343
  * ```
51178
51344
  */
51179
- function importScriptInWorkers(workerUrl) { return getGlobalDispatcher().broadcast('importScript', workerUrl); }
51345
+ function importScriptInWorkers(workerUrl) { return getGlobalDispatcher().broadcast("IS" /* MessageType.importScript */, workerUrl); }
51180
51346
 
51181
51347
  exports.AJAXError = performance$1.AJAXError;
51182
51348
  exports.Evented = performance$1.Evented;
@@ -52051,7 +52217,7 @@ uniform ${precision} ${type} u_${name};
52051
52217
  return UserAgent;
52052
52218
  }());
52053
52219
 
52054
- var version = "3.2.0";
52220
+ var version = "3.2.1";
52055
52221
 
52056
52222
  /**
52057
52223
  * A helper class that provides methods for getting various forms of the map controls current version.
@@ -53476,6 +53642,7 @@ uniform ${precision} ${type} u_${name};
53476
53642
  var grid = document.createElement("div");
53477
53643
  grid.classList.add("sub-container");
53478
53644
  grid.classList.add("hidden-accessible-element");
53645
+ grid.setAttribute("aria-hidden", "true");
53479
53646
  var rotationRightButton = this.constructRightRotationButton(map);
53480
53647
  var rotationLeftButton = this.constructLeftRotationButton(map);
53481
53648
  var tooltipLeft = buildAccessibleTooltip("Rotate Left");
@@ -53771,6 +53938,7 @@ uniform ${precision} ${type} u_${name};
53771
53938
  var grid = document.createElement("div");
53772
53939
  grid.classList.add("sub-container");
53773
53940
  grid.classList.add("hidden-accessible-element");
53941
+ grid.setAttribute("aria-hidden", "true");
53774
53942
  this.pitchIncrementButton = this.constructPitchIncrementButton(map);
53775
53943
  this.pitchDecrementButton = this.constructPitchDecrementButton(map);
53776
53944
  var tooltipIncrement = buildAccessibleTooltip("Increase Pitch");
@@ -57411,9 +57579,9 @@ uniform ${precision} ${type} u_${name};
57411
57579
  function StyleControlOptions() {
57412
57580
  var _this = _super !== null && _super.apply(this, arguments) || this;
57413
57581
  /**
57414
- * The layout to display the styles in.
57415
- * <p>`"icons"`: A row of clickable icons for each style.</p>
57416
- * <p>`"list"`: A scrollable list with the icons and names for each style.</p>
57582
+ * The layout to display the styles in.<br />
57583
+ * `"icons"`: A row of clickable icons for each style.<br />
57584
+ * `"list"`: A scrollable list with the icons and names for each style.<br />
57417
57585
  * Default `"icons"`
57418
57586
  * @default "icons"
57419
57587
  */
@@ -57818,6 +57986,7 @@ uniform ${precision} ${type} u_${name};
57818
57986
  }
57819
57987
  styleOpsGrid.setAttribute("aria-label", "Style Options");
57820
57988
  styleOpsGrid.classList.add("hidden-accessible-element");
57989
+ styleOpsGrid.setAttribute("aria-hidden", "true");
57821
57990
  // Once the map's style definition is initialized create a map between style names and icons.
57822
57991
  // If a style is one of those to be shown by the style picker also create it's element.
57823
57992
  this.map.styles.definitions().then(function (definitions) { return __awaiter$3(_this, void 0, void 0, function () {
@@ -57910,13 +58079,13 @@ uniform ${precision} ${type} u_${name};
57910
58079
  function TrafficOptions() {
57911
58080
  var _this = _super !== null && _super.apply(this, arguments) || this;
57912
58081
  /**
57913
- * The type of traffic flow to display:
57914
- * <p>"none" is to display no traffic flow data</p>
57915
- * <p>"relative" is the speed of the road relative to free-flow</p>
57916
- * <p>@deprecated "absolute" is the absolute speed of the road</p>
57917
- * <p>@deprecated "relative-delay" displays relative speed only where they differ from free-flow;
57918
- * false to stop displaying the traffic flow.</p>
57919
- * default `"none"``
58082
+ * The type of traffic flow to display:<br />
58083
+ * `"none"` is to display no traffic flow data<br />
58084
+ * `"relative"` is the speed of the road relative to free-flow<br />
58085
+ * @deprecated `"absolute"` is the absolute speed of the road<br />
58086
+ * @deprecated `"relative-delay"` displays relative speed only where they differ from free-flow;
58087
+ * false to stop displaying the traffic flow.<br />
58088
+ * default `"none"`
57920
58089
  * @default "none"
57921
58090
  */
57922
58091
  _this.flow = "none";
@@ -64290,9 +64459,9 @@ uniform ${precision} ${type} u_${name};
64290
64459
  function ElevationTileSourceOptions() {
64291
64460
  var _this = _super !== null && _super.apply(this, arguments) || this;
64292
64461
  /**
64293
- * DEM tiles encoding format. Supported: `mapbox` or `terrarium`.
64294
- * <p>`"terrarium": Terrarium format PNG tiles. See https://aws.amazon.com/es/public-datasets/terrain/ for more info.</p>
64295
- * <p>`"mapbox": Mapbox Terrain RGB tiles. See https://www.mapbox.com/help/access-elevation-data/#mapbox-terrain-rgb for more info.</p>
64462
+ * DEM tiles encoding format. Supported: `mapbox` or `terrarium`.<br />
64463
+ * `"terrarium": Terrarium format PNG tiles. See https://aws.amazon.com/es/public-datasets/terrain/ for more info.<br />
64464
+ * `"mapbox": Mapbox Terrain RGB tiles. See https://www.mapbox.com/help/access-elevation-data/#mapbox-terrain-rgb for more info.<br />
64296
64465
  * default `mapbox`
64297
64466
  * @default mapbox
64298
64467
  */
@@ -64638,9 +64807,9 @@ uniform ${precision} ${type} u_${name};
64638
64807
  */
64639
64808
  _this.strokeWidth = 2;
64640
64809
  /**
64641
- * Specifies the orientation of circle when map is pitched.
64642
- * <p>`"map"`: The circle is aligned to the plane of the map.</p>
64643
- * <p>`"viewport"`: The circle is aligned to the plane of the viewport.</p>
64810
+ * Specifies the orientation of circle when map is pitched.<br />
64811
+ * `"map"`: The circle is aligned to the plane of the map.<br />
64812
+ * `"viewport"`: The circle is aligned to the plane of the viewport.<br />
64644
64813
  * Default: `"viewport"`
64645
64814
  * @default "viewport"
64646
64815
  */
@@ -65678,24 +65847,24 @@ uniform ${precision} ${type} u_${name};
65678
65847
  */
65679
65848
  _this.sourceLayer = undefined;
65680
65849
  /**
65681
- * Specifies how the ends of the lines are rendered.
65682
- * <p>`"butt"`: A cap with a squared-off end which is drawn to the exact endpoint of the line.</p>
65683
- * <p>`"round"`: A cap with a rounded end which is drawn beyond the endpoint of the line
65684
- * at a radius of one-half of the lines width and centered on the endpoint of the line.</p>
65685
- * <p>`"square"`: A cap with a squared-off end which is drawn beyond the endpoint of the line
65686
- * at a distance of one-half of the line width.</p>
65850
+ * Specifies how the ends of the lines are rendered.<br />
65851
+ * `"butt"`: A cap with a squared-off end which is drawn to the exact endpoint of the line.<br />
65852
+ * `"round"`: A cap with a rounded end which is drawn beyond the endpoint of the line
65853
+ * at a radius of one-half of the lines width and centered on the endpoint of the line.<br />
65854
+ * `"square"`: A cap with a squared-off end which is drawn beyond the endpoint of the line
65855
+ * at a distance of one-half of the line width.<br />
65687
65856
  * Default `"round"`.
65688
65857
  * @default "round"
65689
65858
  */
65690
65859
  _this.lineCap = "round";
65691
65860
  /**
65692
- * Specifies how the joints in the lines are rendered.
65693
- * <p>`"bevel"`: A join with a squared-off end which is drawn beyond the endpoint of the line
65694
- * at a distance of one-half of the lines width.</p>
65695
- * <p>`"round"`: A join with a rounded end which is drawn beyond the endpoint of the line
65696
- * at a radius of one-half of the lines width and centered on the endpoint of the line.</p>
65697
- * <p>`"miter"`: A join with a sharp, angled corner which is drawn with the outer sides
65698
- * beyond the endpoint of the path until they meet.</p>
65861
+ * Specifies how the joints in the lines are rendered.<br />
65862
+ * `"bevel"`: A join with a squared-off end which is drawn beyond the endpoint of the line
65863
+ * at a distance of one-half of the lines width.<br />
65864
+ * `"round"`: A join with a rounded end which is drawn beyond the endpoint of the line
65865
+ * at a radius of one-half of the lines width and centered on the endpoint of the line.<br />
65866
+ * `"miter"`: A join with a sharp, angled corner which is drawn with the outer sides
65867
+ * beyond the endpoint of the path until they meet.<br />
65699
65868
  * Default `"round"`.
65700
65869
  * @default "round"
65701
65870
  */
@@ -65746,9 +65915,9 @@ uniform ${precision} ${type} u_${name};
65746
65915
  */
65747
65916
  _this.translate = new Pixel(0, 0);
65748
65917
  /**
65749
- * Specifies the frame of reference for `translate`.
65750
- * <p>`"map"`: Lines are translated relative to the map.</p>
65751
- * <p>`"viewport"`: Lines are translated relative to the viewport</p>
65918
+ * Specifies the frame of reference for `translate`.<br />
65919
+ * `"map"`: Lines are translated relative to the map.<br />
65920
+ * `"viewport"`: Lines are translated relative to the viewport<br />
65752
65921
  * Default: `"map"`
65753
65922
  * @default "map"
65754
65923
  */
@@ -65960,9 +66129,9 @@ uniform ${precision} ${type} u_${name};
65960
66129
  */
65961
66130
  _this.translate = new Pixel(0, 0);
65962
66131
  /**
65963
- * Specifies the frame of reference for `translate`.
65964
- * <p>`"map"`: Polygons are translated relative to the map.</p>
65965
- * <p>`"viewport"`: Polygons are translated relative to the viewport.</p>
66132
+ * Specifies the frame of reference for `translate`.<br />
66133
+ * `"map"`: Polygons are translated relative to the map.<br />
66134
+ * `"viewport"`: Polygons are translated relative to the viewport.<br />
65966
66135
  * Default: `"map"`
65967
66136
  * @default "map"
65968
66137
  */
@@ -66315,16 +66484,16 @@ uniform ${precision} ${type} u_${name};
66315
66484
  */
66316
66485
  _this.allowOverlap = false;
66317
66486
  /**
66318
- * Specifies which part of the icon is placed closest to the icons anchor position on the map.
66319
- * <p>`"center"`: The center of the icon is placed closest to the anchor.</p>
66320
- * <p>`"left"`: The left side of the icon is placed closest to the anchor.</p>
66321
- * <p>`"right"`: The right side of the icon is placed closest to the anchor.</p>
66322
- * <p>`"top"`: The top of the icon is placed closest to the anchor.</p>
66323
- * <p>`"bottom"`: The bottom of the icon is placed closest to the anchor.</p>
66324
- * <p>`"top-left"`: The top left corner of the icon is placed closest to the anchor.</p>
66325
- * <p>`"top-right"`: The top right corner of the icon is placed closest to the anchor.</p>
66326
- * <p>`"bottom-left"`: The bottom left corner of the icon is placed closest to the anchor.</p>
66327
- * <p>`"bottom-right"`: The bottom right corner of the icon is placed closest to the anchor.</p>
66487
+ * Specifies which part of the icon is placed closest to the icons anchor position on the map.<br />
66488
+ * `"center"`: The center of the icon is placed closest to the anchor.<br />
66489
+ * `"left"`: The left side of the icon is placed closest to the anchor.<br />
66490
+ * `"right"`: The right side of the icon is placed closest to the anchor.<br />
66491
+ * `"top"`: The top of the icon is placed closest to the anchor.<br />
66492
+ * `"bottom"`: The bottom of the icon is placed closest to the anchor.<br />
66493
+ * `"top-left"`: The top left corner of the icon is placed closest to the anchor.<br />
66494
+ * `"top-right"`: The top right corner of the icon is placed closest to the anchor.<br />
66495
+ * `"bottom-left"`: The bottom left corner of the icon is placed closest to the anchor.<br />
66496
+ * `"bottom-right"`: The bottom right corner of the icon is placed closest to the anchor.<br />
66328
66497
  * Default `"bottom"`.
66329
66498
  * @default "bottom"
66330
66499
  */
@@ -66369,10 +66538,10 @@ uniform ${precision} ${type} u_${name};
66369
66538
  */
66370
66539
  _this.padding = 2;
66371
66540
  /**
66372
- * Specifies the orientation of the icon when the map is pitched.
66373
- * <p>`"auto"`: Automatically matches the value of `rotationAlignment`.</p>
66374
- * <p>`"map"`: The icon is aligned to the plane of the map.</p>
66375
- * <p>`"viewport"`: The icon is aligned to the plane of the viewport</p>
66541
+ * Specifies the orientation of the icon when the map is pitched.<br />
66542
+ * `"auto"`: Automatically matches the value of `rotationAlignment`.<br />
66543
+ * `"map"`: The icon is aligned to the plane of the map.<br />
66544
+ * `"viewport"`: The icon is aligned to the plane of the viewport<br />
66376
66545
  * Default `"auto"`
66377
66546
  * @default "auto"
66378
66547
  */
@@ -66385,12 +66554,12 @@ uniform ${precision} ${type} u_${name};
66385
66554
  _this.rotation = 0;
66386
66555
  /**
66387
66556
  * In combination with the placement property of a SymbolLayerOptions
66388
- * this determines the rotation behavior of icons.
66389
- * <p>`"auto"`: When placement is "point" this is equivalent to "viewport".
66390
- * When placement is "line" this is equivalent to "map".</p>
66391
- * <p>`"map"`: When placement is "point" aligns icons east-west.
66392
- * When placement is "line" aligns the icons' x-axes with the line.</p>
66393
- * <p>`"viewport"`: Icons' x-axes will align with the x-axis of the viewport.</p>
66557
+ * this determines the rotation behavior of icons.<br />
66558
+ * `"auto"`: When placement is "point" this is equivalent to "viewport".
66559
+ * When placement is "line" this is equivalent to "map".<br />
66560
+ * `"map"`: When placement is "point" aligns icons east-west.
66561
+ * When placement is "line" aligns the icons' x-axes with the line.<br />
66562
+ * `"viewport"`: Icons' x-axes will align with the x-axis of the viewport.<br />
66394
66563
  * Default `"auto"`.
66395
66564
  * @default "auto"
66396
66565
  */
@@ -66443,16 +66612,16 @@ uniform ${precision} ${type} u_${name};
66443
66612
  */
66444
66613
  _this.allowOverlap = false;
66445
66614
  /**
66446
- * Specifies which part of the icon is placed closest to the icons anchor position on the map.
66447
- * <p>`"center"`: The center of the icon is placed closest to the anchor.</p>
66448
- * <p>`"left"`: The left side of the icon is placed closest to the anchor.</p>
66449
- * <p>`"right"`: The right side of the icon is placed closest to the anchor.</p>
66450
- * <p>`"top"`: The top of the icon is placed closest to the anchor.</p>
66451
- * <p>`"bottom"`: The bottom of the icon is placed closest to the anchor.</p>
66452
- * <p>`"top-left"`: The top left corner of the icon is placed closest to the anchor.</p>
66453
- * <p>`"top-right"`: The top right corner of the icon is placed closest to the anchor.</p>
66454
- * <p>`"bottom-left"`: The bottom left corner of the icon is placed closest to the anchor.</p>
66455
- * <p>`"bottom-right"`: The bottom right corner of the icon is placed closest to the anchor.</p>
66615
+ * Specifies which part of the icon is placed closest to the icons anchor position on the map.<br />
66616
+ * `"center"`: The center of the icon is placed closest to the anchor.<br />
66617
+ * `"left"`: The left side of the icon is placed closest to the anchor.<br />
66618
+ * `"right"`: The right side of the icon is placed closest to the anchor.<br />
66619
+ * `"top"`: The top of the icon is placed closest to the anchor.<br />
66620
+ * `"bottom"`: The bottom of the icon is placed closest to the anchor.<br />
66621
+ * `"top-left"`: The top left corner of the icon is placed closest to the anchor.<br />
66622
+ * `"top-right"`: The top right corner of the icon is placed closest to the anchor.<br />
66623
+ * `"bottom-left"`: The bottom left corner of the icon is placed closest to the anchor.<br />
66624
+ * `"bottom-right"`: The bottom right corner of the icon is placed closest to the anchor.<br />
66456
66625
  * Default `"center"`.
66457
66626
  * @default "center"
66458
66627
  */
@@ -66482,11 +66651,11 @@ uniform ${precision} ${type} u_${name};
66482
66651
  */
66483
66652
  _this.ignorePlacement = false;
66484
66653
  /**
66485
- * Text justification options.
66486
- * <p>`"auto"`: The text is aligned towards the anchor position.
66487
- * <p>`"left"`: The text is aligned to the left.
66488
- * <p>`"center"`: The text is centered.
66489
- * <p>`"right"`: The text is aligned to the right.
66654
+ * Text justification options.<br />
66655
+ * `"auto"`: The text is aligned towards the anchor position.<br />
66656
+ * `"left"`: The text is aligned to the left.<br />
66657
+ * `"center"`: The text is centered.<br />
66658
+ * `"right"`: The text is aligned to the right.<br />
66490
66659
  * Default `"center"`.
66491
66660
  * @default "center"
66492
66661
  */
@@ -66514,10 +66683,10 @@ uniform ${precision} ${type} u_${name};
66514
66683
  */
66515
66684
  _this.padding = 2;
66516
66685
  /**
66517
- * Specifies the orientation of the text when the map is pitched.
66518
- * <p>`"auto"`: Automatically matches the value of `rotationAlignment`.</p>
66519
- * <p>`"map"`: The text is aligned to the plane of the map.</p>
66520
- * <p>`"viewport"`: The text is aligned to the plane of the viewport.</p>
66686
+ * Specifies the orientation of the text when the map is pitched.<br />
66687
+ * `"auto"`: Automatically matches the value of `rotationAlignment`.<br />
66688
+ * `"map"`: The text is aligned to the plane of the map.<br />
66689
+ * `"viewport"`: The text is aligned to the plane of the viewport.<br />
66521
66690
  * Default: `"auto"`
66522
66691
  * @default "auto"
66523
66692
  */
@@ -66537,13 +66706,13 @@ uniform ${precision} ${type} u_${name};
66537
66706
  _this.rotation = 0;
66538
66707
  /**
66539
66708
  * In combination with the `placement` property of the `SymbolLayerOptions`,
66540
- * specifies the rotation behavior of the individual glyphs forming the text.
66541
- * <p>`"auto"`: When the `placement` is set to `"point"`, this is equivalent to `"map"`.
66542
- * When the `placement` is set to `"line"` this is equivalent to `"map"`.</p>
66543
- * <p>`"map"`: When the `placement` is set to `"point"`, aligns text east-west.
66544
- * When the `placement` is set to `"line"`, aligns text x-axes with the line.</p>
66545
- * <p>`"viewport"`: Produces glyphs whose x-axes are aligned with the x-axis of the viewport,
66546
- * regardless of the value of `placement`.</p>
66709
+ * specifies the rotation behavior of the individual glyphs forming the text.<br />
66710
+ * `"auto"`: When the `placement` is set to `"point"`, this is equivalent to `"map"`.
66711
+ * When the `placement` is set to `"line"` this is equivalent to `"map"`.<br />
66712
+ * `"map"`: When the `placement` is set to `"point"`, aligns text east-west.
66713
+ * When the `placement` is set to `"line"`, aligns text x-axes with the line.<br />
66714
+ * `"viewport"`: Produces glyphs whose x-axes are aligned with the x-axis of the viewport,
66715
+ * regardless of the value of `placement`.<br />
66547
66716
  * Default: `"auto"`
66548
66717
  * @default "auto"
66549
66718
  */
@@ -66553,16 +66722,16 @@ uniform ${precision} ${type} u_${name};
66553
66722
  * labels on the map. The renderer will attempt to place the label at each location,
66554
66723
  * in order, before moving onto the next label. Use `justify: "auto"` to choose text
66555
66724
  * justification based on anchor position. To apply an offset use the `radialOffset` or
66556
- * two-dimensional `offset` options.
66557
- * <p>`"center"`: The center of the icon is placed closest to the anchor.</p>
66558
- * <p>`"left"`: The left side of the icon is placed closest to the anchor.</p>
66559
- * <p>`"right"`: The right side of the icon is placed closest to the anchor.</p>
66560
- * <p>`"top"`: The top of the icon is placed closest to the anchor.</p>
66561
- * <p>`"bottom"`: The bottom of the icon is placed closest to the anchor.</p>
66562
- * <p>`"top-left"`: The top left corner of the icon is placed closest to the anchor.</p>
66563
- * <p>`"top-right"`: The top right corner of the icon is placed closest to the anchor.</p>
66564
- * <p>`"bottom-left"`: The bottom left corner of the icon is placed closest to the anchor.</p>
66565
- * <p>`"bottom-right"`: The bottom right corner of the icon is placed closest to the anchor.</p>
66725
+ * two-dimensional `offset` options.<br />
66726
+ * `"center"`: The center of the icon is placed closest to the anchor.<br />
66727
+ * `"left"`: The left side of the icon is placed closest to the anchor.<br />
66728
+ * `"right"`: The right side of the icon is placed closest to the anchor.<br />
66729
+ * `"top"`: The top of the icon is placed closest to the anchor.<br />
66730
+ * `"bottom"`: The bottom of the icon is placed closest to the anchor.<br />
66731
+ * `"top-left"`: The top left corner of the icon is placed closest to the anchor.<br />
66732
+ * `"top-right"`: The top right corner of the icon is placed closest to the anchor.<br />
66733
+ * `"bottom-left"`: The bottom left corner of the icon is placed closest to the anchor.<br />
66734
+ * `"bottom-right"`: The bottom right corner of the icon is placed closest to the anchor.<br />
66566
66735
  * Default: `undefined`
66567
66736
  * @default undefined
66568
66737
  */
@@ -66655,12 +66824,12 @@ uniform ${precision} ${type} u_${name};
66655
66824
  */
66656
66825
  _this.textOptions = new TextOptions();
66657
66826
  /**
66658
- * Specifies the label placement relative to its geometry.
66659
- * <p>`"point"`: The label is placed at the point where the geometry is located.</p>
66660
- * <p>`"line"`: The label is placed along the line of the geometry.
66661
- * Can only be used on LineString and Polygon geometries.</p>
66662
- * <p> `"line-center"`: The label is placed at the center of the line of the geometry.
66663
- * Can only be used on `LineString` and `Polygon` geometries </p>
66827
+ * Specifies the label placement relative to its geometry.<br />
66828
+ * `"point"`: The label is placed at the point where the geometry is located.<br />
66829
+ * `"line"`: The label is placed along the line of the geometry.
66830
+ * Can only be used on LineString and Polygon geometries.<br />
66831
+ * `"line-center"`: The label is placed at the center of the line of the geometry.
66832
+ * Can only be used on `LineString` and `Polygon` geometries <br />
66664
66833
  * Default `"point"`.
66665
66834
  * @default "point"
66666
66835
  */
@@ -66675,12 +66844,12 @@ uniform ${precision} ${type} u_${name};
66675
66844
  /**
66676
66845
  * Determines whether overlapping symbols in the same layer are rendered in the order
66677
66846
  * that they appear in the data source, or by their y position relative to the viewport.
66678
- * To control the order and prioritization of symbols otherwise, use `sortKey`.
66679
- * <p>`"auto"`: Sorts symbols by `sortKey` if set. Otherwise behaves like `"viewport-y"`.
66680
- * <p>`"viewport-y"`: Sorts symbols by their y position if `allowOverlap` is `true` or
66681
- * if `ignorePlacement` is `false`.
66682
- * <p>`"source"`: Sorts symbols by `sortKey` if set. Otherwise, symbols are rendered in the
66683
- * same order as the source data.
66847
+ * To control the order and prioritization of symbols otherwise, use `sortKey`.<br />
66848
+ * `"auto"`: Sorts symbols by `sortKey` if set. Otherwise behaves like `"viewport-y"`.<br />
66849
+ * `"viewport-y"`: Sorts symbols by their y position if `allowOverlap` is `true` or
66850
+ * if `ignorePlacement` is `false`.<br />
66851
+ * `"source"`: Sorts symbols by `sortKey` if set. Otherwise, symbols are rendered in the
66852
+ * same order as the source data.<br />
66684
66853
  * Default `"auto"`
66685
66854
  * @default "auto"
66686
66855
  */
@@ -70861,14 +71030,14 @@ uniform ${precision} ${type} u_${name};
70861
71030
  /**
70862
71031
  * Retrieve all Shapes and GeoJSON features that are visible on the map that are in a DataSource or VectorTileSource.
70863
71032
  * Shape objects are editable, while Feature objects are not editable and either reside in a VectorTileSource or represent a cluster point.
70864
- * Clusters have the following properties:
70865
- * <p>cluster: `boolean` - Indicates that the point is a cluster.
71033
+ * Clusters have the following properties:<br />
71034
+ * `cluster`: `boolean` - Indicates that the point is a cluster.
70866
71035
  * This will be set to true if Point object represents a cluster.
70867
71036
  * All other point objects are unlikely to have this value unless
70868
- * a property with this same name was added to the Point property data from your app.</p>
70869
- * <p>cluster_id: `string` - A unique id for the cluster.</p>
70870
- * <p>point_count: `number` - The number of points inside the cluster.</p>
70871
- * <p>point_count_abbreviated: `string` - An abbreviated string version of the point count. i.e. `"10K"`</p>
71037
+ * a property with this same name was added to the Point property data from your app.<br />
71038
+ * `cluster_id`: `string` - A unique id for the cluster.<br />
71039
+ * `point_count`: `number` - The number of points inside the cluster.<br />
71040
+ * `point_count_abbreviated`: `string` - An abbreviated string version of the point count. i.e. `"10K"`<br />
70872
71041
  * Features/Shapes that are not visible or who's layer zoom range does not include the current zoom level will not be returned.
70873
71042
  * Symbol features/Shapes that have been hidden due to text or icon collisions are not included.
70874
71043
  * Features/Shapes from all other layers are included even if they have no contribution to the map rendering, e.g. alpha set to zero.
@@ -71536,10 +71705,10 @@ uniform ${precision} ${type} u_${name};
71536
71705
  */
71537
71706
  _this.duration = 1000;
71538
71707
  /**
71539
- * The type of animation.
71540
- * <p>"jump" is an immediate change.</p>
71541
- * <p>"ease" is a gradual change of the camera's settings.</p>
71542
- * <p>"fly" is a gradual change of the camera's settings following an arc resembling flight.</p>
71708
+ * The type of animation.<br />
71709
+ * `"jump"` is an immediate change.<br />
71710
+ * `"ease"` is a gradual change of the camera's settings.<br />
71711
+ * `"fly"` is a gradual change of the camera's settings following an arc resembling flight.<br />
71543
71712
  * Default `"jump"`.
71544
71713
  * @default "jump"
71545
71714
  */
@@ -71782,6 +71951,7 @@ uniform ${precision} ${type} u_${name};
71782
71951
  _this.pitch = 0;
71783
71952
  /**
71784
71953
  * The minimum zoom level that the map can be zoomed out to during the animation. Must be between 0 and 24, and less than or equal to `maxZoom`.
71954
+ * Setting `minZoom` below 1 may result in an empty map when the zoom level is less than 1.
71785
71955
  * Default `1`.
71786
71956
  * @default 1
71787
71957
  */
@@ -72146,15 +72316,15 @@ uniform ${precision} ${type} u_${name};
72146
72316
  var _this = _super !== null && _super.apply(this, arguments) || this;
72147
72317
  /**
72148
72318
  * Specifies wether extruded geometries are lit relative to the map or viewport.
72149
- * Supported values:
72150
- * <p>`"map"`: The position of the light source is aligned to the rotation of the map.</p>
72151
- * <p>`"viewport"`: The position fo the light source is aligned to the rotation of the viewport.</p>
72319
+ * Supported values:<br />
72320
+ * `"map"`: The position of the light source is aligned to the rotation of the map.<br />
72321
+ * `"viewport"`: The position fo the light source is aligned to the rotation of the viewport.<br />
72152
72322
  * Default: `"map"`
72153
72323
  * @default "map"
72154
72324
  */
72155
72325
  _this.anchor = "map";
72156
72326
  /**
72157
- * Color tint for lighting extruded geometries
72327
+ * Color tint for lighting extruded geometries.
72158
72328
  * Default: `"#FFFFFF"`
72159
72329
  * @default "#FFFFFF"
72160
72330
  */
@@ -74195,6 +74365,9 @@ uniform ${precision} ${type} u_${name};
74195
74365
  pitch: cameraOptions.pitch,
74196
74366
  around: undefined
74197
74367
  };
74368
+ if (cameraOptions.minZoom < 1) {
74369
+ console.warn("Setting minZoom below 1 may result in an empty map when the zoom level is less than 1.");
74370
+ }
74198
74371
  this.map.setMinZoom(cameraOptions.minZoom);
74199
74372
  this.map.setMaxZoom(cameraOptions.maxZoom);
74200
74373
  if (cameraOptions.minPitch) {