maplibre-gl 3.4.1 → 3.5.0

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.
@@ -1,4 +1,4 @@
1
- /* MapLibre GL JS is licensed under the 3-Clause BSD License. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v3.4.1/LICENSE.txt */
1
+ /* MapLibre GL JS is licensed under the 3-Clause BSD License. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v3.5.0/LICENSE.txt */
2
2
  (function (global, factory) {
3
3
  typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
4
4
  typeof define === 'function' && define.amd ? define(factory) :
@@ -34303,7 +34303,7 @@ define(['./shared'], (function (performance) { 'use strict';
34303
34303
 
34304
34304
  var name = "maplibre-gl";
34305
34305
  var description = "BSD licensed community fork of mapbox-gl, a WebGL interactive maps library";
34306
- var version$2 = "3.4.1";
34306
+ var version$2 = "3.5.0";
34307
34307
  var main = "dist/maplibre-gl.js";
34308
34308
  var style = "dist/maplibre-gl.css";
34309
34309
  var license = "BSD-3-Clause";
@@ -34354,9 +34354,9 @@ var devDependencies = {
34354
34354
  "@types/benchmark": "^2.1.3",
34355
34355
  "@types/cssnano": "^5.0.0",
34356
34356
  "@types/d3": "^7.4.1",
34357
- "@types/diff": "^5.0.5",
34357
+ "@types/diff": "^5.0.6",
34358
34358
  "@types/earcut": "^2.1.2",
34359
- "@types/eslint": "^8.44.3",
34359
+ "@types/eslint": "^8.44.4",
34360
34360
  "@types/gl": "^6.0.3",
34361
34361
  "@types/glob": "^8.1.0",
34362
34362
  "@types/jest": "^29.5.3",
@@ -34368,20 +34368,20 @@ var devDependencies = {
34368
34368
  "@types/offscreencanvas": "^2019.7.1",
34369
34369
  "@types/pixelmatch": "^5.2.4",
34370
34370
  "@types/pngjs": "^6.0.2",
34371
- "@types/react": "^18.2.25",
34372
- "@types/react-dom": "^18.2.11",
34373
- "@types/request": "^2.48.9",
34371
+ "@types/react": "^18.2.28",
34372
+ "@types/react-dom": "^18.2.13",
34373
+ "@types/request": "^2.48.10",
34374
34374
  "@types/shuffle-seed": "^1.1.0",
34375
34375
  "@types/window-or-global": "^1.0.4",
34376
- "@typescript-eslint/eslint-plugin": "^6.7.4",
34377
- "@typescript-eslint/parser": "^6.7.4",
34376
+ "@typescript-eslint/eslint-plugin": "^6.7.5",
34377
+ "@typescript-eslint/parser": "^6.7.5",
34378
34378
  address: "^2.0.1",
34379
34379
  benchmark: "^2.1.4",
34380
34380
  canvas: "^2.11.2",
34381
34381
  cssnano: "^6.0.1",
34382
34382
  d3: "^7.8.5",
34383
34383
  "d3-queue": "^3.0.7",
34384
- "devtools-protocol": "^0.0.1206220",
34384
+ "devtools-protocol": "^0.0.1208070",
34385
34385
  diff: "^5.1.0",
34386
34386
  "dts-bundle-generator": "^8.0.1",
34387
34387
  eslint: "^8.51.0",
@@ -36578,6 +36578,25 @@ class RasterTileSource extends performance.Evented {
36578
36578
  this._tileJSONRequest = null;
36579
36579
  }
36580
36580
  }
36581
+ setSourceProperty(callback) {
36582
+ if (this._tileJSONRequest) {
36583
+ this._tileJSONRequest.cancel();
36584
+ }
36585
+ callback();
36586
+ this.load();
36587
+ }
36588
+ /**
36589
+ * Sets the source `tiles` property and re-renders the map.
36590
+ *
36591
+ * @param tiles - An array of one or more tile source URLs, as in the raster tiles spec (See the [Style Specification](https://maplibre.org/maplibre-style-spec/)
36592
+ * @returns `this`
36593
+ */
36594
+ setTiles(tiles) {
36595
+ this.setSourceProperty(() => {
36596
+ this._options.tiles = tiles;
36597
+ });
36598
+ return this;
36599
+ }
36581
36600
  serialize() {
36582
36601
  return performance.extend({}, this._options);
36583
36602
  }