maplibre-gl 3.3.0 → 3.4.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.
Files changed (50) hide show
  1. package/LICENSE.txt +1 -1
  2. package/README.md +3 -2
  3. package/build/generate-dist-package.js +7 -2
  4. package/build/generate-typings.ts +1 -1
  5. package/dist/LICENSE.txt +116 -0
  6. package/dist/maplibre-gl-csp-worker.js +1 -1
  7. package/dist/maplibre-gl-csp-worker.js.map +1 -1
  8. package/dist/maplibre-gl-csp.js +1 -1
  9. package/dist/maplibre-gl-csp.js.map +1 -1
  10. package/dist/maplibre-gl-dev.js +243 -100
  11. package/dist/maplibre-gl-dev.js.map +1 -1
  12. package/dist/maplibre-gl.d.ts +28 -15
  13. package/dist/maplibre-gl.js +4 -4
  14. package/dist/maplibre-gl.js.map +1 -1
  15. package/dist/package.json +1 -1
  16. package/package.json +48 -47
  17. package/src/data/dem_data.test.ts +120 -165
  18. package/src/data/dem_data.ts +38 -18
  19. package/src/render/program.ts +15 -0
  20. package/src/source/image_source.test.ts +17 -24
  21. package/src/source/raster_dem_tile_source.ts +15 -2
  22. package/src/source/raster_dem_tile_worker_source.ts +2 -2
  23. package/src/source/raster_tile_source.test.ts +1 -1
  24. package/src/source/raster_tile_source.ts +1 -1
  25. package/src/source/terrain_source_cache.test.ts +1 -1
  26. package/src/source/vector_tile_source.test.ts +1 -1
  27. package/src/source/vector_tile_source.ts +0 -1
  28. package/src/source/vector_tile_worker_source.test.ts +45 -1
  29. package/src/source/vector_tile_worker_source.ts +19 -6
  30. package/src/source/video_source.ts +4 -0
  31. package/src/source/worker_source.ts +6 -2
  32. package/src/style/load_glyph_range.test.ts +6 -8
  33. package/src/style/load_sprite.test.ts +48 -71
  34. package/src/style/style.test.ts +19 -49
  35. package/src/style/style.ts +14 -8
  36. package/src/style/style_layer/line_style_layer.test.ts +50 -0
  37. package/src/style/style_layer/line_style_layer.ts +8 -4
  38. package/src/style/style_layer/variable_text_anchor.ts +1 -1
  39. package/src/ui/control/navigation_control.ts +0 -1
  40. package/src/ui/handler/scroll_zoom.ts +6 -0
  41. package/src/ui/handler_manager.ts +2 -1
  42. package/src/ui/map.test.ts +37 -8
  43. package/src/ui/map.ts +15 -13
  44. package/src/ui/marker.test.ts +25 -0
  45. package/src/ui/marker.ts +9 -2
  46. package/src/ui/popup.ts +1 -1
  47. package/src/util/ajax.test.ts +1 -1
  48. package/src/util/image_request.test.ts +1 -1
  49. package/src/util/test/util.ts +12 -0
  50. package/src/util/throttle.ts +7 -3
package/LICENSE.txt CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2020, MapLibre contributors
1
+ Copyright (c) 2023, MapLibre contributors
2
2
 
3
3
  All rights reserved.
4
4
 
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  # MapLibre GL JS
4
4
 
5
- [![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg?style=flat)](LICENSE.txt) [![Version](https://img.shields.io/npm/v/maplibre-gl?style=flat)](https://www.npmjs.com/package/maplibre-gl) [![CI](https://github.com/maplibre/maplibre-gl-js/actions/workflows/ci.yml/badge.svg)](https://github.com/maplibre/maplibre-gl-js/actions/workflows/ci.yml) [![PRs](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat)](https://opensource.org/licenses/BSD-3-Clause) [![codecov](https://codecov.io/gh/maplibre/maplibre-gl-js/branch/main/graph/badge.svg)](https://codecov.io/gh/maplibre/maplibre-gl-js)
5
+ [![License](https://img.shields.io/badge/License-BSD_3--Clause-blue.svg?style=flat)](LICENSE.txt) [![Version](https://img.shields.io/npm/v/maplibre-gl?style=flat)](https://www.npmjs.com/package/maplibre-gl) [![CI](https://github.com/maplibre/maplibre-gl-js/actions/workflows/test-all.yml/badge.svg)](https://github.com/maplibre/maplibre-gl-js/actions/workflows/test-all.yml) [![PRs](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat)](https://opensource.org/licenses/BSD-3-Clause) [![codecov](https://codecov.io/gh/maplibre/maplibre-gl-js/branch/main/graph/badge.svg)](https://codecov.io/gh/maplibre/maplibre-gl-js)
6
6
 
7
7
  **[MapLibre GL JS](https://maplibre.org/maplibre-gl-js/docs/API/)** is an open-source library for publishing maps on your websites or webview based apps. Fast displaying of maps is possible thanks to GPU-accelerated vector tile rendering.
8
8
 
@@ -68,7 +68,7 @@ MapLibre GL JS v1 is completely backward compatible with Mapbox GL JS v1. This c
68
68
 
69
69
  #### CDN Links
70
70
 
71
- > MapLibre GL JS is distributed via [unpkg.com](https://unpkg.com). For more information, please see [MapLibre GL JS is on unpkg.com](./documents_and_diagrams/README-unpkg.md#maplibre-gl-on-unpkgcom).
71
+ > MapLibre GL JS is distributed via [unpkg.com](https://unpkg.com). For more information, please see [MapLibre GL JS is on unpkg.com](./developer-guides/README-unpkg.md).
72
72
 
73
73
  ```diff
74
74
  - <script src="https://api.mapbox.com/mapbox-gl-js/v#.#.#/mapbox-gl.js"></script>
@@ -140,6 +140,7 @@ Silver:
140
140
 
141
141
  <a href="https://www.jawg.io/"><img src="https://maplibre.org/img/jawgmaps-logo.svg" alt="Logo JawgMaps" width="25%"/></a>
142
142
 
143
+ <a href="https://www.radar.com/"><img src="https://maplibre.org/img/radar-logo.svg" alt="Logo Radar" width="25%"/></a>
143
144
 
144
145
  Backers and Supporters:
145
146
 
@@ -3,7 +3,7 @@
3
3
  /// This package.json ensures that node imports from outside see them as such
4
4
  // https://nodejs.org/api/packages.html#type
5
5
 
6
- import { writeFile, mkdir } from "node:fs/promises"
6
+ import { writeFile, mkdir, copyFile } from "node:fs/promises"
7
7
 
8
8
  async function ensureDist() {
9
9
  const dist = new URL("../dist/", import.meta.url);
@@ -14,8 +14,13 @@ async function ensureDist() {
14
14
  await writeFile(
15
15
  new URL("package.json", await ensureDist()),
16
16
  JSON.stringify({
17
- name: "@maplibre/distfiles",
17
+ name: "maplibre-gl",
18
18
  type: "commonjs",
19
19
  deprecated: "Please install maplibre-gl from parent directory instead",
20
20
  })
21
21
  )
22
+
23
+ await copyFile(
24
+ "./LICENSE.txt",
25
+ new URL("LICENSE.txt", await ensureDist())
26
+ )
@@ -14,5 +14,5 @@ let types = fs.readFileSync(outputFile, 'utf8');
14
14
  types = types.replace(/declare class/g, 'export declare class');
15
15
  fs.writeFileSync(outputFile, types);
16
16
 
17
- console.log('Finifhed bundling types for maplibre-gl ');
17
+ console.log('Finished bundling types for MapLibre GL JS');
18
18
 
@@ -0,0 +1,116 @@
1
+ Copyright (c) 2023, MapLibre contributors
2
+
3
+ All rights reserved.
4
+
5
+ Redistribution and use in source and binary forms, with or without modification,
6
+ are permitted provided that the following conditions are met:
7
+
8
+ * Redistributions of source code must retain the above copyright notice,
9
+ this list of conditions and the following disclaimer.
10
+ * Redistributions in binary form must reproduce the above copyright notice,
11
+ this list of conditions and the following disclaimer in the documentation
12
+ and/or other materials provided with the distribution.
13
+ * Neither the name of MapLibre GL JS nor the names of its contributors
14
+ may be used to endorse or promote products derived from this software
15
+ without specific prior written permission.
16
+
17
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
21
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
22
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
23
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
24
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
25
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
26
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
+
29
+
30
+ -------------------------------------------------------------------------------
31
+
32
+ Contains code from mapbox-gl-js v1.13 and earlier
33
+
34
+ Version v1.13 of mapbox-gl-js and earlier are licensed under a BSD-3-Clause license
35
+
36
+ Copyright (c) 2020, Mapbox
37
+ Redistribution and use in source and binary forms, with or without modification,
38
+ are permitted provided that the following conditions are met:
39
+
40
+ * Redistributions of source code must retain the above copyright notice,
41
+ this list of conditions and the following disclaimer.
42
+ * Redistributions in binary form must reproduce the above copyright notice,
43
+ this list of conditions and the following disclaimer in the documentation
44
+ and/or other materials provided with the distribution.
45
+ * Neither the name of Mapbox GL JS nor the names of its contributors
46
+ may be used to endorse or promote products derived from this software
47
+ without specific prior written permission.
48
+
49
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
50
+ "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
51
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
52
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
53
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
54
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
55
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
56
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
57
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
58
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
59
+ EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
60
+
61
+
62
+ -------------------------------------------------------------------------------
63
+
64
+ Contains code from glfx.js
65
+
66
+ Copyright (C) 2011 by Evan Wallace
67
+
68
+ Permission is hereby granted, free of charge, to any person obtaining a copy
69
+ of this software and associated documentation files (the "Software"), to deal
70
+ in the Software without restriction, including without limitation the rights
71
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
72
+ copies of the Software, and to permit persons to whom the Software is
73
+ furnished to do so, subject to the following conditions:
74
+
75
+ The above copyright notice and this permission notice shall be included in
76
+ all copies or substantial portions of the Software.
77
+
78
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
79
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
80
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
81
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
82
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
83
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
84
+ THE SOFTWARE.
85
+
86
+ --------------------------------------------------------------------------------
87
+
88
+ Contains a portion of d3-color https://github.com/d3/d3-color
89
+
90
+ Copyright 2010-2016 Mike Bostock
91
+ All rights reserved.
92
+
93
+ Redistribution and use in source and binary forms, with or without modification,
94
+ are permitted provided that the following conditions are met:
95
+
96
+ * Redistributions of source code must retain the above copyright notice, this
97
+ list of conditions and the following disclaimer.
98
+
99
+ * Redistributions in binary form must reproduce the above copyright notice,
100
+ this list of conditions and the following disclaimer in the documentation
101
+ and/or other materials provided with the distribution.
102
+
103
+ * Neither the name of the author nor the names of contributors may be used to
104
+ endorse or promote products derived from this software without specific prior
105
+ written permission.
106
+
107
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
108
+ ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
109
+ WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
110
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
111
+ ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
112
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
113
+ LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
114
+ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
115
+ (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
116
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.