maplibre-gl 3.0.0-pre.5 → 3.0.0-pre.6
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.
- package/README.md +1 -1
- package/build/generate-style-code.ts +5 -5
- package/dist/maplibre-gl-csp-worker.js +1 -1
- package/dist/maplibre-gl-csp-worker.js.map +1 -1
- package/dist/maplibre-gl-csp.js +1 -1
- package/dist/maplibre-gl-csp.js.map +1 -1
- package/dist/maplibre-gl-dev.js +278 -432
- package/dist/maplibre-gl-dev.js.map +1 -1
- package/dist/maplibre-gl.d.ts +17 -29
- package/dist/maplibre-gl.js +7 -3
- package/dist/maplibre-gl.js.map +1 -1
- package/package.json +22 -20
- package/src/geo/lng_lat_bounds.test.ts +15 -1
- package/src/geo/lng_lat_bounds.ts +4 -0
- package/src/gl/context.ts +35 -31
- package/src/gl/state.test.ts +4 -4
- package/src/gl/value.ts +11 -11
- package/src/gl/webgl2.ts +12 -0
- package/src/index.ts +3 -3
- package/src/render/draw_heatmap.ts +4 -2
- package/src/render/painter.ts +2 -51
- package/src/render/vertex_array_object.ts +15 -30
- package/src/source/raster_dem_tile_source.ts +1 -1
- package/src/source/raster_tile_source.test.ts +31 -0
- package/src/source/raster_tile_source.ts +2 -2
- package/src/source/source_cache.test.ts +30 -0
- package/src/source/source_cache.ts +1 -1
- package/src/style/light.ts +9 -8
- package/src/style/style_layer/background_style_layer_properties.g.ts +3 -4
- package/src/style/style_layer/circle_style_layer_properties.g.ts +5 -6
- package/src/style/style_layer/fill_extrusion_style_layer_properties.g.ts +3 -4
- package/src/style/style_layer/fill_style_layer_properties.g.ts +5 -6
- package/src/style/style_layer/heatmap_style_layer_properties.g.ts +3 -4
- package/src/style/style_layer/hillshade_style_layer_properties.g.ts +3 -4
- package/src/style/style_layer/line_style_layer.ts +6 -3
- package/src/style/style_layer/line_style_layer_properties.g.ts +5 -6
- package/src/style/style_layer/raster_style_layer_properties.g.ts +3 -4
- package/src/style/style_layer/symbol_style_layer_properties.g.ts +5 -6
- package/src/ui/control/geolocate_control.test.ts +20 -3
- package/src/ui/control/geolocate_control.ts +6 -5
- package/src/ui/map/requestRenderFrame.test.ts +18 -2
- package/src/ui/map.test.ts +41 -0
- package/src/ui/map.ts +20 -47
- package/src/util/ajax.ts +4 -3
- package/src/util/image_request.test.ts +137 -89
- package/src/util/image_request.ts +104 -33
- package/src/util/test/util.ts +10 -2
- package/src/util/worker_pool.ts +3 -1
package/README.md
CHANGED
|
@@ -68,7 +68,7 @@ Maplibre v1 is completely backward compatible with Mapbox v1. This compatibility
|
|
|
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 is on unpkg.com](./
|
|
71
|
+
> MapLibre GL JS is distributed via [unpkg.com](https://unpkg.com). For more information, please see [MapLibre GL is on unpkg.com](./documents_and_diagrams/README-unpkg.md#maplibre-gl-on-unpkgcom).
|
|
72
72
|
|
|
73
73
|
```diff
|
|
74
74
|
- <script src="https://api.mapbox.com/mapbox-gl-js/v#.#.#/mapbox-gl.js"></script>
|
|
@@ -223,7 +223,8 @@ export type ${layerType}LayoutPropsPossiblyEvaluated = {`);
|
|
|
223
223
|
output.push(
|
|
224
224
|
`};
|
|
225
225
|
|
|
226
|
-
|
|
226
|
+
let layout: Properties<${layerType}LayoutProps>;
|
|
227
|
+
const getLayout = () => layout = layout || new Properties({`);
|
|
227
228
|
|
|
228
229
|
for (const property of layoutProperties) {
|
|
229
230
|
output.push(
|
|
@@ -263,7 +264,8 @@ export type ${layerType}PaintPropsPossiblyEvaluated = {`);
|
|
|
263
264
|
|
|
264
265
|
output.push(
|
|
265
266
|
`
|
|
266
|
-
|
|
267
|
+
let paint: Properties<${layerType}PaintProps>;
|
|
268
|
+
const getPaint = () => paint = paint || new Properties({`);
|
|
267
269
|
|
|
268
270
|
for (const property of paintProperties) {
|
|
269
271
|
output.push(
|
|
@@ -273,9 +275,7 @@ const paint: Properties<${layerType}PaintProps> = new Properties({`);
|
|
|
273
275
|
output.push(
|
|
274
276
|
`});
|
|
275
277
|
|
|
276
|
-
export default ({ paint${layoutProperties.length ? ', layout' : ''} }
|
|
277
|
-
paint: Properties<${layerType}PaintProps>${layoutProperties.length ? `,\n layout: Properties<${layerType}LayoutProps>` : ''}
|
|
278
|
-
});`);
|
|
278
|
+
export default ({ get paint() { return getPaint() }${layoutProperties.length ? ', get layout() { return getLayout() }' : ''} });`);
|
|
279
279
|
|
|
280
280
|
return output.join('\n');
|
|
281
281
|
}
|