maplibre-gl 2.3.0 → 2.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.
- package/build/generate-query-test-fixtures.ts +3 -2
- package/build/generate-struct-arrays.ts +0 -2
- package/build/generate-style-spec.ts +12 -17
- package/build/rollup_plugins.ts +0 -4
- package/dist/maplibre-gl-csp-worker.js +1 -1
- package/dist/maplibre-gl-csp.js +1 -1
- package/dist/maplibre-gl-dev.js +179 -1369
- package/dist/maplibre-gl.d.ts +15 -16
- package/dist/maplibre-gl.js +4 -4
- package/dist/style-spec/index.d.ts +3 -16
- package/package.json +20 -21
- package/src/data/array_types.g.ts +0 -5
- package/src/data/bucket/fill_bucket.ts +0 -2
- package/src/data/bucket/fill_extrusion_bucket.ts +0 -2
- package/src/data/feature_position_map.ts +1 -2
- package/src/gl/framebuffer.ts +3 -2
- package/src/gl/index_buffer.ts +1 -2
- package/src/gl/vertex_buffer.ts +1 -2
- package/src/index.ts +1 -3
- package/src/render/draw_debug.ts +1 -1
- package/src/render/draw_fill.ts +9 -1
- package/src/render/draw_fill_extrusion.ts +8 -1
- package/src/render/draw_heatmap.ts +5 -3
- package/src/render/draw_hillshade.ts +17 -2
- package/src/render/image_manager.ts +5 -7
- package/src/render/program/line_program.ts +1 -1
- package/src/render/program/pattern.ts +0 -2
- package/src/render/program.ts +12 -9
- package/src/render/vertex_array_object.ts +1 -3
- package/src/source/geojson_worker_source.ts +0 -4
- package/src/source/query_features.ts +0 -3
- package/src/source/rtl_text_plugin.ts +3 -4
- package/src/source/source_cache.ts +0 -2
- package/src/source/tile_id.ts +8 -8
- package/src/source/worker.ts +0 -7
- package/src/source/worker_tile.ts +3 -2
- package/src/style/format_section_override.ts +1 -2
- package/src/style/properties.ts +1 -3
- package/src/style/style.ts +6 -5
- package/src/style/style_layer/custom_style_layer.ts +1 -2
- package/src/style/style_layer/symbol_style_layer.ts +5 -8
- package/src/style-spec/CHANGELOG.md +2 -2
- package/src/style-spec/expression/compound_expression.ts +0 -4
- package/src/style-spec/expression/definitions/assertion.ts +2 -4
- package/src/style-spec/expression/definitions/case.ts +1 -2
- package/src/style-spec/expression/definitions/coalesce.ts +1 -3
- package/src/style-spec/expression/definitions/coercion.ts +2 -4
- package/src/style-spec/expression/definitions/match.ts +0 -3
- package/src/style-spec/expression/index.ts +0 -2
- package/src/style-spec/expression/values.ts +0 -2
- package/src/style-spec/feature_filter/feature_filter.test.ts +39 -2
- package/src/style-spec/function/convert.ts +1 -3
- package/src/style-spec/types.g.ts +12 -17
- package/src/symbol/collision_index.ts +0 -3
- package/src/symbol/path_interpolator.ts +0 -2
- package/src/symbol/placement.ts +14 -9
- package/src/symbol/shaping.ts +0 -4
- package/src/ui/camera.test.ts +64 -1
- package/src/ui/camera.ts +36 -10
- package/src/ui/control/attribution_control.test.ts +62 -0
- package/src/ui/control/attribution_control.ts +4 -2
- package/src/ui/control/geolocate_control.ts +4 -6
- package/src/ui/control/terrain_control.test.ts +60 -0
- package/src/ui/handler/handler_util.ts +1 -2
- package/src/ui/handler/map_event.test.ts +65 -1
- package/src/ui/handler/map_event.ts +4 -1
- package/src/ui/handler/scroll_zoom.ts +0 -2
- package/src/ui/handler_manager.ts +0 -2
- package/src/ui/map.test.ts +105 -0
- package/src/ui/map.ts +8 -1
- package/src/util/ajax.ts +1 -2
- package/src/util/color_ramp.ts +1 -2
- package/src/util/dictionary_coder.ts +1 -3
- package/src/util/dispatcher.ts +1 -4
- package/src/util/dom.ts +0 -3
- package/src/util/image.ts +1 -3
- package/src/util/struct_array.ts +0 -5
- package/src/util/task_queue.ts +1 -3
- package/src/util/web_worker_transfer.ts +5 -6
package/dist/maplibre-gl.d.ts
CHANGED
|
@@ -369,8 +369,6 @@ export declare type ExpressionSpecification = [
|
|
|
369
369
|
ExpressionInputType | ExpressionSpecification
|
|
370
370
|
] | [
|
|
371
371
|
"coalesce",
|
|
372
|
-
ExpressionInputType | ExpressionSpecification,
|
|
373
|
-
ExpressionInputType | ExpressionSpecification,
|
|
374
372
|
...(ExpressionInputType | ExpressionSpecification)[]
|
|
375
373
|
] | [
|
|
376
374
|
"match",
|
|
@@ -386,27 +384,20 @@ export declare type ExpressionSpecification = [
|
|
|
386
384
|
"interpolate",
|
|
387
385
|
InterpolationSpecification,
|
|
388
386
|
number | ExpressionSpecification,
|
|
389
|
-
number |
|
|
390
|
-
ExpressionInputType | ExpressionSpecification,
|
|
391
|
-
...(number | ExpressionInputType | ExpressionSpecification)[]
|
|
387
|
+
...(number | number[] | ColorSpecification)[]
|
|
392
388
|
] | [
|
|
393
389
|
"interpolate-hcl",
|
|
394
390
|
InterpolationSpecification,
|
|
395
391
|
number | ExpressionSpecification,
|
|
396
|
-
number |
|
|
397
|
-
ExpressionInputType | ExpressionSpecification,
|
|
398
|
-
...(number | ColorSpecification | ExpressionSpecification)[]
|
|
392
|
+
...(number | ColorSpecification)[]
|
|
399
393
|
] | [
|
|
400
394
|
"interpolate-lab",
|
|
401
395
|
InterpolationSpecification,
|
|
402
396
|
number | ExpressionSpecification,
|
|
403
|
-
number |
|
|
404
|
-
ExpressionInputType | ExpressionSpecification,
|
|
405
|
-
...(number | ColorSpecification | ExpressionSpecification)[]
|
|
397
|
+
...(number | ColorSpecification)[]
|
|
406
398
|
] | [
|
|
407
399
|
"step",
|
|
408
400
|
number | ExpressionSpecification,
|
|
409
|
-
number | ExpressionSpecification,
|
|
410
401
|
ExpressionInputType | ExpressionSpecification,
|
|
411
402
|
...(number | ExpressionInputType | ExpressionSpecification)[]
|
|
412
403
|
] | [
|
|
@@ -419,8 +410,6 @@ export declare type ExpressionSpecification = [
|
|
|
419
410
|
string
|
|
420
411
|
] | [
|
|
421
412
|
"concat",
|
|
422
|
-
ExpressionInputType | ExpressionSpecification,
|
|
423
|
-
ExpressionInputType | ExpressionSpecification,
|
|
424
413
|
...(ExpressionInputType | ExpressionSpecification)[]
|
|
425
414
|
] | [
|
|
426
415
|
"downcase",
|
|
@@ -471,8 +460,6 @@ export declare type ExpressionSpecification = [
|
|
|
471
460
|
number | ExpressionSpecification
|
|
472
461
|
] | [
|
|
473
462
|
"+",
|
|
474
|
-
number | ExpressionSpecification,
|
|
475
|
-
number | ExpressionSpecification,
|
|
476
463
|
...(number | ExpressionSpecification)[]
|
|
477
464
|
] | [
|
|
478
465
|
"abs",
|
|
@@ -8633,6 +8620,17 @@ declare abstract class Camera extends Evented {
|
|
|
8633
8620
|
* @see [Update a feature in realtime](https://maplibre.org/maplibre-gl-js-docs/example/live-update-feature/)
|
|
8634
8621
|
*/
|
|
8635
8622
|
jumpTo(options: JumpToOptions, eventData?: any): this;
|
|
8623
|
+
/**
|
|
8624
|
+
* Calculates pitch, zoom and bearing for looking at @param newCenter with the camera position being @param newCenter
|
|
8625
|
+
* and returns them as Cameraoptions.
|
|
8626
|
+
* @memberof Map#
|
|
8627
|
+
* @param from The camera to look from
|
|
8628
|
+
* @param altitudeFrom The altitude of the camera to look from
|
|
8629
|
+
* @param to The center to look at
|
|
8630
|
+
* @param altitudeTo Optional altitude of the center to look at. If none given the ground height will be used.
|
|
8631
|
+
* @returns {CameraOptions} the calculated camera options
|
|
8632
|
+
*/
|
|
8633
|
+
calculateCameraOptionsFromTo(from: LngLat, altitudeFrom: number, to: LngLat, altitudeTo?: number): CameraOptions;
|
|
8636
8634
|
/**
|
|
8637
8635
|
* Changes any combination of `center`, `zoom`, `bearing`, `pitch`, and `padding` with an animated transition
|
|
8638
8636
|
* between old and new values. The map will retain its current values for any
|
|
@@ -9527,6 +9525,7 @@ export declare class Map extends Camera {
|
|
|
9527
9525
|
* map.hasControl(navigation);
|
|
9528
9526
|
*/
|
|
9529
9527
|
hasControl(control: IControl): boolean;
|
|
9528
|
+
calculateCameraOptionsFromTo(from: LngLat, altitudeFrom: number, to: LngLat, altitudeTo?: number): CameraOptions;
|
|
9530
9529
|
/**
|
|
9531
9530
|
* Resizes the map according to the dimensions of its
|
|
9532
9531
|
* `container` element.
|