maplibre-gl 2.0.5 → 2.1.3
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/{banner.js → banner.ts} +1 -1
- package/build/generate-query-test-fixtures.ts +123 -0
- package/build/generate-shaders.ts +35 -0
- package/build/generate-struct-arrays.ts +7 -7
- package/build/generate-style-code.ts +8 -8
- package/build/generate-style-spec.ts +5 -4
- package/build/generate-typings.ts +16 -0
- package/build/readme.md +8 -18
- package/build/release-notes.js +9 -13
- package/build/{rollup_plugin_minify_style_spec.js → rollup_plugin_minify_style_spec.ts} +4 -3
- package/build/{rollup_plugins.js → rollup_plugins.ts} +12 -26
- package/dist/maplibre-gl-dev.js +54885 -0
- package/dist/maplibre-gl.css +1 -1
- package/dist/maplibre-gl.d.ts +1574 -1022
- package/dist/maplibre-gl.js +3 -3
- package/dist/maplibre-gl.js.map +1 -1
- package/package.json +94 -131
- package/src/css/maplibre-gl.css +49 -49
- package/src/data/{array_types.ts → array_types.g.ts} +0 -0
- package/src/data/bucket/circle_bucket.ts +1 -1
- package/src/data/bucket/fill_bucket.test.ts +1 -1
- package/src/data/bucket/fill_bucket.ts +4 -4
- package/src/data/bucket/fill_extrusion_bucket.ts +1 -1
- package/src/data/bucket/line_bucket.test.ts +1 -1
- package/src/data/bucket/line_bucket.ts +6 -6
- package/src/data/bucket/symbol_bucket.test.ts +16 -16
- package/src/data/bucket/symbol_bucket.ts +56 -56
- package/src/data/bucket.ts +43 -43
- package/src/data/dem_data.ts +12 -12
- package/src/data/evaluation_feature.ts +10 -10
- package/src/data/feature_index.ts +37 -37
- package/src/data/feature_position_map.ts +5 -5
- package/src/data/index_array_type.ts +1 -1
- package/src/data/load_geometry.test.ts +1 -1
- package/src/data/program_configuration.ts +47 -47
- package/src/data/segment.ts +14 -14
- package/src/geo/edge_insets.ts +2 -2
- package/src/geo/lng_lat.ts +4 -4
- package/src/geo/lng_lat_bounds.ts +35 -35
- package/src/geo/mercator_coordinate.ts +5 -5
- package/src/geo/transform.test.ts +1 -1
- package/src/geo/transform.ts +14 -14
- package/src/gl/context.ts +3 -3
- package/src/gl/types.ts +19 -19
- package/src/gl/value.ts +6 -6
- package/src/gl/vertex_buffer.test.ts +1 -1
- package/src/index.ts +24 -9
- package/src/render/draw_circle.ts +8 -8
- package/src/render/draw_collision_debug.ts +5 -5
- package/src/render/draw_debug.ts +1 -1
- package/src/render/draw_line.ts +4 -4
- package/src/render/draw_symbol.ts +21 -21
- package/src/render/glyph_atlas.ts +12 -12
- package/src/render/glyph_manager.test.ts +10 -21
- package/src/render/glyph_manager.ts +34 -33
- package/src/render/image_manager.ts +4 -4
- package/src/render/painter.ts +16 -14
- package/src/render/program/background_program.ts +29 -29
- package/src/render/program/circle_program.ts +11 -11
- package/src/render/program/clipping_mask_program.ts +1 -1
- package/src/render/program/collision_program.ts +9 -9
- package/src/render/program/debug_program.ts +4 -4
- package/src/render/program/fill_extrusion_program.ts +31 -31
- package/src/render/program/fill_program.ts +29 -29
- package/src/render/program/heatmap_program.ts +12 -12
- package/src/render/program/hillshade_program.ts +12 -12
- package/src/render/program/line_program.ts +41 -41
- package/src/render/program/pattern.ts +28 -28
- package/src/render/program/raster_program.ts +21 -21
- package/src/render/program/symbol_program.ts +97 -97
- package/src/render/program.ts +25 -25
- package/src/render/texture.ts +9 -9
- package/src/render/uniform_binding.ts +1 -1
- package/src/render/vertex_array_object.ts +13 -13
- package/src/shaders/_prelude.fragment.glsl.g.ts +2 -0
- package/src/shaders/_prelude.vertex.glsl.g.ts +2 -0
- package/src/shaders/background.fragment.glsl.g.ts +2 -0
- package/src/shaders/background.vertex.glsl.g.ts +2 -0
- package/src/shaders/background_pattern.fragment.glsl.g.ts +2 -0
- package/src/shaders/background_pattern.vertex.glsl.g.ts +2 -0
- package/src/shaders/circle.fragment.glsl.g.ts +2 -0
- package/src/shaders/circle.vertex.glsl.g.ts +2 -0
- package/src/shaders/clipping_mask.fragment.glsl.g.ts +2 -0
- package/src/shaders/clipping_mask.vertex.glsl.g.ts +2 -0
- package/src/shaders/collision_box.fragment.glsl.g.ts +2 -0
- package/src/shaders/collision_box.vertex.glsl.g.ts +2 -0
- package/src/shaders/collision_circle.fragment.glsl.g.ts +2 -0
- package/src/shaders/collision_circle.vertex.glsl.g.ts +2 -0
- package/src/shaders/debug.fragment.glsl.g.ts +2 -0
- package/src/shaders/debug.vertex.glsl.g.ts +2 -0
- package/src/shaders/fill.fragment.glsl.g.ts +2 -0
- package/src/shaders/fill.vertex.glsl.g.ts +2 -0
- package/src/shaders/fill_extrusion.fragment.glsl.g.ts +2 -0
- package/src/shaders/fill_extrusion.vertex.glsl.g.ts +2 -0
- package/src/shaders/fill_extrusion_pattern.fragment.glsl.g.ts +2 -0
- package/src/shaders/fill_extrusion_pattern.vertex.glsl.g.ts +2 -0
- package/src/shaders/fill_outline.fragment.glsl.g.ts +2 -0
- package/src/shaders/fill_outline.vertex.glsl.g.ts +2 -0
- package/src/shaders/fill_outline_pattern.fragment.glsl.g.ts +2 -0
- package/src/shaders/fill_outline_pattern.vertex.glsl.g.ts +2 -0
- package/src/shaders/fill_pattern.fragment.glsl.g.ts +2 -0
- package/src/shaders/fill_pattern.vertex.glsl.g.ts +2 -0
- package/src/shaders/heatmap.fragment.glsl.g.ts +2 -0
- package/src/shaders/heatmap.vertex.glsl.g.ts +2 -0
- package/src/shaders/heatmap_texture.fragment.glsl.g.ts +2 -0
- package/src/shaders/heatmap_texture.vertex.glsl.g.ts +2 -0
- package/src/shaders/hillshade.fragment.glsl.g.ts +2 -0
- package/src/shaders/hillshade.vertex.glsl.g.ts +2 -0
- package/src/shaders/hillshade_prepare.fragment.glsl.g.ts +2 -0
- package/src/shaders/hillshade_prepare.vertex.glsl.g.ts +2 -0
- package/src/shaders/line.fragment.glsl.g.ts +2 -0
- package/src/shaders/line.vertex.glsl.g.ts +2 -0
- package/src/shaders/line_gradient.fragment.glsl.g.ts +2 -0
- package/src/shaders/line_gradient.vertex.glsl.g.ts +2 -0
- package/src/shaders/line_pattern.fragment.glsl.g.ts +2 -0
- package/src/shaders/line_pattern.vertex.glsl.g.ts +2 -0
- package/src/shaders/line_sdf.fragment.glsl.g.ts +2 -0
- package/src/shaders/line_sdf.vertex.glsl.g.ts +2 -0
- package/src/shaders/raster.fragment.glsl.g.ts +2 -0
- package/src/shaders/raster.vertex.glsl.g.ts +2 -0
- package/src/shaders/shaders.ts +52 -55
- package/src/shaders/symbol_icon.fragment.glsl.g.ts +2 -0
- package/src/shaders/symbol_icon.vertex.glsl.g.ts +2 -0
- package/src/shaders/symbol_sdf.fragment.glsl.g.ts +2 -0
- package/src/shaders/symbol_sdf.vertex.glsl.g.ts +2 -0
- package/src/shaders/symbol_text_and_icon.fragment.glsl.g.ts +2 -0
- package/src/shaders/symbol_text_and_icon.vertex.glsl.g.ts +2 -0
- package/src/source/canvas_source.test.ts +11 -12
- package/src/source/canvas_source.ts +4 -4
- package/src/source/geojson_source.test.ts +2 -1
- package/src/source/geojson_source.ts +1 -1
- package/src/source/geojson_worker_source.ts +23 -23
- package/src/source/geojson_wrapper.ts +8 -8
- package/src/source/image_source.test.ts +2 -2
- package/src/source/image_source.ts +6 -6
- package/src/source/pixels_to_tile_units.ts +6 -6
- package/src/source/query_features.ts +20 -20
- package/src/source/raster_dem_tile_source.test.ts +4 -3
- package/src/source/raster_dem_tile_source.ts +1 -1
- package/src/source/raster_tile_source.test.ts +4 -3
- package/src/source/raster_tile_source.ts +1 -1
- package/src/source/rtl_text_plugin.ts +10 -10
- package/src/source/source.ts +29 -29
- package/src/source/source_cache.test.ts +33 -1
- package/src/source/source_cache.ts +7 -5
- package/src/source/source_state.ts +1 -1
- package/src/source/tile.test.ts +3 -3
- package/src/source/tile.ts +15 -15
- package/src/source/tile_cache.test.ts +6 -4
- package/src/source/tile_cache.ts +6 -6
- package/src/source/tile_id.test.ts +10 -13
- package/src/source/tile_id.ts +2 -2
- package/src/source/vector_tile_source.test.ts +17 -5
- package/src/source/vector_tile_source.ts +4 -5
- package/src/source/vector_tile_worker_source.test.ts +4 -4
- package/src/source/vector_tile_worker_source.ts +5 -5
- package/src/source/worker.test.ts +1 -1
- package/src/source/worker.ts +22 -22
- package/src/source/worker_source.ts +56 -56
- package/src/source/worker_tile.ts +4 -4
- package/src/style/evaluation_parameters.ts +3 -3
- package/src/style/format_section_override.test.ts +1 -1
- package/src/style/light.ts +10 -10
- package/src/style/load_glyph_range.test.ts +3 -5
- package/src/style/load_glyph_range.ts +6 -6
- package/src/style/load_sprite.ts +5 -4
- package/src/style/pauseable_placement.ts +1 -1
- package/src/style/properties.ts +70 -70
- package/src/style/query_utils.ts +7 -7
- package/src/style/style.test.ts +26 -15
- package/src/style/style.ts +30 -30
- package/src/style/style_glyph.ts +8 -8
- package/src/style/style_image.ts +58 -58
- package/src/style/style_layer/background_style_layer.ts +2 -2
- package/src/style/style_layer/{background_style_layer_properties.ts → background_style_layer_properties.g.ts} +0 -0
- package/src/style/style_layer/circle_style_layer.ts +10 -10
- package/src/style/style_layer/{circle_style_layer_properties.ts → circle_style_layer_properties.g.ts} +0 -0
- package/src/style/style_layer/custom_style_layer.ts +19 -19
- package/src/style/style_layer/fill_extrusion_style_layer.ts +11 -11
- package/src/style/style_layer/{fill_extrusion_style_layer_properties.ts → fill_extrusion_style_layer_properties.g.ts} +0 -0
- package/src/style/style_layer/fill_style_layer.ts +9 -9
- package/src/style/style_layer/{fill_style_layer_properties.ts → fill_style_layer_properties.g.ts} +0 -0
- package/src/style/style_layer/heatmap_style_layer.ts +2 -2
- package/src/style/style_layer/{heatmap_style_layer_properties.ts → heatmap_style_layer_properties.g.ts} +0 -0
- package/src/style/style_layer/hillshade_style_layer.ts +2 -2
- package/src/style/style_layer/{hillshade_style_layer_properties.ts → hillshade_style_layer_properties.g.ts} +0 -0
- package/src/style/style_layer/line_style_layer.ts +9 -9
- package/src/style/style_layer/{line_style_layer_properties.ts → line_style_layer_properties.g.ts} +0 -0
- package/src/style/style_layer/raster_style_layer.ts +2 -2
- package/src/style/style_layer/{raster_style_layer_properties.ts → raster_style_layer_properties.g.ts} +0 -0
- package/src/style/style_layer/symbol_style_layer.ts +26 -7
- package/src/style/style_layer/{symbol_style_layer_properties.ts → symbol_style_layer_properties.g.ts} +6 -0
- package/src/style/style_layer.ts +10 -10
- package/src/style/style_layer_index.ts +3 -3
- package/src/style/validate_style.ts +15 -15
- package/src/style-spec/CHANGELOG.md +6 -0
- package/src/style-spec/error/validation_error.ts +1 -1
- package/src/style-spec/expression/compound_expression.ts +3 -3
- package/src/style-spec/expression/definitions/format.ts +11 -11
- package/src/style-spec/expression/definitions/interpolate.ts +5 -5
- package/src/style-spec/expression/definitions/match.ts +2 -2
- package/src/style-spec/expression/definitions/number_format.ts +11 -11
- package/src/style-spec/expression/expression.ts +8 -8
- package/src/style-spec/expression/index.ts +97 -97
- package/src/style-spec/expression/parsing_context.ts +11 -11
- package/src/style-spec/expression/types/collator.ts +9 -9
- package/src/style-spec/expression/types/resolved_image.ts +2 -2
- package/src/style-spec/expression/types.ts +14 -14
- package/src/style-spec/expression/values.ts +1 -1
- package/src/style-spec/feature_filter/index.ts +66 -66
- package/src/style-spec/function/convert.ts +3 -3
- package/src/style-spec/package.json +1 -1
- package/src/style-spec/reference/v8.json +68 -2
- package/src/style-spec/style-spec.ts +44 -44
- package/src/style-spec/types.ts +2 -0
- package/src/style-spec/util/color_spaces.ts +8 -8
- package/src/style-spec/util/result.ts +4 -4
- package/src/style-spec/validate/validate_filter.ts +58 -58
- package/src/style-spec/validate/validate_source.ts +63 -63
- package/src/style-spec/visit.ts +11 -11
- package/src/symbol/collision_feature.test.ts +1 -1
- package/src/symbol/collision_feature.ts +10 -10
- package/src/symbol/collision_index.ts +43 -43
- package/src/symbol/cross_tile_symbol_index.ts +17 -17
- package/src/symbol/get_anchors.ts +16 -16
- package/src/symbol/grid_index.test.ts +42 -19
- package/src/symbol/grid_index.ts +69 -40
- package/src/symbol/placement.ts +124 -95
- package/src/symbol/projection.ts +30 -30
- package/src/symbol/quads.ts +30 -30
- package/src/symbol/shaping.ts +160 -160
- package/src/symbol/symbol_layout.ts +119 -119
- package/src/symbol/symbol_size.ts +29 -29
- package/src/symbol/symbol_style_layer.test.ts +49 -2
- package/src/types/cancelable.ts +1 -1
- package/src/types/tilejson.ts +13 -13
- package/src/ui/anchor.ts +1 -1
- package/src/ui/camera.test.ts +9 -9
- package/src/ui/camera.ts +18 -18
- package/src/ui/control/attribution_control.test.ts +51 -16
- package/src/ui/control/attribution_control.ts +35 -16
- package/src/ui/control/control.ts +40 -40
- package/src/ui/control/fullscreen_control.ts +1 -1
- package/src/ui/control/geolocate_control.test.ts +1 -1
- package/src/ui/control/geolocate_control.ts +102 -102
- package/src/ui/control/logo_control.test.ts +5 -4
- package/src/ui/control/navigation_control.ts +3 -3
- package/src/ui/control/scale_control.test.ts +2 -2
- package/src/ui/control/scale_control.ts +5 -5
- package/src/ui/events.ts +289 -200
- package/src/ui/handler/box_zoom.test.ts +1 -1
- package/src/ui/handler/box_zoom.ts +1 -1
- package/src/ui/handler/dblclick_zoom.test.ts +1 -1
- package/src/ui/handler/drag_pan.test.ts +1 -1
- package/src/ui/handler/drag_rotate.test.ts +1 -1
- package/src/ui/handler/keyboard.test.ts +1 -1
- package/src/ui/handler/keyboard.ts +51 -51
- package/src/ui/handler/map_event.test.ts +1 -1
- package/src/ui/handler/map_event.ts +1 -1
- package/src/ui/handler/mouse.ts +1 -1
- package/src/ui/handler/mouse_rotate.test.ts +1 -1
- package/src/ui/handler/scroll_zoom.test.ts +3 -2
- package/src/ui/handler/scroll_zoom.ts +9 -9
- package/src/ui/handler/shim/drag_pan.ts +4 -4
- package/src/ui/handler/shim/drag_rotate.ts +1 -1
- package/src/ui/handler/shim/touch_zoom_rotate.ts +1 -1
- package/src/ui/handler/tap_recognizer.ts +4 -4
- package/src/ui/handler/touch_pan.ts +2 -2
- package/src/ui/handler/touch_zoom_rotate.test.ts +1 -1
- package/src/ui/handler/touch_zoom_rotate.ts +1 -1
- package/src/ui/handler_inertia.ts +6 -6
- package/src/ui/handler_manager.ts +44 -44
- package/src/ui/map/isMoving.test.ts +1 -1
- package/src/ui/map/isRotating.test.ts +1 -1
- package/src/ui/map/isZooming.test.ts +1 -1
- package/src/ui/map.test.ts +87 -14
- package/src/ui/map.ts +136 -106
- package/src/ui/map_events.test.ts +1 -1
- package/src/ui/marker.test.ts +12 -12
- package/src/ui/marker.ts +37 -37
- package/src/ui/popup.test.ts +7 -7
- package/src/ui/popup.ts +9 -9
- package/src/util/actor.test.ts +41 -10
- package/src/util/actor.ts +8 -8
- package/src/util/ajax.test.ts +29 -21
- package/src/util/ajax.ts +51 -30
- package/src/util/browser.ts +1 -1
- package/src/util/classify_rings.test.ts +1 -1
- package/src/util/color_ramp.ts +5 -5
- package/src/util/config.ts +2 -2
- package/src/util/dispatcher.ts +1 -1
- package/src/util/dom.ts +2 -2
- package/src/util/evented.ts +1 -1
- package/src/util/find_pole_of_inaccessibility.ts +3 -3
- package/src/util/image.ts +5 -5
- package/src/util/performance.ts +7 -7
- package/src/util/request_manager.ts +4 -4
- package/src/util/resolve_tokens.ts +4 -4
- package/src/util/struct_array.test.ts +1 -1
- package/src/util/struct_array.ts +15 -15
- package/src/util/task_queue.ts +3 -3
- package/src/util/tile_request_cache.ts +3 -3
- package/src/util/transferable_grid_index.ts +4 -4
- package/src/util/util.ts +8 -8
- package/src/util/web_worker.ts +4 -68
- package/src/util/web_worker_transfer.test.ts +3 -0
- package/src/util/web_worker_transfer.ts +21 -17
- package/src/util/worker_pool.ts +1 -1
- package/build/.eslintrc +0 -21
- package/build/glsl_to_js.js +0 -12
- package/build/post-ts-build.js +0 -43
- package/build/release-notes.md.ejs +0 -8
- package/build/test/build-tape.js +0 -17
- package/build/web_worker_replacement.js +0 -5
- package/dist/package.json +0 -1
- package/src/style-spec/validate_spec.test.ts +0 -29
- package/src/symbol/shaping.test.ts +0 -392
- package/src/types/glsl.d.ts +0 -4
package/dist/maplibre-gl.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
// Generated by dts-bundle-generator v6.
|
|
1
|
+
// Generated by dts-bundle-generator v6.5.0
|
|
2
2
|
|
|
3
3
|
import Point from '@mapbox/point-geometry';
|
|
4
4
|
import TinySDF from '@mapbox/tiny-sdf';
|
|
@@ -53,6 +53,25 @@ export declare type RequestParameters = {
|
|
|
53
53
|
collectResourceTiming?: boolean;
|
|
54
54
|
};
|
|
55
55
|
export declare type ResponseCallback<T> = (error?: Error | null, data?: T | null, cacheControl?: string | null, expires?: string | null) => void;
|
|
56
|
+
export declare class AJAXError extends Error {
|
|
57
|
+
/**
|
|
58
|
+
* The response's HTTP status code.
|
|
59
|
+
*/
|
|
60
|
+
status: number;
|
|
61
|
+
/**
|
|
62
|
+
* The response's HTTP status text.
|
|
63
|
+
*/
|
|
64
|
+
statusText: string;
|
|
65
|
+
/**
|
|
66
|
+
* The request's URL.
|
|
67
|
+
*/
|
|
68
|
+
url: string;
|
|
69
|
+
/**
|
|
70
|
+
* The response's body.
|
|
71
|
+
*/
|
|
72
|
+
body: Blob;
|
|
73
|
+
constructor(status: number, statusText: string, url: string, body: Blob);
|
|
74
|
+
}
|
|
56
75
|
export declare type ResourceTypeEnum = keyof IResourceType;
|
|
57
76
|
export declare type RequestTransformFunction = (url: string, resourceType?: ResourceTypeEnum) => RequestParameters;
|
|
58
77
|
export declare class RequestManager {
|
|
@@ -560,6 +579,7 @@ export declare type SymbolLayerSpecification = {
|
|
|
560
579
|
"symbol-sort-key"?: DataDrivenPropertyValueSpecification<number>;
|
|
561
580
|
"symbol-z-order"?: PropertyValueSpecification<"auto" | "viewport-y" | "source">;
|
|
562
581
|
"icon-allow-overlap"?: PropertyValueSpecification<boolean>;
|
|
582
|
+
"icon-overlap"?: PropertyValueSpecification<"never" | "always" | "cooperative">;
|
|
563
583
|
"icon-ignore-placement"?: PropertyValueSpecification<boolean>;
|
|
564
584
|
"icon-optional"?: PropertyValueSpecification<boolean>;
|
|
565
585
|
"icon-rotation-alignment"?: PropertyValueSpecification<"map" | "viewport" | "auto">;
|
|
@@ -604,6 +624,7 @@ export declare type SymbolLayerSpecification = {
|
|
|
604
624
|
number
|
|
605
625
|
]>;
|
|
606
626
|
"text-allow-overlap"?: PropertyValueSpecification<boolean>;
|
|
627
|
+
"text-overlap"?: PropertyValueSpecification<"never" | "always" | "cooperative">;
|
|
607
628
|
"text-ignore-placement"?: PropertyValueSpecification<boolean>;
|
|
608
629
|
"text-optional"?: PropertyValueSpecification<boolean>;
|
|
609
630
|
"visibility"?: "visible" | "none";
|
|
@@ -824,45 +845,45 @@ export declare class LngLatBounds {
|
|
|
824
845
|
*/
|
|
825
846
|
getSouthWest(): LngLat;
|
|
826
847
|
/**
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
848
|
+
* Returns the northeast corner of the bounding box.
|
|
849
|
+
*
|
|
850
|
+
* @returns {LngLat} The northeast corner of the bounding box.
|
|
830
851
|
*/
|
|
831
852
|
getNorthEast(): LngLat;
|
|
832
853
|
/**
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
854
|
+
* Returns the northwest corner of the bounding box.
|
|
855
|
+
*
|
|
856
|
+
* @returns {LngLat} The northwest corner of the bounding box.
|
|
836
857
|
*/
|
|
837
858
|
getNorthWest(): LngLat;
|
|
838
859
|
/**
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
860
|
+
* Returns the southeast corner of the bounding box.
|
|
861
|
+
*
|
|
862
|
+
* @returns {LngLat} The southeast corner of the bounding box.
|
|
842
863
|
*/
|
|
843
864
|
getSouthEast(): LngLat;
|
|
844
865
|
/**
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
866
|
+
* Returns the west edge of the bounding box.
|
|
867
|
+
*
|
|
868
|
+
* @returns {number} The west edge of the bounding box.
|
|
848
869
|
*/
|
|
849
870
|
getWest(): number;
|
|
850
871
|
/**
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
872
|
+
* Returns the south edge of the bounding box.
|
|
873
|
+
*
|
|
874
|
+
* @returns {number} The south edge of the bounding box.
|
|
854
875
|
*/
|
|
855
876
|
getSouth(): number;
|
|
856
877
|
/**
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
878
|
+
* Returns the east edge of the bounding box.
|
|
879
|
+
*
|
|
880
|
+
* @returns {number} The east edge of the bounding box.
|
|
860
881
|
*/
|
|
861
882
|
getEast(): number;
|
|
862
883
|
/**
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
884
|
+
* Returns the north edge of the bounding box.
|
|
885
|
+
*
|
|
886
|
+
* @returns {number} The north edge of the bounding box.
|
|
866
887
|
*/
|
|
867
888
|
getNorth(): number;
|
|
868
889
|
/**
|
|
@@ -892,20 +913,20 @@ export declare class LngLatBounds {
|
|
|
892
913
|
*/
|
|
893
914
|
isEmpty(): boolean;
|
|
894
915
|
/**
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
916
|
+
* Check if the point is within the bounding box.
|
|
917
|
+
*
|
|
918
|
+
* @param {LngLatLike} lnglat geographic point to check against.
|
|
919
|
+
* @returns {boolean} True if the point is within the bounding box.
|
|
920
|
+
* @example
|
|
921
|
+
* var llb = new maplibregl.LngLatBounds(
|
|
922
|
+
* new maplibregl.LngLat(-73.9876, 40.7661),
|
|
923
|
+
* new maplibregl.LngLat(-73.9397, 40.8002)
|
|
924
|
+
* );
|
|
925
|
+
*
|
|
926
|
+
* var ll = new maplibregl.LngLat(-73.9567, 40.7789);
|
|
927
|
+
*
|
|
928
|
+
* console.log(llb.contains(ll)); // = true
|
|
929
|
+
*/
|
|
909
930
|
contains(lnglat: LngLatLike): boolean;
|
|
910
931
|
/**
|
|
911
932
|
* Converts an array to a `LngLatBounds` object.
|
|
@@ -1085,7 +1106,7 @@ export declare class CanonicalTileID {
|
|
|
1085
1106
|
key: string;
|
|
1086
1107
|
constructor(z: number, x: number, y: number);
|
|
1087
1108
|
equals(id: CanonicalTileID): boolean;
|
|
1088
|
-
url(urls: Array<string>, scheme?: string | null): string;
|
|
1109
|
+
url(urls: Array<string>, pixelRatio: number, scheme?: string | null): string;
|
|
1089
1110
|
getTilePoint(coord: MercatorCoordinate): Point;
|
|
1090
1111
|
toString(): string;
|
|
1091
1112
|
}
|
|
@@ -1579,6 +1600,13 @@ export declare class StructArrayLayout2i4 extends StructArray {
|
|
|
1579
1600
|
emplaceBack(v0: number, v1: number): number;
|
|
1580
1601
|
emplace(i: number, v0: number, v1: number): number;
|
|
1581
1602
|
}
|
|
1603
|
+
export declare class StructArrayLayout4i8 extends StructArray {
|
|
1604
|
+
uint8: Uint8Array;
|
|
1605
|
+
int16: Int16Array;
|
|
1606
|
+
_refreshViews(): void;
|
|
1607
|
+
emplaceBack(v0: number, v1: number, v2: number, v3: number): number;
|
|
1608
|
+
emplace(i: number, v0: number, v1: number, v2: number, v3: number): number;
|
|
1609
|
+
}
|
|
1582
1610
|
export declare class StructArrayLayout2i4i12 extends StructArray {
|
|
1583
1611
|
uint8: Uint8Array;
|
|
1584
1612
|
int16: Int16Array;
|
|
@@ -1816,6 +1844,8 @@ export declare class FeatureIndexArray extends StructArrayLayout1ul2ui8 {
|
|
|
1816
1844
|
*/
|
|
1817
1845
|
get(index: number): FeatureIndexStruct;
|
|
1818
1846
|
}
|
|
1847
|
+
export declare class RasterBoundsArray extends StructArrayLayout4i8 {
|
|
1848
|
+
}
|
|
1819
1849
|
export declare class CircleLayoutArray extends StructArrayLayout2i4 {
|
|
1820
1850
|
}
|
|
1821
1851
|
export declare class FillLayoutArray extends StructArrayLayout2i4 {
|
|
@@ -2351,12 +2381,12 @@ export interface StyleImageInterface {
|
|
|
2351
2381
|
*/
|
|
2352
2382
|
width: number;
|
|
2353
2383
|
/**
|
|
2354
|
-
|
|
2355
|
-
|
|
2384
|
+
* @property {number} height
|
|
2385
|
+
*/
|
|
2356
2386
|
height: number;
|
|
2357
2387
|
/**
|
|
2358
2388
|
* @property {Uint8Array | Uint8ClampedArray} data
|
|
2359
|
-
|
|
2389
|
+
*/
|
|
2360
2390
|
data: Uint8Array | Uint8ClampedArray;
|
|
2361
2391
|
/**
|
|
2362
2392
|
* This method is called once before every frame where the icon will be used.
|
|
@@ -2683,8 +2713,8 @@ export declare class EdgeInsets {
|
|
|
2683
2713
|
*/
|
|
2684
2714
|
export declare type PaddingOptions = {
|
|
2685
2715
|
/**
|
|
2686
|
-
|
|
2687
|
-
|
|
2716
|
+
* @property {number} top Padding in pixels from the top of the map canvas.
|
|
2717
|
+
*/
|
|
2688
2718
|
top: number;
|
|
2689
2719
|
/**
|
|
2690
2720
|
* @property {number} bottom Padding in pixels from the bottom of the map canvas.
|
|
@@ -3966,6 +3996,7 @@ export declare type SymbolLayoutProps = {
|
|
|
3966
3996
|
"symbol-sort-key": DataDrivenProperty<number>;
|
|
3967
3997
|
"symbol-z-order": DataConstantProperty<"auto" | "viewport-y" | "source">;
|
|
3968
3998
|
"icon-allow-overlap": DataConstantProperty<boolean>;
|
|
3999
|
+
"icon-overlap": DataConstantProperty<"never" | "always" | "cooperative">;
|
|
3969
4000
|
"icon-ignore-placement": DataConstantProperty<boolean>;
|
|
3970
4001
|
"icon-optional": DataConstantProperty<boolean>;
|
|
3971
4002
|
"icon-rotation-alignment": DataConstantProperty<"map" | "viewport" | "auto">;
|
|
@@ -4010,6 +4041,7 @@ export declare type SymbolLayoutProps = {
|
|
|
4010
4041
|
number
|
|
4011
4042
|
]>;
|
|
4012
4043
|
"text-allow-overlap": DataConstantProperty<boolean>;
|
|
4044
|
+
"text-overlap": DataConstantProperty<"never" | "always" | "cooperative">;
|
|
4013
4045
|
"text-ignore-placement": DataConstantProperty<boolean>;
|
|
4014
4046
|
"text-optional": DataConstantProperty<boolean>;
|
|
4015
4047
|
};
|
|
@@ -4020,6 +4052,7 @@ export declare type SymbolLayoutPropsPossiblyEvaluated = {
|
|
|
4020
4052
|
"symbol-sort-key": PossiblyEvaluatedPropertyValue<number>;
|
|
4021
4053
|
"symbol-z-order": "auto" | "viewport-y" | "source";
|
|
4022
4054
|
"icon-allow-overlap": boolean;
|
|
4055
|
+
"icon-overlap": "never" | "always" | "cooperative";
|
|
4023
4056
|
"icon-ignore-placement": boolean;
|
|
4024
4057
|
"icon-optional": boolean;
|
|
4025
4058
|
"icon-rotation-alignment": "map" | "viewport" | "auto";
|
|
@@ -4064,6 +4097,7 @@ export declare type SymbolLayoutPropsPossiblyEvaluated = {
|
|
|
4064
4097
|
number
|
|
4065
4098
|
]>;
|
|
4066
4099
|
"text-allow-overlap": boolean;
|
|
4100
|
+
"text-overlap": "never" | "always" | "cooperative";
|
|
4067
4101
|
"text-ignore-placement": boolean;
|
|
4068
4102
|
"text-optional": boolean;
|
|
4069
4103
|
};
|
|
@@ -4127,6 +4161,7 @@ export declare class SymbolStyleLayer extends StyleLayer {
|
|
|
4127
4161
|
_handleOverridablePaintPropertyUpdate<T, R>(name: string, oldValue: PropertyValue<T, R>, newValue: PropertyValue<T, R>): boolean;
|
|
4128
4162
|
static hasPaintOverride(layout: PossiblyEvaluated<SymbolLayoutProps, SymbolLayoutPropsPossiblyEvaluated>, propertyName: string): boolean;
|
|
4129
4163
|
}
|
|
4164
|
+
export declare type OverlapMode = "never" | "always" | "cooperative";
|
|
4130
4165
|
export declare type TypedStyleLayer = CircleStyleLayer | FillStyleLayer | FillExtrusionStyleLayer | HeatmapStyleLayer | HillshadeStyleLayer | LineStyleLayer | SymbolStyleLayer;
|
|
4131
4166
|
export declare type BucketParameters<Layer extends TypedStyleLayer> = {
|
|
4132
4167
|
index: number;
|
|
@@ -4204,12 +4239,12 @@ export interface Bucket {
|
|
|
4204
4239
|
upload(context: Context): void;
|
|
4205
4240
|
uploadPending(): boolean;
|
|
4206
4241
|
/**
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
|
|
4242
|
+
* Release the WebGL resources associated with the buffers. Note that because
|
|
4243
|
+
* buckets are shared between layers having the same layout properties, they
|
|
4244
|
+
* must be destroyed in groups (all buckets for a tile, or all symbol buckets).
|
|
4245
|
+
*
|
|
4246
|
+
* @private
|
|
4247
|
+
*/
|
|
4213
4248
|
destroy(): void;
|
|
4214
4249
|
}
|
|
4215
4250
|
export declare type CustomRenderMethod = (gl: WebGLRenderingContext, matrix: mat4) => void;
|
|
@@ -4351,16 +4386,16 @@ export interface CustomLayerInterface {
|
|
|
4351
4386
|
*/
|
|
4352
4387
|
onAdd(map: Map, gl: WebGLRenderingContext): void;
|
|
4353
4388
|
/**
|
|
4354
|
-
|
|
4355
|
-
|
|
4356
|
-
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
|
|
4363
|
-
|
|
4389
|
+
* Optional method called when the layer has been removed from the Map with {@link Map#removeLayer}. This
|
|
4390
|
+
* gives the layer a chance to clean up gl resources and event listeners.
|
|
4391
|
+
*
|
|
4392
|
+
* @function
|
|
4393
|
+
* @memberof CustomLayerInterface
|
|
4394
|
+
* @instance
|
|
4395
|
+
* @name onRemove
|
|
4396
|
+
* @param {Map} map The Map this custom layer was just added to.
|
|
4397
|
+
* @param {WebGLRenderingContext} gl The gl context for the map.
|
|
4398
|
+
*/
|
|
4364
4399
|
onRemove(map: Map, gl: WebGLRenderingContext): void;
|
|
4365
4400
|
}
|
|
4366
4401
|
declare abstract class StyleLayer extends Evented {
|
|
@@ -4521,19 +4556,6 @@ export declare class LineAtlas {
|
|
|
4521
4556
|
};
|
|
4522
4557
|
bind(context: Context): void;
|
|
4523
4558
|
}
|
|
4524
|
-
declare const status: {
|
|
4525
|
-
unavailable: string;
|
|
4526
|
-
deferred: string;
|
|
4527
|
-
loading: string;
|
|
4528
|
-
loaded: string;
|
|
4529
|
-
error: string;
|
|
4530
|
-
};
|
|
4531
|
-
export declare type PluginState = {
|
|
4532
|
-
pluginStatus: typeof status[keyof typeof status];
|
|
4533
|
-
pluginURL: string;
|
|
4534
|
-
};
|
|
4535
|
-
export declare type PluginStateSyncCallback = (state: PluginState) => void;
|
|
4536
|
-
declare const registerForPluginStateChange: (callback: PluginStateSyncCallback) => PluginStateSyncCallback;
|
|
4537
4559
|
export declare type MessageListener = (a: {
|
|
4538
4560
|
data: any;
|
|
4539
4561
|
target: any;
|
|
@@ -4577,6 +4599,112 @@ export declare class Dispatcher {
|
|
|
4577
4599
|
getActor(): Actor;
|
|
4578
4600
|
remove(): void;
|
|
4579
4601
|
}
|
|
4602
|
+
export declare class TileBounds {
|
|
4603
|
+
bounds: LngLatBounds;
|
|
4604
|
+
minzoom: number;
|
|
4605
|
+
maxzoom: number;
|
|
4606
|
+
constructor(bounds: [
|
|
4607
|
+
number,
|
|
4608
|
+
number,
|
|
4609
|
+
number,
|
|
4610
|
+
number
|
|
4611
|
+
], minzoom?: number | null, maxzoom?: number | null);
|
|
4612
|
+
validateBounds(bounds: [
|
|
4613
|
+
number,
|
|
4614
|
+
number,
|
|
4615
|
+
number,
|
|
4616
|
+
number
|
|
4617
|
+
]): LngLatBoundsLike;
|
|
4618
|
+
contains(tileID: CanonicalTileID): boolean;
|
|
4619
|
+
}
|
|
4620
|
+
export declare class VectorTileSource extends Evented implements Source {
|
|
4621
|
+
type: "vector";
|
|
4622
|
+
id: string;
|
|
4623
|
+
minzoom: number;
|
|
4624
|
+
maxzoom: number;
|
|
4625
|
+
url: string;
|
|
4626
|
+
scheme: string;
|
|
4627
|
+
tileSize: number;
|
|
4628
|
+
promoteId: PromoteIdSpecification;
|
|
4629
|
+
_options: VectorSourceSpecification;
|
|
4630
|
+
_collectResourceTiming: boolean;
|
|
4631
|
+
dispatcher: Dispatcher;
|
|
4632
|
+
map: Map;
|
|
4633
|
+
bounds: [
|
|
4634
|
+
number,
|
|
4635
|
+
number,
|
|
4636
|
+
number,
|
|
4637
|
+
number
|
|
4638
|
+
];
|
|
4639
|
+
tiles: Array<string>;
|
|
4640
|
+
tileBounds: TileBounds;
|
|
4641
|
+
reparseOverscaled: boolean;
|
|
4642
|
+
isTileClipped: boolean;
|
|
4643
|
+
_tileJSONRequest: Cancelable;
|
|
4644
|
+
_loaded: boolean;
|
|
4645
|
+
constructor(id: string, options: VectorSourceSpecification & {
|
|
4646
|
+
collectResourceTiming: boolean;
|
|
4647
|
+
}, dispatcher: Dispatcher, eventedParent: Evented);
|
|
4648
|
+
load(): void;
|
|
4649
|
+
loaded(): boolean;
|
|
4650
|
+
hasTile(tileID: OverscaledTileID): boolean;
|
|
4651
|
+
onAdd(map: Map): void;
|
|
4652
|
+
setSourceProperty(callback: Function): void;
|
|
4653
|
+
/**
|
|
4654
|
+
* Sets the source `tiles` property and re-renders the map.
|
|
4655
|
+
*
|
|
4656
|
+
* @param {string[]} tiles An array of one or more tile source URLs, as in the TileJSON spec.
|
|
4657
|
+
* @returns {VectorTileSource} this
|
|
4658
|
+
*/
|
|
4659
|
+
setTiles(tiles: Array<string>): this;
|
|
4660
|
+
/**
|
|
4661
|
+
* Sets the source `url` property and re-renders the map.
|
|
4662
|
+
*
|
|
4663
|
+
* @param {string} url A URL to a TileJSON resource. Supported protocols are `http:` and `https:`.
|
|
4664
|
+
* @returns {VectorTileSource} this
|
|
4665
|
+
*/
|
|
4666
|
+
setUrl(url: string): this;
|
|
4667
|
+
onRemove(): void;
|
|
4668
|
+
serialize(): any;
|
|
4669
|
+
loadTile(tile: Tile, callback: Callback<void>): void;
|
|
4670
|
+
abortTile(tile: Tile): void;
|
|
4671
|
+
unloadTile(tile: Tile): void;
|
|
4672
|
+
hasTransition(): boolean;
|
|
4673
|
+
}
|
|
4674
|
+
export declare class RasterTileSource extends Evented implements Source {
|
|
4675
|
+
type: "raster" | "raster-dem";
|
|
4676
|
+
id: string;
|
|
4677
|
+
minzoom: number;
|
|
4678
|
+
maxzoom: number;
|
|
4679
|
+
url: string;
|
|
4680
|
+
scheme: string;
|
|
4681
|
+
tileSize: number;
|
|
4682
|
+
bounds: [
|
|
4683
|
+
number,
|
|
4684
|
+
number,
|
|
4685
|
+
number,
|
|
4686
|
+
number
|
|
4687
|
+
];
|
|
4688
|
+
tileBounds: TileBounds;
|
|
4689
|
+
roundZoom: boolean;
|
|
4690
|
+
dispatcher: Dispatcher;
|
|
4691
|
+
map: Map;
|
|
4692
|
+
tiles: Array<string>;
|
|
4693
|
+
_loaded: boolean;
|
|
4694
|
+
_options: RasterSourceSpecification | RasterDEMSourceSpecification;
|
|
4695
|
+
_tileJSONRequest: Cancelable;
|
|
4696
|
+
constructor(id: string, options: RasterSourceSpecification | RasterDEMSourceSpecification, dispatcher: Dispatcher, eventedParent: Evented);
|
|
4697
|
+
load(): void;
|
|
4698
|
+
loaded(): boolean;
|
|
4699
|
+
onAdd(map: Map): void;
|
|
4700
|
+
onRemove(): void;
|
|
4701
|
+
serialize(): any;
|
|
4702
|
+
hasTile(tileID: OverscaledTileID): boolean;
|
|
4703
|
+
loadTile(tile: Tile, callback: Callback<void>): void;
|
|
4704
|
+
abortTile(tile: Tile, callback: Callback<void>): void;
|
|
4705
|
+
unloadTile(tile: Tile, callback: Callback<void>): void;
|
|
4706
|
+
hasTransition(): boolean;
|
|
4707
|
+
}
|
|
4580
4708
|
export declare type MapLayerMouseEvent = MapMouseEvent & {
|
|
4581
4709
|
features?: GeoJSON.Feature[];
|
|
4582
4710
|
};
|
|
@@ -4806,8 +4934,8 @@ export interface MapStyleImageMissingEvent extends MapLibreEvent {
|
|
|
4806
4934
|
id: string;
|
|
4807
4935
|
}
|
|
4808
4936
|
/**
|
|
4809
|
-
* MapEventType - a mapping between the event name and the event value
|
|
4810
|
-
*/
|
|
4937
|
+
* MapEventType - a mapping between the event name and the event value
|
|
4938
|
+
*/
|
|
4811
4939
|
export declare type MapEventType = {
|
|
4812
4940
|
error: ErrorEvent;
|
|
4813
4941
|
load: MapLibreEvent;
|
|
@@ -4825,6 +4953,8 @@ export declare type MapEventType = {
|
|
|
4825
4953
|
sourcedata: MapSourceDataEvent;
|
|
4826
4954
|
styledata: MapStyleDataEvent;
|
|
4827
4955
|
styleimagemissing: MapStyleImageMissingEvent;
|
|
4956
|
+
dataabort: MapDataEvent;
|
|
4957
|
+
sourcedataabort: MapSourceDataEvent;
|
|
4828
4958
|
boxzoomcancel: MapLibreZoomEvent;
|
|
4829
4959
|
boxzoomstart: MapLibreZoomEvent;
|
|
4830
4960
|
boxzoomend: MapLibreZoomEvent;
|
|
@@ -4857,913 +4987,1225 @@ export declare type MapEventType = {
|
|
|
4857
4987
|
pitchend: MapLibreEvent<MouseEvent | TouchEvent | undefined>;
|
|
4858
4988
|
wheel: MapWheelEvent;
|
|
4859
4989
|
};
|
|
4860
|
-
export declare type MapEvent =
|
|
4861
|
-
* Fired when a pointing device (usually a mouse) is pressed within the map.
|
|
4862
|
-
*
|
|
4863
|
-
* **Note:** This event is compatible with the optional `layerId` parameter.
|
|
4864
|
-
* If `layerId` is included as the second argument in {@link Map#on}, the event listener will fire only when the
|
|
4865
|
-
* the cursor is pressed while inside a visible portion of the specifed layer.
|
|
4866
|
-
*
|
|
4867
|
-
* @event mousedown
|
|
4868
|
-
* @memberof Map
|
|
4869
|
-
* @instance
|
|
4870
|
-
* @property {MapMouseEvent} data
|
|
4871
|
-
* @example
|
|
4872
|
-
* // Initialize the map
|
|
4873
|
-
* var map = new maplibregl.Map({ // map options });
|
|
4874
|
-
* // Set an event listener
|
|
4875
|
-
* map.on('mousedown', function() {
|
|
4876
|
-
* console.log('A mousedown event has occurred.');
|
|
4877
|
-
* });
|
|
4878
|
-
* @example
|
|
4879
|
-
* // Initialize the map
|
|
4880
|
-
* var map = new maplibregl.Map({ // map options });
|
|
4881
|
-
* // Set an event listener for a specific layer
|
|
4882
|
-
* map.on('mousedown', 'poi-label', function() {
|
|
4883
|
-
* console.log('A mousedown event has occurred on a visible portion of the poi-label layer.');
|
|
4884
|
-
* });
|
|
4885
|
-
* @see [Create a draggable point](https://maplibre.org/maplibre-gl-js-docs/example/drag-a-point/)
|
|
4886
|
-
*/ "mousedown"
|
|
4990
|
+
export declare type MapEvent =
|
|
4887
4991
|
/**
|
|
4888
|
-
|
|
4889
|
-
|
|
4890
|
-
|
|
4891
|
-
|
|
4892
|
-
|
|
4893
|
-
|
|
4894
|
-
|
|
4895
|
-
|
|
4896
|
-
|
|
4897
|
-
|
|
4898
|
-
|
|
4899
|
-
|
|
4900
|
-
|
|
4901
|
-
|
|
4902
|
-
|
|
4903
|
-
|
|
4904
|
-
|
|
4905
|
-
|
|
4906
|
-
|
|
4907
|
-
|
|
4908
|
-
|
|
4909
|
-
|
|
4910
|
-
|
|
4911
|
-
|
|
4912
|
-
|
|
4913
|
-
|
|
4992
|
+
* Fired when a pointing device (usually a mouse) is pressed within the map.
|
|
4993
|
+
*
|
|
4994
|
+
* **Note:** This event is compatible with the optional `layerId` parameter.
|
|
4995
|
+
* If `layerId` is included as the second argument in {@link Map#on}, the event listener will fire only when the
|
|
4996
|
+
* the cursor is pressed while inside a visible portion of the specifed layer.
|
|
4997
|
+
*
|
|
4998
|
+
* @event mousedown
|
|
4999
|
+
* @memberof Map
|
|
5000
|
+
* @instance
|
|
5001
|
+
* @property {MapMouseEvent} data
|
|
5002
|
+
* @example
|
|
5003
|
+
* // Initialize the map
|
|
5004
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5005
|
+
* // Set an event listener
|
|
5006
|
+
* map.on('mousedown', function() {
|
|
5007
|
+
* console.log('A mousedown event has occurred.');
|
|
5008
|
+
* });
|
|
5009
|
+
* @example
|
|
5010
|
+
* // Initialize the map
|
|
5011
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5012
|
+
* // Set an event listener for a specific layer
|
|
5013
|
+
* map.on('mousedown', 'poi-label', function() {
|
|
5014
|
+
* console.log('A mousedown event has occurred on a visible portion of the poi-label layer.');
|
|
5015
|
+
* });
|
|
5016
|
+
* @see [Create a draggable point](https://maplibre.org/maplibre-gl-js-docs/example/drag-a-point/)
|
|
5017
|
+
*/
|
|
5018
|
+
"mousedown"
|
|
4914
5019
|
/**
|
|
4915
|
-
|
|
4916
|
-
|
|
4917
|
-
|
|
4918
|
-
|
|
4919
|
-
|
|
4920
|
-
|
|
4921
|
-
|
|
4922
|
-
|
|
4923
|
-
|
|
4924
|
-
|
|
4925
|
-
|
|
4926
|
-
|
|
4927
|
-
|
|
4928
|
-
|
|
4929
|
-
|
|
4930
|
-
|
|
4931
|
-
|
|
4932
|
-
|
|
4933
|
-
|
|
4934
|
-
|
|
4935
|
-
|
|
4936
|
-
|
|
4937
|
-
|
|
4938
|
-
|
|
4939
|
-
|
|
4940
|
-
|
|
4941
|
-
|
|
4942
|
-
* @see [Highlight features under the mouse pointer](https://maplibre.org/maplibre-gl-js-docs/example/hover-styles/)
|
|
4943
|
-
* @see [Display a popup on hover](https://maplibre.org/maplibre-gl-js-docs/example/popup-on-hover/)
|
|
4944
|
-
*/ | "mouseover"
|
|
5020
|
+
* Fired when a pointing device (usually a mouse) is released within the map.
|
|
5021
|
+
*
|
|
5022
|
+
* **Note:** This event is compatible with the optional `layerId` parameter.
|
|
5023
|
+
* If `layerId` is included as the second argument in {@link Map#on}, the event listener will fire only when the
|
|
5024
|
+
* the cursor is released while inside a visible portion of the specifed layer.
|
|
5025
|
+
*
|
|
5026
|
+
* @event mouseup
|
|
5027
|
+
* @memberof Map
|
|
5028
|
+
* @instance
|
|
5029
|
+
* @property {MapMouseEvent} data
|
|
5030
|
+
* @example
|
|
5031
|
+
* // Initialize the map
|
|
5032
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5033
|
+
* // Set an event listener
|
|
5034
|
+
* map.on('mouseup', function() {
|
|
5035
|
+
* console.log('A mouseup event has occurred.');
|
|
5036
|
+
* });
|
|
5037
|
+
* @example
|
|
5038
|
+
* // Initialize the map
|
|
5039
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5040
|
+
* // Set an event listener for a specific layer
|
|
5041
|
+
* map.on('mouseup', 'poi-label', function() {
|
|
5042
|
+
* console.log('A mouseup event has occurred on a visible portion of the poi-label layer.');
|
|
5043
|
+
* });
|
|
5044
|
+
* @see [Create a draggable point](https://maplibre.org/maplibre-gl-js-docs/example/drag-a-point/)
|
|
5045
|
+
*/
|
|
5046
|
+
| "mouseup"
|
|
4945
5047
|
/**
|
|
4946
|
-
|
|
4947
|
-
|
|
4948
|
-
|
|
4949
|
-
|
|
4950
|
-
|
|
4951
|
-
|
|
4952
|
-
|
|
4953
|
-
|
|
4954
|
-
|
|
4955
|
-
|
|
4956
|
-
|
|
4957
|
-
|
|
4958
|
-
|
|
4959
|
-
|
|
4960
|
-
|
|
4961
|
-
|
|
4962
|
-
|
|
4963
|
-
|
|
4964
|
-
|
|
4965
|
-
|
|
4966
|
-
|
|
4967
|
-
|
|
4968
|
-
|
|
4969
|
-
|
|
4970
|
-
|
|
4971
|
-
|
|
4972
|
-
|
|
4973
|
-
|
|
4974
|
-
|
|
5048
|
+
* Fired when a pointing device (usually a mouse) is moved within the map.
|
|
5049
|
+
* As you move the cursor across a web page containing a map,
|
|
5050
|
+
* the event will fire each time it enters the map or any child elements.
|
|
5051
|
+
*
|
|
5052
|
+
* **Note:** This event is compatible with the optional `layerId` parameter.
|
|
5053
|
+
* If `layerId` is included as the second argument in {@link Map#on}, the event listener will fire only when the
|
|
5054
|
+
* the cursor is moved inside a visible portion of the specifed layer.
|
|
5055
|
+
*
|
|
5056
|
+
* @event mouseover
|
|
5057
|
+
* @memberof Map
|
|
5058
|
+
* @instance
|
|
5059
|
+
* @property {MapMouseEvent} data
|
|
5060
|
+
* @example
|
|
5061
|
+
* // Initialize the map
|
|
5062
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5063
|
+
* // Set an event listener
|
|
5064
|
+
* map.on('mouseover', function() {
|
|
5065
|
+
* console.log('A mouseover event has occurred.');
|
|
5066
|
+
* });
|
|
5067
|
+
* @example
|
|
5068
|
+
* // Initialize the map
|
|
5069
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5070
|
+
* // Set an event listener for a specific layer
|
|
5071
|
+
* map.on('mouseover', 'poi-label', function() {
|
|
5072
|
+
* console.log('A mouseover event has occurred on a visible portion of the poi-label layer.');
|
|
5073
|
+
* });
|
|
5074
|
+
* @see [Get coordinates of the mouse pointer](https://maplibre.org/maplibre-gl-js-docs/example/mouse-position/)
|
|
5075
|
+
* @see [Highlight features under the mouse pointer](https://maplibre.org/maplibre-gl-js-docs/example/hover-styles/)
|
|
5076
|
+
* @see [Display a popup on hover](https://maplibre.org/maplibre-gl-js-docs/example/popup-on-hover/)
|
|
5077
|
+
*/
|
|
5078
|
+
| "mouseover"
|
|
4975
5079
|
/**
|
|
4976
|
-
|
|
4977
|
-
|
|
4978
|
-
|
|
4979
|
-
|
|
4980
|
-
|
|
4981
|
-
|
|
4982
|
-
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4991
|
-
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
4998
|
-
|
|
4999
|
-
|
|
5000
|
-
|
|
5001
|
-
|
|
5002
|
-
|
|
5080
|
+
* Fired when a pointing device (usually a mouse) is moved while the cursor is inside the map.
|
|
5081
|
+
* As you move the cursor across the map, the event will fire every time the cursor changes position within the map.
|
|
5082
|
+
*
|
|
5083
|
+
* **Note:** This event is compatible with the optional `layerId` parameter.
|
|
5084
|
+
* If `layerId` is included as the second argument in {@link Map#on}, the event listener will fire only when the
|
|
5085
|
+
* the cursor is inside a visible portion of the specified layer.
|
|
5086
|
+
*
|
|
5087
|
+
* @event mousemove
|
|
5088
|
+
* @memberof Map
|
|
5089
|
+
* @instance
|
|
5090
|
+
* @property {MapMouseEvent} data
|
|
5091
|
+
* @example
|
|
5092
|
+
* // Initialize the map
|
|
5093
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5094
|
+
* // Set an event listener
|
|
5095
|
+
* map.on('mousemove', function() {
|
|
5096
|
+
* console.log('A mousemove event has occurred.');
|
|
5097
|
+
* });
|
|
5098
|
+
* @example
|
|
5099
|
+
* // Initialize the map
|
|
5100
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5101
|
+
* // Set an event listener for a specific layer
|
|
5102
|
+
* map.on('mousemove', 'poi-label', function() {
|
|
5103
|
+
* console.log('A mousemove event has occurred on a visible portion of the poi-label layer.');
|
|
5104
|
+
* });
|
|
5105
|
+
* @see [Get coordinates of the mouse pointer](https://maplibre.org/maplibre-gl-js-docs/example/mouse-position/)
|
|
5106
|
+
* @see [Highlight features under the mouse pointer](https://maplibre.org/maplibre-gl-js-docs/example/hover-styles/)
|
|
5107
|
+
* @see [Display a popup on over](https://maplibre.org/maplibre-gl-js-docs/example/popup-on-hover/)
|
|
5108
|
+
*/
|
|
5109
|
+
| "mousemove"
|
|
5003
5110
|
/**
|
|
5004
|
-
|
|
5005
|
-
|
|
5006
|
-
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
|
|
5010
|
-
|
|
5011
|
-
|
|
5012
|
-
|
|
5013
|
-
|
|
5014
|
-
|
|
5015
|
-
|
|
5016
|
-
|
|
5017
|
-
|
|
5018
|
-
|
|
5019
|
-
|
|
5020
|
-
|
|
5021
|
-
|
|
5022
|
-
|
|
5023
|
-
|
|
5024
|
-
|
|
5025
|
-
|
|
5026
|
-
|
|
5027
|
-
|
|
5028
|
-
|
|
5029
|
-
|
|
5111
|
+
* Fired when a pointing device (usually a mouse) is pressed and released at the same point on the map.
|
|
5112
|
+
*
|
|
5113
|
+
* **Note:** This event is compatible with the optional `layerId` parameter.
|
|
5114
|
+
* If `layerId` is included as the second argument in {@link Map#on}, the event listener will fire only when the
|
|
5115
|
+
* point that is pressed and released contains a visible portion of the specifed layer.
|
|
5116
|
+
*
|
|
5117
|
+
* @event click
|
|
5118
|
+
* @memberof Map
|
|
5119
|
+
* @instance
|
|
5120
|
+
* @property {MapMouseEvent} data
|
|
5121
|
+
* @example
|
|
5122
|
+
* // Initialize the map
|
|
5123
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5124
|
+
* // Set an event listener
|
|
5125
|
+
* map.on('click', function(e) {
|
|
5126
|
+
* console.log('A click event has occurred at ' + e.lngLat);
|
|
5127
|
+
* });
|
|
5128
|
+
* @example
|
|
5129
|
+
* // Initialize the map
|
|
5130
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5131
|
+
* // Set an event listener for a specific layer
|
|
5132
|
+
* map.on('click', 'poi-label', function(e) {
|
|
5133
|
+
* console.log('A click event has occurred on a visible portion of the poi-label layer at ' + e.lngLat);
|
|
5134
|
+
* });
|
|
5135
|
+
* @see [Measure distances](https://maplibre.org/maplibre-gl-js-docs/example/measure/)
|
|
5136
|
+
* @see [Center the map on a clicked symbol](https://maplibre.org/maplibre-gl-js-docs/example/center-on-symbol/)
|
|
5137
|
+
*/
|
|
5138
|
+
| "click"
|
|
5030
5139
|
/**
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
|
|
5038
|
-
|
|
5039
|
-
|
|
5040
|
-
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
|
|
5044
|
-
|
|
5045
|
-
|
|
5046
|
-
|
|
5047
|
-
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
|
|
5140
|
+
* Fired when a pointing device (usually a mouse) is pressed and released twice at the same point on
|
|
5141
|
+
* the map in rapid succession.
|
|
5142
|
+
*
|
|
5143
|
+
* **Note:** This event is compatible with the optional `layerId` parameter.
|
|
5144
|
+
* If `layerId` is included as the second argument in {@link Map#on}, the event listener will fire only
|
|
5145
|
+
* when the point that is clicked twice contains a visible portion of the specifed layer.
|
|
5146
|
+
*
|
|
5147
|
+
* @event dblclick
|
|
5148
|
+
* @memberof Map
|
|
5149
|
+
* @instance
|
|
5150
|
+
* @property {MapMouseEvent} data
|
|
5151
|
+
* @example
|
|
5152
|
+
* // Initialize the map
|
|
5153
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5154
|
+
* // Set an event listener
|
|
5155
|
+
* map.on('dblclick', function(e) {
|
|
5156
|
+
* console.log('A dblclick event has occurred at ' + e.lngLat);
|
|
5157
|
+
* });
|
|
5158
|
+
* @example
|
|
5159
|
+
* // Initialize the map
|
|
5160
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5161
|
+
* // Set an event listener for a specific layer
|
|
5162
|
+
* map.on('dblclick', 'poi-label', function(e) {
|
|
5163
|
+
* console.log('A dblclick event has occurred on a visible portion of the poi-label layer at ' + e.lngLat);
|
|
5164
|
+
* });
|
|
5165
|
+
*/
|
|
5166
|
+
| "dblclick"
|
|
5051
5167
|
/**
|
|
5052
|
-
|
|
5053
|
-
|
|
5054
|
-
|
|
5055
|
-
|
|
5056
|
-
|
|
5057
|
-
|
|
5058
|
-
|
|
5059
|
-
|
|
5060
|
-
|
|
5061
|
-
|
|
5062
|
-
|
|
5063
|
-
|
|
5064
|
-
|
|
5065
|
-
|
|
5066
|
-
|
|
5067
|
-
|
|
5068
|
-
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
|
|
5072
|
-
|
|
5073
|
-
*/ | "mouseleave"
|
|
5168
|
+
* Fired when a pointing device (usually a mouse) enters a visible portion of a specified layer from
|
|
5169
|
+
* outside that layer or outside the map canvas.
|
|
5170
|
+
*
|
|
5171
|
+
* **Important:** This event can only be listened for when {@link Map#on} includes three arguments,
|
|
5172
|
+
* where the second argument specifies the desired layer.
|
|
5173
|
+
*
|
|
5174
|
+
* @event mouseenter
|
|
5175
|
+
* @memberof Map
|
|
5176
|
+
* @instance
|
|
5177
|
+
* @property {MapMouseEvent} data
|
|
5178
|
+
* @example
|
|
5179
|
+
* // Initialize the map
|
|
5180
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5181
|
+
* // Set an event listener
|
|
5182
|
+
* map.on('mouseenter', 'water', function() {
|
|
5183
|
+
* console.log('A mouseenter event occurred on a visible portion of the water layer.');
|
|
5184
|
+
* });
|
|
5185
|
+
* @see [Center the map on a clicked symbol](https://maplibre.org/maplibre-gl-js-docs/example/center-on-symbol/)
|
|
5186
|
+
* @see [Display a popup on click](https://maplibre.org/maplibre-gl-js-docs/example/popup-on-click/)
|
|
5187
|
+
*/
|
|
5188
|
+
| "mouseenter"
|
|
5074
5189
|
/**
|
|
5075
|
-
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
|
|
5080
|
-
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
|
|
5084
|
-
|
|
5085
|
-
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5190
|
+
* Fired when a pointing device (usually a mouse) leaves a visible portion of a specified layer, or leaves
|
|
5191
|
+
* the map canvas.
|
|
5192
|
+
*
|
|
5193
|
+
* **Important:** This event can only be listened for when {@link Map#on} includes three arguements,
|
|
5194
|
+
* where the second argument specifies the desired layer.
|
|
5195
|
+
*
|
|
5196
|
+
* @event mouseleave
|
|
5197
|
+
* @memberof Map
|
|
5198
|
+
* @instance
|
|
5199
|
+
* @property {MapMouseEvent} data
|
|
5200
|
+
* @example
|
|
5201
|
+
* // Initialize the map
|
|
5202
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5203
|
+
* // Set an event listener that fires
|
|
5204
|
+
* // when the pointing device leaves
|
|
5205
|
+
* // a visible portion of the specified layer.
|
|
5206
|
+
* map.on('mouseleave', 'water', function() {
|
|
5207
|
+
* console.log('A mouseleave event occurred.');
|
|
5208
|
+
* });
|
|
5209
|
+
* @see [Highlight features under the mouse pointer](https://maplibre.org/maplibre-gl-js-docs/example/hover-styles/)
|
|
5210
|
+
* @see [Display a popup on click](https://maplibre.org/maplibre-gl-js-docs/example/popup-on-click/)
|
|
5211
|
+
*/
|
|
5212
|
+
| "mouseleave"
|
|
5091
5213
|
/**
|
|
5092
|
-
|
|
5093
|
-
|
|
5094
|
-
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
|
|
5098
|
-
|
|
5099
|
-
|
|
5100
|
-
|
|
5101
|
-
|
|
5102
|
-
|
|
5103
|
-
|
|
5104
|
-
|
|
5105
|
-
|
|
5106
|
-
|
|
5107
|
-
|
|
5214
|
+
* Fired when a point device (usually a mouse) leaves the map's canvas.
|
|
5215
|
+
*
|
|
5216
|
+
* @event mouseout
|
|
5217
|
+
* @memberof Map
|
|
5218
|
+
* @instance
|
|
5219
|
+
* @property {MapMouseEvent} data
|
|
5220
|
+
* @example
|
|
5221
|
+
* // Initialize the map
|
|
5222
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5223
|
+
* // Set an event listener that fires
|
|
5224
|
+
* // when the pointing device leave's
|
|
5225
|
+
* // the map's canvas.
|
|
5226
|
+
* map.on('mouseout', function() {
|
|
5227
|
+
* console.log('A mouseout event occurred.');
|
|
5228
|
+
* });
|
|
5229
|
+
*/
|
|
5230
|
+
| "mouseout"
|
|
5108
5231
|
/**
|
|
5109
|
-
|
|
5110
|
-
|
|
5111
|
-
|
|
5112
|
-
|
|
5113
|
-
|
|
5114
|
-
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
|
|
5118
|
-
|
|
5119
|
-
|
|
5120
|
-
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
|
|
5232
|
+
* Fired when the right button of the mouse is clicked or the context menu key is pressed within the map.
|
|
5233
|
+
*
|
|
5234
|
+
* @event contextmenu
|
|
5235
|
+
* @memberof Map
|
|
5236
|
+
* @instance
|
|
5237
|
+
* @property {MapMouseEvent} data
|
|
5238
|
+
* @example
|
|
5239
|
+
* // Initialize the map
|
|
5240
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5241
|
+
* // Set an event listener that fires
|
|
5242
|
+
* // when the right mouse button is
|
|
5243
|
+
* // pressed within the map.
|
|
5244
|
+
* map.on('contextmenu', function() {
|
|
5245
|
+
* console.log('A contextmenu event occurred.');
|
|
5246
|
+
* });
|
|
5247
|
+
*/
|
|
5248
|
+
| "contextmenu"
|
|
5124
5249
|
/**
|
|
5125
|
-
|
|
5126
|
-
|
|
5127
|
-
|
|
5128
|
-
|
|
5129
|
-
|
|
5130
|
-
|
|
5131
|
-
|
|
5132
|
-
|
|
5133
|
-
|
|
5134
|
-
|
|
5135
|
-
|
|
5136
|
-
|
|
5137
|
-
|
|
5138
|
-
|
|
5139
|
-
|
|
5250
|
+
* Fired when a [`wheel`](https://developer.mozilla.org/en-US/docs/Web/Events/wheel) event occurs within the map.
|
|
5251
|
+
*
|
|
5252
|
+
* @event wheel
|
|
5253
|
+
* @memberof Map
|
|
5254
|
+
* @instance
|
|
5255
|
+
* @property {MapWheelEvent} data
|
|
5256
|
+
* @example
|
|
5257
|
+
* // Initialize the map
|
|
5258
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5259
|
+
* // Set an event listener that fires
|
|
5260
|
+
* // when a wheel event occurs within the map.
|
|
5261
|
+
* map.on('wheel', function() {
|
|
5262
|
+
* console.log('A wheel event occurred.');
|
|
5263
|
+
* });
|
|
5264
|
+
*/
|
|
5265
|
+
| "wheel"
|
|
5140
5266
|
/**
|
|
5141
|
-
|
|
5142
|
-
|
|
5143
|
-
|
|
5144
|
-
|
|
5145
|
-
|
|
5146
|
-
|
|
5147
|
-
|
|
5148
|
-
|
|
5149
|
-
|
|
5150
|
-
|
|
5151
|
-
|
|
5152
|
-
|
|
5153
|
-
|
|
5154
|
-
|
|
5155
|
-
|
|
5156
|
-
|
|
5267
|
+
* Fired when a [`touchstart`](https://developer.mozilla.org/en-US/docs/Web/Events/touchstart) event occurs within the map.
|
|
5268
|
+
*
|
|
5269
|
+
* @event touchstart
|
|
5270
|
+
* @memberof Map
|
|
5271
|
+
* @instance
|
|
5272
|
+
* @property {MapTouchEvent} data
|
|
5273
|
+
* // Initialize the map
|
|
5274
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5275
|
+
* // Set an event listener that fires
|
|
5276
|
+
* // when a touchstart event occurs within the map.
|
|
5277
|
+
* map.on('touchstart', function() {
|
|
5278
|
+
* console.log('A touchstart event occurred.');
|
|
5279
|
+
* });
|
|
5280
|
+
* @see [Create a draggable point](https://maplibre.org/maplibre-gl-js-docs/example/drag-a-point/)
|
|
5281
|
+
*/
|
|
5282
|
+
| "touchstart"
|
|
5157
5283
|
/**
|
|
5158
|
-
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
|
|
5162
|
-
|
|
5163
|
-
|
|
5164
|
-
|
|
5165
|
-
|
|
5166
|
-
|
|
5167
|
-
|
|
5168
|
-
|
|
5169
|
-
|
|
5170
|
-
|
|
5171
|
-
|
|
5172
|
-
|
|
5173
|
-
|
|
5284
|
+
* Fired when a [`touchend`](https://developer.mozilla.org/en-US/docs/Web/Events/touchend) event occurs within the map.
|
|
5285
|
+
*
|
|
5286
|
+
* @event touchend
|
|
5287
|
+
* @memberof Map
|
|
5288
|
+
* @instance
|
|
5289
|
+
* @property {MapTouchEvent} data
|
|
5290
|
+
* @example
|
|
5291
|
+
* // Initialize the map
|
|
5292
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5293
|
+
* // Set an event listener that fires
|
|
5294
|
+
* // when a touchstart event occurs within the map.
|
|
5295
|
+
* map.on('touchstart', function() {
|
|
5296
|
+
* console.log('A touchstart event occurred.');
|
|
5297
|
+
* });
|
|
5298
|
+
* @see [Create a draggable point](https://maplibre.org/maplibre-gl-js-docs/example/drag-a-point/)
|
|
5299
|
+
*/
|
|
5300
|
+
| "touchend"
|
|
5174
5301
|
/**
|
|
5175
|
-
|
|
5176
|
-
|
|
5177
|
-
|
|
5178
|
-
|
|
5179
|
-
|
|
5180
|
-
|
|
5181
|
-
|
|
5182
|
-
|
|
5183
|
-
|
|
5184
|
-
|
|
5185
|
-
|
|
5186
|
-
|
|
5187
|
-
|
|
5188
|
-
|
|
5189
|
-
|
|
5302
|
+
* Fired when a [`touchmove`](https://developer.mozilla.org/en-US/docs/Web/Events/touchmove) event occurs within the map.
|
|
5303
|
+
*
|
|
5304
|
+
* @event touchmove
|
|
5305
|
+
* @memberof Map
|
|
5306
|
+
* @instance
|
|
5307
|
+
* @property {MapTouchEvent} data
|
|
5308
|
+
* @example
|
|
5309
|
+
* // Initialize the map
|
|
5310
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5311
|
+
* // Set an event listener that fires
|
|
5312
|
+
* // when a touchmove event occurs within the map.
|
|
5313
|
+
* map.on('touchmove', function() {
|
|
5314
|
+
* console.log('A touchmove event occurred.');
|
|
5315
|
+
* });
|
|
5316
|
+
* @see [Create a draggable point](https://maplibre.org/maplibre-gl-js-docs/example/drag-a-point/)
|
|
5317
|
+
*/
|
|
5318
|
+
| "touchmove"
|
|
5190
5319
|
/**
|
|
5191
|
-
|
|
5192
|
-
|
|
5193
|
-
|
|
5194
|
-
|
|
5195
|
-
|
|
5196
|
-
|
|
5197
|
-
|
|
5198
|
-
|
|
5199
|
-
|
|
5200
|
-
|
|
5201
|
-
|
|
5202
|
-
|
|
5203
|
-
|
|
5204
|
-
|
|
5205
|
-
|
|
5206
|
-
|
|
5207
|
-
*/ | "movestart"
|
|
5320
|
+
* Fired when a [`touchcancel`](https://developer.mozilla.org/en-US/docs/Web/Events/touchcancel) event occurs within the map.
|
|
5321
|
+
*
|
|
5322
|
+
* @event touchcancel
|
|
5323
|
+
* @memberof Map
|
|
5324
|
+
* @instance
|
|
5325
|
+
* @property {MapTouchEvent} data
|
|
5326
|
+
* @example
|
|
5327
|
+
* // Initialize the map
|
|
5328
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5329
|
+
* // Set an event listener that fires
|
|
5330
|
+
* // when a touchcancel event occurs within the map.
|
|
5331
|
+
* map.on('touchcancel', function() {
|
|
5332
|
+
* console.log('A touchcancel event occurred.');
|
|
5333
|
+
* });
|
|
5334
|
+
*/
|
|
5335
|
+
| "touchcancel"
|
|
5208
5336
|
/**
|
|
5209
|
-
|
|
5210
|
-
|
|
5211
|
-
|
|
5212
|
-
|
|
5213
|
-
|
|
5214
|
-
|
|
5215
|
-
|
|
5216
|
-
|
|
5217
|
-
|
|
5218
|
-
|
|
5219
|
-
|
|
5220
|
-
|
|
5221
|
-
|
|
5222
|
-
|
|
5223
|
-
|
|
5224
|
-
|
|
5225
|
-
|
|
5337
|
+
* Fired just before the map begins a transition from one
|
|
5338
|
+
* view to another, as the result of either user interaction or methods such as {@link Map#jumpTo}.
|
|
5339
|
+
*
|
|
5340
|
+
* @event movestart
|
|
5341
|
+
* @memberof Map
|
|
5342
|
+
* @instance
|
|
5343
|
+
* @property {{originalEvent: DragEvent}} data
|
|
5344
|
+
* @example
|
|
5345
|
+
* // Initialize the map
|
|
5346
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5347
|
+
* // Set an event listener that fires
|
|
5348
|
+
* // just before the map begins a transition
|
|
5349
|
+
* // from one view to another.
|
|
5350
|
+
* map.on('movestart', function() {
|
|
5351
|
+
* console.log('A movestart` event occurred.');
|
|
5352
|
+
* });
|
|
5353
|
+
*/
|
|
5354
|
+
| "movestart"
|
|
5226
5355
|
/**
|
|
5227
|
-
|
|
5228
|
-
|
|
5229
|
-
|
|
5230
|
-
|
|
5231
|
-
|
|
5232
|
-
|
|
5233
|
-
|
|
5234
|
-
|
|
5235
|
-
|
|
5236
|
-
|
|
5237
|
-
|
|
5238
|
-
|
|
5239
|
-
|
|
5240
|
-
|
|
5241
|
-
|
|
5242
|
-
|
|
5243
|
-
|
|
5356
|
+
* Fired repeatedly during an animated transition from one view to
|
|
5357
|
+
* another, as the result of either user interaction or methods such as {@link Map#flyTo}.
|
|
5358
|
+
*
|
|
5359
|
+
* @event move
|
|
5360
|
+
* @memberof Map
|
|
5361
|
+
* @instance
|
|
5362
|
+
* @property {MapMouseEvent | MapTouchEvent} data
|
|
5363
|
+
* @example
|
|
5364
|
+
* // Initialize the map
|
|
5365
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5366
|
+
* // Set an event listener that fires
|
|
5367
|
+
* // repeatedly during an animated transition.
|
|
5368
|
+
* map.on('move', function() {
|
|
5369
|
+
* console.log('A move event occurred.');
|
|
5370
|
+
* });
|
|
5371
|
+
* @see [Display HTML clusters with custom properties](https://maplibre.org/maplibre-gl-js-docs/example/cluster-html/)
|
|
5372
|
+
*/
|
|
5373
|
+
| "move"
|
|
5244
5374
|
/**
|
|
5245
|
-
|
|
5246
|
-
|
|
5247
|
-
|
|
5248
|
-
|
|
5249
|
-
|
|
5250
|
-
|
|
5251
|
-
|
|
5252
|
-
|
|
5253
|
-
|
|
5254
|
-
|
|
5255
|
-
|
|
5256
|
-
|
|
5257
|
-
|
|
5258
|
-
|
|
5259
|
-
|
|
5375
|
+
* Fired just after the map completes a transition from one
|
|
5376
|
+
* view to another, as the result of either user interaction or methods such as {@link Map#jumpTo}.
|
|
5377
|
+
*
|
|
5378
|
+
* @event moveend
|
|
5379
|
+
* @memberof Map
|
|
5380
|
+
* @instance
|
|
5381
|
+
* @property {{originalEvent: DragEvent}} data
|
|
5382
|
+
* @example
|
|
5383
|
+
* // Initialize the map
|
|
5384
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5385
|
+
* // Set an event listener that fires
|
|
5386
|
+
* // just after the map completes a transition.
|
|
5387
|
+
* map.on('moveend', function() {
|
|
5388
|
+
* console.log('A moveend event occurred.');
|
|
5389
|
+
* });
|
|
5390
|
+
* @see [Display HTML clusters with custom properties](https://maplibre.org/maplibre-gl-js-docs/example/cluster-html/)
|
|
5391
|
+
*/
|
|
5392
|
+
| "moveend"
|
|
5260
5393
|
/**
|
|
5261
|
-
|
|
5262
|
-
|
|
5263
|
-
|
|
5264
|
-
|
|
5265
|
-
|
|
5266
|
-
|
|
5267
|
-
|
|
5268
|
-
|
|
5269
|
-
|
|
5270
|
-
|
|
5271
|
-
|
|
5272
|
-
|
|
5273
|
-
|
|
5274
|
-
|
|
5275
|
-
|
|
5394
|
+
* Fired when a "drag to pan" interaction starts. See {@link DragPanHandler}.
|
|
5395
|
+
*
|
|
5396
|
+
* @event dragstart
|
|
5397
|
+
* @memberof Map
|
|
5398
|
+
* @instance
|
|
5399
|
+
* @property {{originalEvent: DragEvent}} data
|
|
5400
|
+
* @example
|
|
5401
|
+
* // Initialize the map
|
|
5402
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5403
|
+
* // Set an event listener that fires
|
|
5404
|
+
* // when a "drag to pan" interaction starts.
|
|
5405
|
+
* map.on('dragstart', function() {
|
|
5406
|
+
* console.log('A dragstart event occurred.');
|
|
5407
|
+
* });
|
|
5408
|
+
*/
|
|
5409
|
+
| "dragstart"
|
|
5276
5410
|
/**
|
|
5277
|
-
|
|
5278
|
-
|
|
5279
|
-
|
|
5280
|
-
|
|
5281
|
-
|
|
5282
|
-
|
|
5283
|
-
|
|
5284
|
-
|
|
5285
|
-
|
|
5286
|
-
|
|
5287
|
-
|
|
5288
|
-
|
|
5289
|
-
|
|
5290
|
-
|
|
5291
|
-
|
|
5292
|
-
|
|
5411
|
+
* Fired repeatedly during a "drag to pan" interaction. See {@link DragPanHandler}.
|
|
5412
|
+
*
|
|
5413
|
+
* @event drag
|
|
5414
|
+
* @memberof Map
|
|
5415
|
+
* @instance
|
|
5416
|
+
* @property {MapMouseEvent | MapTouchEvent} data
|
|
5417
|
+
* @example
|
|
5418
|
+
* // Initialize the map
|
|
5419
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5420
|
+
* // Set an event listener that fires
|
|
5421
|
+
* // repeatedly during a "drag to pan" interaction.
|
|
5422
|
+
* map.on('drag', function() {
|
|
5423
|
+
* console.log('A drag event occurred.');
|
|
5424
|
+
* });
|
|
5425
|
+
*/
|
|
5426
|
+
| "drag"
|
|
5293
5427
|
/**
|
|
5294
|
-
|
|
5295
|
-
|
|
5296
|
-
|
|
5297
|
-
|
|
5298
|
-
|
|
5299
|
-
|
|
5300
|
-
|
|
5301
|
-
|
|
5302
|
-
|
|
5303
|
-
|
|
5304
|
-
|
|
5305
|
-
|
|
5306
|
-
|
|
5307
|
-
|
|
5308
|
-
|
|
5309
|
-
|
|
5428
|
+
* Fired when a "drag to pan" interaction ends. See {@link DragPanHandler}.
|
|
5429
|
+
*
|
|
5430
|
+
* @event dragend
|
|
5431
|
+
* @memberof Map
|
|
5432
|
+
* @instance
|
|
5433
|
+
* @property {{originalEvent: DragEvent}} data
|
|
5434
|
+
* @example
|
|
5435
|
+
* // Initialize the map
|
|
5436
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5437
|
+
* // Set an event listener that fires
|
|
5438
|
+
* // when a "drag to pan" interaction ends.
|
|
5439
|
+
* map.on('dragend', function() {
|
|
5440
|
+
* console.log('A dragend event occurred.');
|
|
5441
|
+
* });
|
|
5442
|
+
* @see [Create a draggable marker](https://maplibre.org/maplibre-gl-js-docs/example/drag-a-marker/)
|
|
5443
|
+
*/
|
|
5444
|
+
| "dragend"
|
|
5310
5445
|
/**
|
|
5311
|
-
|
|
5312
|
-
|
|
5313
|
-
|
|
5314
|
-
|
|
5315
|
-
|
|
5316
|
-
|
|
5317
|
-
|
|
5318
|
-
|
|
5319
|
-
|
|
5320
|
-
|
|
5321
|
-
|
|
5322
|
-
|
|
5323
|
-
|
|
5324
|
-
|
|
5325
|
-
|
|
5326
|
-
|
|
5446
|
+
* Fired just before the map begins a transition from one zoom level to another,
|
|
5447
|
+
* as the result of either user interaction or methods such as {@link Map#flyTo}.
|
|
5448
|
+
*
|
|
5449
|
+
* @event zoomstart
|
|
5450
|
+
* @memberof Map
|
|
5451
|
+
* @instance
|
|
5452
|
+
* @property {MapMouseEvent | MapTouchEvent} data
|
|
5453
|
+
* @example
|
|
5454
|
+
* // Initialize the map
|
|
5455
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5456
|
+
* // Set an event listener that fires
|
|
5457
|
+
* // just before a zoom transition starts.
|
|
5458
|
+
* map.on('zoomstart', function() {
|
|
5459
|
+
* console.log('A zoomstart event occurred.');
|
|
5460
|
+
* });
|
|
5461
|
+
*/
|
|
5462
|
+
| "zoomstart"
|
|
5327
5463
|
/**
|
|
5328
|
-
|
|
5329
|
-
|
|
5330
|
-
|
|
5331
|
-
|
|
5332
|
-
|
|
5333
|
-
|
|
5334
|
-
|
|
5335
|
-
|
|
5336
|
-
|
|
5337
|
-
|
|
5338
|
-
|
|
5339
|
-
|
|
5340
|
-
|
|
5341
|
-
|
|
5342
|
-
|
|
5343
|
-
|
|
5464
|
+
* Fired repeatedly during an animated transition from one zoom level to another,
|
|
5465
|
+
* as the result of either user interaction or methods such as {@link Map#flyTo}.
|
|
5466
|
+
*
|
|
5467
|
+
* @event zoom
|
|
5468
|
+
* @memberof Map
|
|
5469
|
+
* @instance
|
|
5470
|
+
* @property {MapMouseEvent | MapTouchEvent} data
|
|
5471
|
+
* @example
|
|
5472
|
+
* // Initialize the map
|
|
5473
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5474
|
+
* // Set an event listener that fires
|
|
5475
|
+
* // repeatedly during a zoom transition.
|
|
5476
|
+
* map.on('zoom', function() {
|
|
5477
|
+
* console.log('A zoom event occurred.');
|
|
5478
|
+
* });
|
|
5479
|
+
*/
|
|
5480
|
+
| "zoom"
|
|
5344
5481
|
/**
|
|
5345
|
-
|
|
5346
|
-
|
|
5347
|
-
|
|
5348
|
-
|
|
5349
|
-
|
|
5350
|
-
|
|
5351
|
-
|
|
5352
|
-
|
|
5353
|
-
|
|
5354
|
-
|
|
5355
|
-
|
|
5356
|
-
|
|
5357
|
-
|
|
5358
|
-
|
|
5359
|
-
|
|
5482
|
+
* Fired just after the map completes a transition from one zoom level to another,
|
|
5483
|
+
* as the result of either user interaction or methods such as {@link Map#flyTo}.
|
|
5484
|
+
*
|
|
5485
|
+
* @event zoomend
|
|
5486
|
+
* @memberof Map
|
|
5487
|
+
* @instance
|
|
5488
|
+
* @property {MapMouseEvent | MapTouchEvent} data
|
|
5489
|
+
* @example
|
|
5490
|
+
* // Initialize the map
|
|
5491
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5492
|
+
* // Set an event listener that fires
|
|
5493
|
+
* // just after a zoom transition finishes.
|
|
5494
|
+
* map.on('zoomend', function() {
|
|
5495
|
+
* console.log('A zoomend event occurred.');
|
|
5496
|
+
* });
|
|
5497
|
+
*/
|
|
5498
|
+
| "zoomend"
|
|
5360
5499
|
/**
|
|
5361
|
-
|
|
5362
|
-
|
|
5363
|
-
|
|
5364
|
-
|
|
5365
|
-
|
|
5366
|
-
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
|
-
|
|
5370
|
-
|
|
5371
|
-
|
|
5372
|
-
|
|
5373
|
-
|
|
5374
|
-
|
|
5375
|
-
|
|
5500
|
+
* Fired when a "drag to rotate" interaction starts. See {@link DragRotateHandler}.
|
|
5501
|
+
*
|
|
5502
|
+
* @event rotatestart
|
|
5503
|
+
* @memberof Map
|
|
5504
|
+
* @instance
|
|
5505
|
+
* @property {MapMouseEvent | MapTouchEvent} data
|
|
5506
|
+
* @example
|
|
5507
|
+
* // Initialize the map
|
|
5508
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5509
|
+
* // Set an event listener that fires
|
|
5510
|
+
* // just before a "drag to rotate" interaction starts.
|
|
5511
|
+
* map.on('rotatestart', function() {
|
|
5512
|
+
* console.log('A rotatestart event occurred.');
|
|
5513
|
+
* });
|
|
5514
|
+
*/
|
|
5515
|
+
| "rotatestart"
|
|
5376
5516
|
/**
|
|
5377
|
-
|
|
5378
|
-
|
|
5379
|
-
|
|
5380
|
-
|
|
5381
|
-
|
|
5382
|
-
|
|
5383
|
-
|
|
5384
|
-
|
|
5385
|
-
|
|
5386
|
-
|
|
5387
|
-
|
|
5388
|
-
|
|
5389
|
-
|
|
5390
|
-
|
|
5391
|
-
|
|
5517
|
+
* Fired repeatedly during a "drag to rotate" interaction. See {@link DragRotateHandler}.
|
|
5518
|
+
*
|
|
5519
|
+
* @event rotate
|
|
5520
|
+
* @memberof Map
|
|
5521
|
+
* @instance
|
|
5522
|
+
* @property {MapMouseEvent | MapTouchEvent} data
|
|
5523
|
+
* @example
|
|
5524
|
+
* // Initialize the map
|
|
5525
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5526
|
+
* // Set an event listener that fires
|
|
5527
|
+
* // repeatedly during "drag to rotate" interaction.
|
|
5528
|
+
* map.on('rotate', function() {
|
|
5529
|
+
* console.log('A rotate event occurred.');
|
|
5530
|
+
* });
|
|
5531
|
+
*/
|
|
5532
|
+
| "rotate"
|
|
5392
5533
|
/**
|
|
5393
|
-
|
|
5394
|
-
|
|
5395
|
-
|
|
5396
|
-
|
|
5397
|
-
|
|
5398
|
-
|
|
5399
|
-
|
|
5400
|
-
|
|
5401
|
-
|
|
5402
|
-
|
|
5403
|
-
|
|
5404
|
-
|
|
5405
|
-
|
|
5406
|
-
|
|
5407
|
-
|
|
5408
|
-
|
|
5534
|
+
* Fired when a "drag to rotate" interaction ends. See {@link DragRotateHandler}.
|
|
5535
|
+
*
|
|
5536
|
+
* @event rotateend
|
|
5537
|
+
* @memberof Map
|
|
5538
|
+
* @instance
|
|
5539
|
+
* @property {MapMouseEvent | MapTouchEvent} data
|
|
5540
|
+
* @example
|
|
5541
|
+
* // Initialize the map
|
|
5542
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5543
|
+
* // Set an event listener that fires
|
|
5544
|
+
* // just after a "drag to rotate" interaction ends.
|
|
5545
|
+
* map.on('rotateend', function() {
|
|
5546
|
+
* console.log('A rotateend event occurred.');
|
|
5547
|
+
* });
|
|
5548
|
+
*/
|
|
5549
|
+
| "rotateend"
|
|
5409
5550
|
/**
|
|
5410
|
-
|
|
5411
|
-
|
|
5412
|
-
|
|
5413
|
-
|
|
5414
|
-
|
|
5415
|
-
|
|
5416
|
-
|
|
5417
|
-
|
|
5418
|
-
|
|
5419
|
-
|
|
5420
|
-
|
|
5421
|
-
|
|
5422
|
-
|
|
5423
|
-
|
|
5424
|
-
|
|
5425
|
-
|
|
5426
|
-
|
|
5551
|
+
* Fired whenever the map's pitch (tilt) begins a change as
|
|
5552
|
+
* the result of either user interaction or methods such as {@link Map#flyTo} .
|
|
5553
|
+
*
|
|
5554
|
+
* @event pitchstart
|
|
5555
|
+
* @memberof Map
|
|
5556
|
+
* @instance
|
|
5557
|
+
* @property {MapEventData} data
|
|
5558
|
+
* @example
|
|
5559
|
+
* // Initialize the map
|
|
5560
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5561
|
+
* // Set an event listener that fires
|
|
5562
|
+
* // just before a pitch (tilt) transition starts.
|
|
5563
|
+
* map.on('pitchstart', function() {
|
|
5564
|
+
* console.log('A pitchstart event occurred.');
|
|
5565
|
+
* });
|
|
5566
|
+
*/
|
|
5567
|
+
| "pitchstart"
|
|
5427
5568
|
/**
|
|
5428
|
-
|
|
5429
|
-
|
|
5430
|
-
|
|
5431
|
-
|
|
5432
|
-
|
|
5433
|
-
|
|
5434
|
-
|
|
5435
|
-
|
|
5436
|
-
|
|
5437
|
-
|
|
5438
|
-
|
|
5439
|
-
|
|
5440
|
-
|
|
5441
|
-
|
|
5442
|
-
|
|
5443
|
-
|
|
5569
|
+
* Fired repeatedly during the map's pitch (tilt) animation between
|
|
5570
|
+
* one state and another as the result of either user interaction
|
|
5571
|
+
* or methods such as {@link Map#flyTo}.
|
|
5572
|
+
*
|
|
5573
|
+
* @event pitch
|
|
5574
|
+
* @memberof Map
|
|
5575
|
+
* @instance
|
|
5576
|
+
* @property {MapEventData} data
|
|
5577
|
+
* @example
|
|
5578
|
+
* // Initialize the map
|
|
5579
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5580
|
+
* // Set an event listener that fires
|
|
5581
|
+
* // repeatedly during a pitch (tilt) transition.
|
|
5582
|
+
* map.on('pitch', function() {
|
|
5583
|
+
* console.log('A pitch event occurred.');
|
|
5584
|
+
* });
|
|
5585
|
+
*/
|
|
5586
|
+
| "pitch"
|
|
5444
5587
|
/**
|
|
5445
|
-
|
|
5446
|
-
|
|
5447
|
-
|
|
5448
|
-
|
|
5449
|
-
|
|
5450
|
-
|
|
5451
|
-
|
|
5452
|
-
|
|
5453
|
-
|
|
5454
|
-
|
|
5455
|
-
|
|
5456
|
-
|
|
5457
|
-
|
|
5458
|
-
|
|
5459
|
-
|
|
5588
|
+
* Fired immediately after the map's pitch (tilt) finishes changing as
|
|
5589
|
+
* the result of either user interaction or methods such as {@link Map#flyTo}.
|
|
5590
|
+
*
|
|
5591
|
+
* @event pitchend
|
|
5592
|
+
* @memberof Map
|
|
5593
|
+
* @instance
|
|
5594
|
+
* @property {MapEventData} data
|
|
5595
|
+
* @example
|
|
5596
|
+
* // Initialize the map
|
|
5597
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5598
|
+
* // Set an event listener that fires
|
|
5599
|
+
* // just after a pitch (tilt) transition ends.
|
|
5600
|
+
* map.on('pitchend', function() {
|
|
5601
|
+
* console.log('A pitchend event occurred.');
|
|
5602
|
+
* });
|
|
5603
|
+
*/
|
|
5604
|
+
| "pitchend"
|
|
5460
5605
|
/**
|
|
5461
|
-
|
|
5462
|
-
|
|
5463
|
-
|
|
5464
|
-
|
|
5465
|
-
|
|
5466
|
-
|
|
5467
|
-
|
|
5468
|
-
|
|
5469
|
-
|
|
5470
|
-
|
|
5471
|
-
|
|
5472
|
-
|
|
5473
|
-
|
|
5474
|
-
|
|
5475
|
-
|
|
5476
|
-
|
|
5606
|
+
* Fired when a "box zoom" interaction starts. See {@link BoxZoomHandler}.
|
|
5607
|
+
*
|
|
5608
|
+
* @event boxzoomstart
|
|
5609
|
+
* @memberof Map
|
|
5610
|
+
* @instance
|
|
5611
|
+
* @property {MapLibreZoomEvent} data
|
|
5612
|
+
* @example
|
|
5613
|
+
* // Initialize the map
|
|
5614
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5615
|
+
* // Set an event listener that fires
|
|
5616
|
+
* // just before a "box zoom" interaction starts.
|
|
5617
|
+
* map.on('boxzoomstart', function() {
|
|
5618
|
+
* console.log('A boxzoomstart event occurred.');
|
|
5619
|
+
* });
|
|
5620
|
+
*/
|
|
5621
|
+
| "boxzoomstart"
|
|
5477
5622
|
/**
|
|
5478
|
-
|
|
5479
|
-
|
|
5480
|
-
|
|
5481
|
-
|
|
5482
|
-
|
|
5483
|
-
|
|
5484
|
-
|
|
5485
|
-
|
|
5486
|
-
|
|
5487
|
-
|
|
5488
|
-
|
|
5489
|
-
|
|
5490
|
-
|
|
5491
|
-
|
|
5492
|
-
|
|
5493
|
-
|
|
5623
|
+
* Fired when a "box zoom" interaction ends. See {@link BoxZoomHandler}.
|
|
5624
|
+
*
|
|
5625
|
+
* @event boxzoomend
|
|
5626
|
+
* @memberof Map
|
|
5627
|
+
* @instance
|
|
5628
|
+
* @type {Object}
|
|
5629
|
+
* @property {MapLibreZoomEvent} data
|
|
5630
|
+
* @example
|
|
5631
|
+
* // Initialize the map
|
|
5632
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5633
|
+
* // Set an event listener that fires
|
|
5634
|
+
* // just after a "box zoom" interaction ends.
|
|
5635
|
+
* map.on('boxzoomend', function() {
|
|
5636
|
+
* console.log('A boxzoomend event occurred.');
|
|
5637
|
+
* });
|
|
5638
|
+
*/
|
|
5639
|
+
| "boxzoomend"
|
|
5494
5640
|
/**
|
|
5495
|
-
|
|
5496
|
-
|
|
5497
|
-
|
|
5498
|
-
|
|
5499
|
-
|
|
5500
|
-
|
|
5501
|
-
|
|
5502
|
-
|
|
5503
|
-
|
|
5504
|
-
|
|
5505
|
-
|
|
5506
|
-
|
|
5507
|
-
|
|
5508
|
-
|
|
5641
|
+
* Fired when the user cancels a "box zoom" interaction, or when the bounding box does not meet the minimum size threshold.
|
|
5642
|
+
* See {@link BoxZoomHandler}.
|
|
5643
|
+
*
|
|
5644
|
+
* @event boxzoomcancel
|
|
5645
|
+
* @memberof Map
|
|
5646
|
+
* @instance
|
|
5647
|
+
* @property {MapLibreZoomEvent} data
|
|
5648
|
+
* @example
|
|
5649
|
+
* // Initialize the map
|
|
5650
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5651
|
+
* // Set an event listener that fires
|
|
5652
|
+
* // the user cancels a "box zoom" interaction.
|
|
5653
|
+
* map.on('boxzoomcancel', function() {
|
|
5654
|
+
* console.log('A boxzoomcancel event occurred.');
|
|
5655
|
+
* });
|
|
5656
|
+
*/
|
|
5657
|
+
| "boxzoomcancel"
|
|
5509
5658
|
/**
|
|
5510
|
-
|
|
5511
|
-
|
|
5512
|
-
|
|
5513
|
-
|
|
5514
|
-
|
|
5515
|
-
|
|
5516
|
-
|
|
5517
|
-
|
|
5518
|
-
|
|
5519
|
-
|
|
5520
|
-
|
|
5521
|
-
|
|
5522
|
-
|
|
5523
|
-
|
|
5659
|
+
* Fired immediately after the map has been resized.
|
|
5660
|
+
*
|
|
5661
|
+
* @event resize
|
|
5662
|
+
* @memberof Map
|
|
5663
|
+
* @instance
|
|
5664
|
+
* @example
|
|
5665
|
+
* // Initialize the map
|
|
5666
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5667
|
+
* // Set an event listener that fires
|
|
5668
|
+
* // immediately after the map has been resized.
|
|
5669
|
+
* map.on('resize', function() {
|
|
5670
|
+
* console.log('A resize event occurred.');
|
|
5671
|
+
* });
|
|
5672
|
+
*/
|
|
5673
|
+
| "resize"
|
|
5524
5674
|
/**
|
|
5525
|
-
|
|
5526
|
-
|
|
5527
|
-
|
|
5528
|
-
|
|
5529
|
-
|
|
5530
|
-
|
|
5531
|
-
|
|
5532
|
-
|
|
5533
|
-
|
|
5534
|
-
|
|
5535
|
-
|
|
5536
|
-
|
|
5537
|
-
|
|
5538
|
-
|
|
5675
|
+
* Fired when the WebGL context is lost.
|
|
5676
|
+
*
|
|
5677
|
+
* @event webglcontextlost
|
|
5678
|
+
* @memberof Map
|
|
5679
|
+
* @instance
|
|
5680
|
+
* @example
|
|
5681
|
+
* // Initialize the map
|
|
5682
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5683
|
+
* // Set an event listener that fires
|
|
5684
|
+
* // when the WebGL context is lost.
|
|
5685
|
+
* map.on('webglcontextlost', function() {
|
|
5686
|
+
* console.log('A webglcontextlost event occurred.');
|
|
5687
|
+
* });
|
|
5688
|
+
*/
|
|
5689
|
+
| "webglcontextlost"
|
|
5690
|
+
/**
|
|
5691
|
+
* Fired when the WebGL context is restored.
|
|
5692
|
+
*
|
|
5693
|
+
* @event webglcontextrestored
|
|
5694
|
+
* @memberof Map
|
|
5695
|
+
* @instance
|
|
5696
|
+
* @example
|
|
5697
|
+
* // Initialize the map
|
|
5698
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5699
|
+
* // Set an event listener that fires
|
|
5700
|
+
* // when the WebGL context is restored.
|
|
5701
|
+
* map.on('webglcontextrestored', function() {
|
|
5702
|
+
* console.log('A webglcontextrestored event occurred.');
|
|
5703
|
+
* });
|
|
5704
|
+
*/
|
|
5705
|
+
| "webglcontextrestored"
|
|
5706
|
+
/**
|
|
5707
|
+
* Fired immediately after all necessary resources have been downloaded
|
|
5708
|
+
* and the first visually complete rendering of the map has occurred.
|
|
5709
|
+
*
|
|
5710
|
+
* @event load
|
|
5711
|
+
* @memberof Map
|
|
5712
|
+
* @instance
|
|
5713
|
+
* @type {Object}
|
|
5714
|
+
* @example
|
|
5715
|
+
* // Initialize the map
|
|
5716
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5717
|
+
* // Set an event listener that fires
|
|
5718
|
+
* // when the map has finished loading.
|
|
5719
|
+
* map.on('load', function() {
|
|
5720
|
+
* console.log('A load event occurred.');
|
|
5721
|
+
* });
|
|
5722
|
+
* @see [Draw GeoJSON points](https://maplibre.org/maplibre-gl-js-docs/example/geojson-markers/)
|
|
5723
|
+
* @see [Add live realtime data](https://maplibre.org/maplibre-gl-js-docs/example/live-geojson/)
|
|
5724
|
+
* @see [Animate a point](https://maplibre.org/maplibre-gl-js-docs/example/animate-point-along-line/)
|
|
5725
|
+
*/
|
|
5726
|
+
| "load"
|
|
5727
|
+
/**
|
|
5728
|
+
* Fired whenever the map is drawn to the screen, as the result of
|
|
5729
|
+
*
|
|
5730
|
+
* - a change to the map's position, zoom, pitch, or bearing
|
|
5731
|
+
* - a change to the map's style
|
|
5732
|
+
* - a change to a GeoJSON source
|
|
5733
|
+
* - the loading of a vector tile, GeoJSON file, glyph, or sprite
|
|
5734
|
+
*
|
|
5735
|
+
* @event render
|
|
5736
|
+
* @memberof Map
|
|
5737
|
+
* @instance
|
|
5738
|
+
* @example
|
|
5739
|
+
* // Initialize the map
|
|
5740
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5741
|
+
* // Set an event listener that fires
|
|
5742
|
+
* // whenever the map is drawn to the screen.
|
|
5743
|
+
* map.on('render', function() {
|
|
5744
|
+
* console.log('A render event occurred.');
|
|
5745
|
+
* });
|
|
5746
|
+
*/
|
|
5747
|
+
| "render"
|
|
5748
|
+
/**
|
|
5749
|
+
* Fired after the last frame rendered before the map enters an
|
|
5750
|
+
* "idle" state:
|
|
5751
|
+
*
|
|
5752
|
+
* - No camera transitions are in progress
|
|
5753
|
+
* - All currently requested tiles have loaded
|
|
5754
|
+
* - All fade/transition animations have completed
|
|
5755
|
+
*
|
|
5756
|
+
* @event idle
|
|
5757
|
+
* @memberof Map
|
|
5758
|
+
* @instance
|
|
5759
|
+
* @example
|
|
5760
|
+
* // Initialize the map
|
|
5761
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5762
|
+
* // Set an event listener that fires
|
|
5763
|
+
* // just before the map enters an "idle" state.
|
|
5764
|
+
* map.on('idle', function() {
|
|
5765
|
+
* console.log('A idle event occurred.');
|
|
5766
|
+
* });
|
|
5767
|
+
*/
|
|
5768
|
+
| "idle"
|
|
5769
|
+
/**
|
|
5770
|
+
* Fired immediately after the map has been removed with {@link Map.event:remove}.
|
|
5771
|
+
*
|
|
5772
|
+
* @event remove
|
|
5773
|
+
* @memberof Map
|
|
5774
|
+
* @instance
|
|
5775
|
+
* @example
|
|
5776
|
+
* // Initialize the map
|
|
5777
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5778
|
+
* // Set an event listener that fires
|
|
5779
|
+
* // just after the map is removed.
|
|
5780
|
+
* map.on('remove', function() {
|
|
5781
|
+
* console.log('A remove event occurred.');
|
|
5782
|
+
* });
|
|
5783
|
+
*/
|
|
5784
|
+
| "remove"
|
|
5785
|
+
/**
|
|
5786
|
+
* Fired when an error occurs. This is GL JS's primary error reporting
|
|
5787
|
+
* mechanism. We use an event instead of `throw` to better accommodate
|
|
5788
|
+
* asyncronous operations. If no listeners are bound to the `error` event, the
|
|
5789
|
+
* error will be printed to the console.
|
|
5790
|
+
*
|
|
5791
|
+
* @event error
|
|
5792
|
+
* @memberof Map
|
|
5793
|
+
* @instance
|
|
5794
|
+
* @property {{error: {message: string}}} data
|
|
5795
|
+
* @example
|
|
5796
|
+
* // Initialize the map
|
|
5797
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5798
|
+
* // Set an event listener that fires
|
|
5799
|
+
* // when an error occurs.
|
|
5800
|
+
* map.on('error', function() {
|
|
5801
|
+
* console.log('A error event occurred.');
|
|
5802
|
+
* });
|
|
5803
|
+
*/
|
|
5804
|
+
| "error"
|
|
5805
|
+
/**
|
|
5806
|
+
* Fired when any map data loads or changes. See {@link MapDataEvent}
|
|
5807
|
+
* for more information.
|
|
5808
|
+
*
|
|
5809
|
+
* @event data
|
|
5810
|
+
* @memberof Map
|
|
5811
|
+
* @instance
|
|
5812
|
+
* @property {MapDataEvent} data
|
|
5813
|
+
* @example
|
|
5814
|
+
* // Initialize the map
|
|
5815
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5816
|
+
* // Set an event listener that fires
|
|
5817
|
+
* // when map data loads or changes.
|
|
5818
|
+
* map.on('data', function() {
|
|
5819
|
+
* console.log('A data event occurred.');
|
|
5820
|
+
* });
|
|
5821
|
+
* @see [Display HTML clusters with custom properties](https://maplibre.org/maplibre-gl-js-docs/example/cluster-html/)
|
|
5822
|
+
*/
|
|
5823
|
+
| "data"
|
|
5824
|
+
/**
|
|
5825
|
+
* Fired when the map's style loads or changes. See
|
|
5826
|
+
* {@link MapDataEvent} for more information.
|
|
5827
|
+
*
|
|
5828
|
+
* @event styledata
|
|
5829
|
+
* @memberof Map
|
|
5830
|
+
* @instance
|
|
5831
|
+
* @property {MapDataEvent} data
|
|
5832
|
+
* @example
|
|
5833
|
+
* // Initialize the map
|
|
5834
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5835
|
+
* // Set an event listener that fires
|
|
5836
|
+
* // when the map's style loads or changes.
|
|
5837
|
+
* map.on('styledata', function() {
|
|
5838
|
+
* console.log('A styledata event occurred.');
|
|
5839
|
+
* });
|
|
5840
|
+
*/
|
|
5841
|
+
| "styledata"
|
|
5842
|
+
/**
|
|
5843
|
+
* Fired when one of the map's sources loads or changes, including if a tile belonging
|
|
5844
|
+
* to a source loads or changes. See {@link MapDataEvent} for more information.
|
|
5845
|
+
*
|
|
5846
|
+
* @event sourcedata
|
|
5847
|
+
* @memberof Map
|
|
5848
|
+
* @instance
|
|
5849
|
+
* @property {MapDataEvent} data
|
|
5850
|
+
* @example
|
|
5851
|
+
* // Initialize the map
|
|
5852
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5853
|
+
* // Set an event listener that fires
|
|
5854
|
+
* // when one of the map's sources loads or changes.
|
|
5855
|
+
* map.on('sourcedata', function() {
|
|
5856
|
+
* console.log('A sourcedata event occurred.');
|
|
5857
|
+
* });
|
|
5858
|
+
*/
|
|
5859
|
+
| "sourcedata"
|
|
5860
|
+
/**
|
|
5861
|
+
* Fired when any map data (style, source, tile, etc) begins loading or
|
|
5862
|
+
* changing asyncronously. All `dataloading` events are followed by a `data`,
|
|
5863
|
+
* `dataabort` or `error` event. See {@link MapDataEvent} for more information.
|
|
5864
|
+
*
|
|
5865
|
+
* @event dataloading
|
|
5866
|
+
* @memberof Map
|
|
5867
|
+
* @instance
|
|
5868
|
+
* @property {MapDataEvent} data
|
|
5869
|
+
* @example
|
|
5870
|
+
* // Initialize the map
|
|
5871
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5872
|
+
* // Set an event listener that fires
|
|
5873
|
+
* // when any map data begins loading
|
|
5874
|
+
* // or changing asynchronously.
|
|
5875
|
+
* map.on('dataloading', function() {
|
|
5876
|
+
* console.log('A dataloading event occurred.');
|
|
5877
|
+
* });
|
|
5878
|
+
*/
|
|
5879
|
+
| "dataloading"
|
|
5880
|
+
/**
|
|
5881
|
+
* Fired when the map's style begins loading or changing asyncronously.
|
|
5882
|
+
* All `styledataloading` events are followed by a `styledata`
|
|
5883
|
+
* or `error` event. See {@link MapDataEvent} for more information.
|
|
5884
|
+
*
|
|
5885
|
+
* @event styledataloading
|
|
5886
|
+
* @memberof Map
|
|
5887
|
+
* @instance
|
|
5888
|
+
* @property {MapDataEvent} data
|
|
5889
|
+
* @example
|
|
5890
|
+
* // Initialize the map
|
|
5891
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5892
|
+
* // Set an event listener that fires
|
|
5893
|
+
* // map's style begins loading or
|
|
5894
|
+
* // changing asyncronously.
|
|
5895
|
+
* map.on('styledataloading', function() {
|
|
5896
|
+
* console.log('A styledataloading event occurred.');
|
|
5897
|
+
* });
|
|
5898
|
+
*/
|
|
5899
|
+
| "styledataloading"
|
|
5900
|
+
/**
|
|
5901
|
+
* Fired when one of the map's sources begins loading or changing asyncronously.
|
|
5902
|
+
* All `sourcedataloading` events are followed by a `sourcedata`, `sourcedataabort` or `error` event.
|
|
5903
|
+
* See {@link MapDataEvent} for more information.
|
|
5904
|
+
*
|
|
5905
|
+
* @event sourcedataloading
|
|
5906
|
+
* @memberof Map
|
|
5907
|
+
* @instance
|
|
5908
|
+
* @property {MapDataEvent} data
|
|
5909
|
+
* @example
|
|
5910
|
+
* // Initialize the map
|
|
5911
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5912
|
+
* // Set an event listener that fires
|
|
5913
|
+
* // map's sources begin loading or
|
|
5914
|
+
* // changing asyncronously.
|
|
5915
|
+
* map.on('sourcedataloading', function() {
|
|
5916
|
+
* console.log('A sourcedataloading event occurred.');
|
|
5917
|
+
* });
|
|
5918
|
+
*/
|
|
5919
|
+
| "sourcedataloading"
|
|
5920
|
+
/**
|
|
5921
|
+
* Fired when an icon or pattern needed by the style is missing. The missing image can
|
|
5922
|
+
* be added with {@link Map#addImage} within this event listener callback to prevent the image from
|
|
5923
|
+
* being skipped. This event can be used to dynamically generate icons and patterns.
|
|
5924
|
+
*
|
|
5925
|
+
* @event styleimagemissing
|
|
5926
|
+
* @memberof Map
|
|
5927
|
+
* @instance
|
|
5928
|
+
* @property {string} id The id of the missing image.
|
|
5929
|
+
* @example
|
|
5930
|
+
* // Initialize the map
|
|
5931
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5932
|
+
* // Set an event listener that fires
|
|
5933
|
+
* // an icon or pattern is missing.
|
|
5934
|
+
* map.on('styleimagemissing', function() {
|
|
5935
|
+
* console.log('A styleimagemissing event occurred.');
|
|
5936
|
+
* });
|
|
5937
|
+
* @see [Generate and add a missing icon to the map](https://maplibre.org/maplibre-gl-js-docs/example/add-image-missing-generated/)
|
|
5938
|
+
*/
|
|
5939
|
+
| "styleimagemissing"
|
|
5940
|
+
/**
|
|
5941
|
+
* @event style.load
|
|
5942
|
+
* @memberof Map
|
|
5943
|
+
* @instance
|
|
5944
|
+
* @private
|
|
5945
|
+
*/
|
|
5946
|
+
| "style.load"
|
|
5539
5947
|
/**
|
|
5540
|
-
|
|
5541
|
-
|
|
5542
|
-
|
|
5543
|
-
|
|
5544
|
-
|
|
5545
|
-
|
|
5546
|
-
|
|
5547
|
-
|
|
5548
|
-
|
|
5549
|
-
|
|
5550
|
-
|
|
5551
|
-
|
|
5552
|
-
|
|
5553
|
-
|
|
5554
|
-
|
|
5555
|
-
|
|
5556
|
-
|
|
5557
|
-
* @see [Animate a point](https://maplibre.org/maplibre-gl-js-docs/example/animate-point-along-line/)
|
|
5558
|
-
*/ | "load"
|
|
5948
|
+
* Fired when a request for one of the map's sources' tiles is aborted.
|
|
5949
|
+
* See {@link MapDataEvent} for more information.
|
|
5950
|
+
*
|
|
5951
|
+
* @event dataabort
|
|
5952
|
+
* @memberof Map
|
|
5953
|
+
* @instance
|
|
5954
|
+
* @property {MapDataEvent} data
|
|
5955
|
+
* @example
|
|
5956
|
+
* // Initialize the map
|
|
5957
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5958
|
+
* // Set an event listener that fires
|
|
5959
|
+
* // when a request for one of the map's sources' tiles is aborted.
|
|
5960
|
+
* map.on('dataabort', function() {
|
|
5961
|
+
* console.log('A dataabort event occurred.');
|
|
5962
|
+
* });
|
|
5963
|
+
*/
|
|
5964
|
+
| "dataabort"
|
|
5559
5965
|
/**
|
|
5560
|
-
|
|
5561
|
-
|
|
5562
|
-
|
|
5563
|
-
|
|
5564
|
-
|
|
5565
|
-
|
|
5966
|
+
* Fired when a request for one of the map's sources' tiles is aborted.
|
|
5967
|
+
* See {@link MapDataEvent} for more information.
|
|
5968
|
+
*
|
|
5969
|
+
* @event sourcedataabort
|
|
5970
|
+
* @memberof Map
|
|
5971
|
+
* @instance
|
|
5972
|
+
* @property {MapDataEvent} data
|
|
5973
|
+
* @example
|
|
5974
|
+
* // Initialize the map
|
|
5975
|
+
* var map = new maplibregl.Map({ // map options });
|
|
5976
|
+
* // Set an event listener that fires
|
|
5977
|
+
* // when a request for one of the map's sources' tiles is aborted.
|
|
5978
|
+
* map.on('sourcedataabort', function() {
|
|
5979
|
+
* console.log('A sourcedataabort event occurred.');
|
|
5980
|
+
* });
|
|
5981
|
+
*/
|
|
5982
|
+
| "sourcedataabort";
|
|
5983
|
+
export declare type GeoJSONSourceOptions = GeoJSONSourceSpecification & {
|
|
5984
|
+
workerOptions?: any;
|
|
5985
|
+
collectResourceTiming: boolean;
|
|
5986
|
+
};
|
|
5987
|
+
export declare class GeoJSONSource extends Evented implements Source {
|
|
5988
|
+
type: "geojson";
|
|
5989
|
+
id: string;
|
|
5990
|
+
minzoom: number;
|
|
5991
|
+
maxzoom: number;
|
|
5992
|
+
tileSize: number;
|
|
5993
|
+
attribution: string;
|
|
5994
|
+
promoteId: PromoteIdSpecification;
|
|
5995
|
+
isTileClipped: boolean;
|
|
5996
|
+
reparseOverscaled: boolean;
|
|
5997
|
+
_data: GeoJSON.GeoJSON | string;
|
|
5998
|
+
_options: any;
|
|
5999
|
+
workerOptions: any;
|
|
6000
|
+
map: Map;
|
|
6001
|
+
actor: Actor;
|
|
6002
|
+
_pendingLoads: number;
|
|
6003
|
+
_collectResourceTiming: boolean;
|
|
6004
|
+
_removed: boolean;
|
|
6005
|
+
/**
|
|
6006
|
+
* @private
|
|
6007
|
+
*/
|
|
6008
|
+
constructor(id: string, options: GeoJSONSourceOptions, dispatcher: Dispatcher, eventedParent: Evented);
|
|
6009
|
+
load(): void;
|
|
6010
|
+
onAdd(map: Map): void;
|
|
6011
|
+
/**
|
|
6012
|
+
* Sets the GeoJSON data and re-renders the map.
|
|
5566
6013
|
*
|
|
5567
|
-
* @
|
|
5568
|
-
* @
|
|
5569
|
-
|
|
5570
|
-
|
|
5571
|
-
|
|
5572
|
-
*
|
|
5573
|
-
* // Set an event listener that fires
|
|
5574
|
-
* // whenever the map is drawn to the screen.
|
|
5575
|
-
* map.on('render', function() {
|
|
5576
|
-
* console.log('A render event occurred.');
|
|
5577
|
-
* });
|
|
5578
|
-
*/ | "render"
|
|
5579
|
-
/**
|
|
5580
|
-
* Fired after the last frame rendered before the map enters an
|
|
5581
|
-
* "idle" state:
|
|
6014
|
+
* @param {Object|string} data A GeoJSON data object or a URL to one. The latter is preferable in the case of large GeoJSON files.
|
|
6015
|
+
* @returns {GeoJSONSource} this
|
|
6016
|
+
*/
|
|
6017
|
+
setData(data: GeoJSON.GeoJSON | string): this;
|
|
6018
|
+
/**
|
|
6019
|
+
* For clustered sources, fetches the zoom at which the given cluster expands.
|
|
5582
6020
|
*
|
|
5583
|
-
*
|
|
5584
|
-
*
|
|
5585
|
-
*
|
|
6021
|
+
* @param clusterId The value of the cluster's `cluster_id` property.
|
|
6022
|
+
* @param callback A callback to be called when the zoom value is retrieved (`(error, zoom) => { ... }`).
|
|
6023
|
+
* @returns {GeoJSONSource} this
|
|
6024
|
+
*/
|
|
6025
|
+
getClusterExpansionZoom(clusterId: number, callback: Callback<number>): this;
|
|
6026
|
+
/**
|
|
6027
|
+
* For clustered sources, fetches the children of the given cluster on the next zoom level (as an array of GeoJSON features).
|
|
5586
6028
|
*
|
|
5587
|
-
* @
|
|
5588
|
-
* @
|
|
5589
|
-
* @
|
|
5590
|
-
|
|
5591
|
-
|
|
5592
|
-
|
|
5593
|
-
*
|
|
5594
|
-
* // just before the map enters an "idle" state.
|
|
5595
|
-
* map.on('idle', function() {
|
|
5596
|
-
* console.log('A idle event occurred.');
|
|
5597
|
-
* });
|
|
5598
|
-
*/ | "idle"
|
|
5599
|
-
/**
|
|
5600
|
-
* Fired immediately after the map has been removed with {@link Map.event:remove}.
|
|
6029
|
+
* @param clusterId The value of the cluster's `cluster_id` property.
|
|
6030
|
+
* @param callback A callback to be called when the features are retrieved (`(error, features) => { ... }`).
|
|
6031
|
+
* @returns {GeoJSONSource} this
|
|
6032
|
+
*/
|
|
6033
|
+
getClusterChildren(clusterId: number, callback: Callback<Array<GeoJSON.Feature>>): this;
|
|
6034
|
+
/**
|
|
6035
|
+
* For clustered sources, fetches the original points that belong to the cluster (as an array of GeoJSON features).
|
|
5601
6036
|
*
|
|
5602
|
-
* @
|
|
5603
|
-
* @
|
|
5604
|
-
* @
|
|
6037
|
+
* @param clusterId The value of the cluster's `cluster_id` property.
|
|
6038
|
+
* @param limit The maximum number of features to return.
|
|
6039
|
+
* @param offset The number of features to skip (e.g. for pagination).
|
|
6040
|
+
* @param callback A callback to be called when the features are retrieved (`(error, features) => { ... }`).
|
|
6041
|
+
* @returns {GeoJSONSource} this
|
|
5605
6042
|
* @example
|
|
5606
|
-
* //
|
|
5607
|
-
*
|
|
5608
|
-
*
|
|
5609
|
-
*
|
|
5610
|
-
*
|
|
5611
|
-
* console.log('A remove event occurred.');
|
|
5612
|
-
* });
|
|
5613
|
-
*/ | "remove"
|
|
5614
|
-
/**
|
|
5615
|
-
* Fired when an error occurs. This is GL JS's primary error reporting
|
|
5616
|
-
* mechanism. We use an event instead of `throw` to better accommodate
|
|
5617
|
-
* asyncronous operations. If no listeners are bound to the `error` event, the
|
|
5618
|
-
* error will be printed to the console.
|
|
5619
|
-
*
|
|
5620
|
-
* @event error
|
|
5621
|
-
* @memberof Map
|
|
5622
|
-
* @instance
|
|
5623
|
-
* @property {{error: {message: string}}} data
|
|
5624
|
-
* @example
|
|
5625
|
-
* // Initialize the map
|
|
5626
|
-
* var map = new maplibregl.Map({ // map options });
|
|
5627
|
-
* // Set an event listener that fires
|
|
5628
|
-
* // when an error occurs.
|
|
5629
|
-
* map.on('error', function() {
|
|
5630
|
-
* console.log('A error event occurred.');
|
|
5631
|
-
* });
|
|
5632
|
-
*/ | "error"
|
|
5633
|
-
/**
|
|
5634
|
-
* Fired when any map data loads or changes. See {@link MapDataEvent}
|
|
5635
|
-
* for more information.
|
|
6043
|
+
* // Retrieve cluster leaves on click
|
|
6044
|
+
* map.on('click', 'clusters', function(e) {
|
|
6045
|
+
* var features = map.queryRenderedFeatures(e.point, {
|
|
6046
|
+
* layers: ['clusters']
|
|
6047
|
+
* });
|
|
5636
6048
|
*
|
|
5637
|
-
*
|
|
5638
|
-
*
|
|
5639
|
-
*
|
|
5640
|
-
* @property {MapDataEvent} data
|
|
5641
|
-
* @example
|
|
5642
|
-
* // Initialize the map
|
|
5643
|
-
* var map = new maplibregl.Map({ // map options });
|
|
5644
|
-
* // Set an event listener that fires
|
|
5645
|
-
* // when map data loads or changes.
|
|
5646
|
-
* map.on('data', function() {
|
|
5647
|
-
* console.log('A data event occurred.');
|
|
5648
|
-
* });
|
|
5649
|
-
* @see [Display HTML clusters with custom properties](https://maplibre.org/maplibre-gl-js-docs/example/cluster-html/)
|
|
5650
|
-
*/ | "data"
|
|
5651
|
-
/**
|
|
5652
|
-
* Fired when the map's style loads or changes. See
|
|
5653
|
-
* {@link MapDataEvent} for more information.
|
|
6049
|
+
* var clusterId = features[0].properties.cluster_id;
|
|
6050
|
+
* var pointCount = features[0].properties.point_count;
|
|
6051
|
+
* var clusterSource = map.getSource('clusters');
|
|
5654
6052
|
*
|
|
5655
|
-
*
|
|
5656
|
-
*
|
|
5657
|
-
*
|
|
5658
|
-
*
|
|
5659
|
-
* @example
|
|
5660
|
-
* // Initialize the map
|
|
5661
|
-
* var map = new maplibregl.Map({ // map options });
|
|
5662
|
-
* // Set an event listener that fires
|
|
5663
|
-
* // when the map's style loads or changes.
|
|
5664
|
-
* map.on('styledata', function() {
|
|
5665
|
-
* console.log('A styledata event occurred.');
|
|
6053
|
+
* clusterSource.getClusterLeaves(clusterId, pointCount, 0, function(error, features) {
|
|
6054
|
+
* // Print cluster leaves in the console
|
|
6055
|
+
* console.log('Cluster leaves:', error, features);
|
|
6056
|
+
* })
|
|
5666
6057
|
* });
|
|
5667
|
-
*/
|
|
5668
|
-
|
|
5669
|
-
|
|
5670
|
-
|
|
5671
|
-
|
|
5672
|
-
|
|
5673
|
-
|
|
6058
|
+
*/
|
|
6059
|
+
getClusterLeaves(clusterId: number, limit: number, offset: number, callback: Callback<Array<GeoJSON.Feature>>): this;
|
|
6060
|
+
_updateWorkerData(sourceDataType: MapSourceDataType): void;
|
|
6061
|
+
loaded(): boolean;
|
|
6062
|
+
loadTile(tile: Tile, callback: Callback<void>): void;
|
|
6063
|
+
abortTile(tile: Tile): void;
|
|
6064
|
+
unloadTile(tile: Tile): void;
|
|
6065
|
+
onRemove(): void;
|
|
6066
|
+
serialize(): any;
|
|
6067
|
+
hasTransition(): boolean;
|
|
6068
|
+
}
|
|
6069
|
+
export declare type CanvasSourceSpecification = {
|
|
6070
|
+
"type": "canvas";
|
|
6071
|
+
"coordinates": [
|
|
6072
|
+
[
|
|
6073
|
+
number,
|
|
6074
|
+
number
|
|
6075
|
+
],
|
|
6076
|
+
[
|
|
6077
|
+
number,
|
|
6078
|
+
number
|
|
6079
|
+
],
|
|
6080
|
+
[
|
|
6081
|
+
number,
|
|
6082
|
+
number
|
|
6083
|
+
],
|
|
6084
|
+
[
|
|
6085
|
+
number,
|
|
6086
|
+
number
|
|
6087
|
+
]
|
|
6088
|
+
];
|
|
6089
|
+
"animate"?: boolean;
|
|
6090
|
+
"canvas": string | HTMLCanvasElement;
|
|
6091
|
+
};
|
|
6092
|
+
export declare class CanvasSource extends ImageSource {
|
|
6093
|
+
options: CanvasSourceSpecification;
|
|
6094
|
+
animate: boolean;
|
|
6095
|
+
canvas: HTMLCanvasElement;
|
|
6096
|
+
width: number;
|
|
6097
|
+
height: number;
|
|
6098
|
+
play: () => void;
|
|
6099
|
+
pause: () => void;
|
|
6100
|
+
_playing: boolean;
|
|
6101
|
+
/**
|
|
6102
|
+
* @private
|
|
6103
|
+
*/
|
|
6104
|
+
constructor(id: string, options: CanvasSourceSpecification, dispatcher: Dispatcher, eventedParent: Evented);
|
|
6105
|
+
/**
|
|
6106
|
+
* Enables animation. The image will be copied from the canvas to the map on each frame.
|
|
6107
|
+
* @method play
|
|
5674
6108
|
* @instance
|
|
5675
|
-
* @
|
|
5676
|
-
|
|
5677
|
-
|
|
5678
|
-
*
|
|
5679
|
-
*
|
|
5680
|
-
* // when one of the map's sources loads or changes.
|
|
5681
|
-
* map.on('sourcedata', function() {
|
|
5682
|
-
* console.log('A sourcedata event occurred.');
|
|
5683
|
-
* });
|
|
5684
|
-
*/ | "sourcedata"
|
|
5685
|
-
/**
|
|
5686
|
-
* Fired when any map data (style, source, tile, etc) begins loading or
|
|
5687
|
-
* changing asyncronously. All `dataloading` events are followed by a `data`
|
|
5688
|
-
* or `error` event. See {@link MapDataEvent} for more information.
|
|
5689
|
-
*
|
|
5690
|
-
* @event dataloading
|
|
5691
|
-
* @memberof Map
|
|
6109
|
+
* @memberof CanvasSource
|
|
6110
|
+
*/
|
|
6111
|
+
/**
|
|
6112
|
+
* Disables animation. The map will display a static copy of the canvas image.
|
|
6113
|
+
* @method pause
|
|
5692
6114
|
* @instance
|
|
5693
|
-
* @
|
|
5694
|
-
|
|
5695
|
-
|
|
5696
|
-
|
|
5697
|
-
*
|
|
5698
|
-
* // when any map data begins loading
|
|
5699
|
-
* // or changing asynchronously.
|
|
5700
|
-
* map.on('dataloading', function() {
|
|
5701
|
-
* console.log('A dataloading event occurred.');
|
|
5702
|
-
* });
|
|
5703
|
-
*/ | "dataloading"
|
|
5704
|
-
/**
|
|
5705
|
-
* Fired when the map's style begins loading or changing asyncronously.
|
|
5706
|
-
* All `styledataloading` events are followed by a `styledata`
|
|
5707
|
-
* or `error` event. See {@link MapDataEvent} for more information.
|
|
6115
|
+
* @memberof CanvasSource
|
|
6116
|
+
*/
|
|
6117
|
+
load(): void;
|
|
6118
|
+
/**
|
|
6119
|
+
* Returns the HTML `canvas` element.
|
|
5708
6120
|
*
|
|
5709
|
-
* @
|
|
5710
|
-
|
|
5711
|
-
|
|
5712
|
-
|
|
5713
|
-
|
|
5714
|
-
|
|
5715
|
-
|
|
5716
|
-
|
|
5717
|
-
|
|
5718
|
-
|
|
5719
|
-
|
|
5720
|
-
|
|
5721
|
-
|
|
5722
|
-
|
|
5723
|
-
|
|
5724
|
-
|
|
5725
|
-
|
|
5726
|
-
|
|
6121
|
+
* @returns {HTMLCanvasElement} The HTML `canvas` element.
|
|
6122
|
+
*/
|
|
6123
|
+
getCanvas(): HTMLCanvasElement;
|
|
6124
|
+
onAdd(map: Map): void;
|
|
6125
|
+
onRemove(): void;
|
|
6126
|
+
prepare(): void;
|
|
6127
|
+
serialize(): any;
|
|
6128
|
+
hasTransition(): boolean;
|
|
6129
|
+
_hasInvalidDimensions(): boolean;
|
|
6130
|
+
}
|
|
6131
|
+
export declare type Coordinates = [
|
|
6132
|
+
[
|
|
6133
|
+
number,
|
|
6134
|
+
number
|
|
6135
|
+
],
|
|
6136
|
+
[
|
|
6137
|
+
number,
|
|
6138
|
+
number
|
|
6139
|
+
],
|
|
6140
|
+
[
|
|
6141
|
+
number,
|
|
6142
|
+
number
|
|
6143
|
+
],
|
|
6144
|
+
[
|
|
6145
|
+
number,
|
|
6146
|
+
number
|
|
6147
|
+
]
|
|
6148
|
+
];
|
|
6149
|
+
export declare class ImageSource extends Evented implements Source {
|
|
6150
|
+
type: string;
|
|
6151
|
+
id: string;
|
|
6152
|
+
minzoom: number;
|
|
6153
|
+
maxzoom: number;
|
|
6154
|
+
tileSize: number;
|
|
6155
|
+
url: string;
|
|
6156
|
+
coordinates: Coordinates;
|
|
6157
|
+
tiles: {
|
|
6158
|
+
[_: string]: Tile;
|
|
6159
|
+
};
|
|
6160
|
+
options: any;
|
|
6161
|
+
dispatcher: Dispatcher;
|
|
6162
|
+
map: Map;
|
|
6163
|
+
texture: Texture | null;
|
|
6164
|
+
image: HTMLImageElement | ImageBitmap;
|
|
6165
|
+
tileID: CanonicalTileID;
|
|
6166
|
+
_boundsArray: RasterBoundsArray;
|
|
6167
|
+
boundsBuffer: VertexBuffer;
|
|
6168
|
+
boundsSegments: SegmentVector;
|
|
6169
|
+
_loaded: boolean;
|
|
6170
|
+
/**
|
|
6171
|
+
* @private
|
|
6172
|
+
*/
|
|
6173
|
+
constructor(id: string, options: ImageSourceSpecification | VideoSourceSpecification | CanvasSourceSpecification, dispatcher: Dispatcher, eventedParent: Evented);
|
|
6174
|
+
load(newCoordinates?: Coordinates, successCallback?: () => void): void;
|
|
6175
|
+
loaded(): boolean;
|
|
6176
|
+
/**
|
|
6177
|
+
* Updates the image URL and, optionally, the coordinates. To avoid having the image flash after changing,
|
|
6178
|
+
* set the `raster-fade-duration` paint property on the raster layer to 0.
|
|
5727
6179
|
*
|
|
5728
|
-
* @
|
|
5729
|
-
* @
|
|
5730
|
-
* @
|
|
5731
|
-
*
|
|
5732
|
-
*
|
|
5733
|
-
*
|
|
5734
|
-
*
|
|
5735
|
-
|
|
5736
|
-
|
|
5737
|
-
|
|
5738
|
-
|
|
5739
|
-
|
|
5740
|
-
|
|
5741
|
-
|
|
5742
|
-
/**
|
|
5743
|
-
*
|
|
5744
|
-
* be added with {@link Map#addImage} within this event listener callback to prevent the image from
|
|
5745
|
-
* being skipped. This event can be used to dynamically generate icons and patterns.
|
|
6180
|
+
* @param {Object} options Options object.
|
|
6181
|
+
* @param {string} [options.url] Required image URL.
|
|
6182
|
+
* @param {Array<Array<number>>} [options.coordinates] Four geographical coordinates,
|
|
6183
|
+
* represented as arrays of longitude and latitude numbers, which define the corners of the image.
|
|
6184
|
+
* The coordinates start at the top left corner of the image and proceed in clockwise order.
|
|
6185
|
+
* They do not have to represent a rectangle.
|
|
6186
|
+
* @returns {ImageSource} this
|
|
6187
|
+
*/
|
|
6188
|
+
updateImage(options: {
|
|
6189
|
+
url: string;
|
|
6190
|
+
coordinates?: Coordinates;
|
|
6191
|
+
}): this;
|
|
6192
|
+
_finishLoading(): void;
|
|
6193
|
+
onAdd(map: Map): void;
|
|
6194
|
+
/**
|
|
6195
|
+
* Sets the image's coordinates and re-renders the map.
|
|
5746
6196
|
*
|
|
5747
|
-
* @
|
|
5748
|
-
*
|
|
5749
|
-
*
|
|
5750
|
-
*
|
|
5751
|
-
* @
|
|
5752
|
-
|
|
5753
|
-
|
|
5754
|
-
|
|
5755
|
-
|
|
5756
|
-
|
|
5757
|
-
|
|
5758
|
-
|
|
5759
|
-
* @see [Generate and add a missing icon to the map](https://maplibre.org/maplibre-gl-js-docs/example/add-image-missing-generated/)
|
|
5760
|
-
*/ | "styleimagemissing"
|
|
5761
|
-
/**
|
|
5762
|
-
* @event style.load
|
|
5763
|
-
* @memberof Map
|
|
5764
|
-
* @instance
|
|
5765
|
-
* @private
|
|
5766
|
-
*/ | "style.load";
|
|
6197
|
+
* @param {Array<Array<number>>} coordinates Four geographical coordinates,
|
|
6198
|
+
* represented as arrays of longitude and latitude numbers, which define the corners of the image.
|
|
6199
|
+
* The coordinates start at the top left corner of the image and proceed in clockwise order.
|
|
6200
|
+
* They do not have to represent a rectangle.
|
|
6201
|
+
* @returns {ImageSource} this
|
|
6202
|
+
*/
|
|
6203
|
+
setCoordinates(coordinates: Coordinates): this;
|
|
6204
|
+
prepare(): void;
|
|
6205
|
+
loadTile(tile: Tile, callback: Callback<void>): void;
|
|
6206
|
+
serialize(): any;
|
|
6207
|
+
hasTransition(): boolean;
|
|
6208
|
+
}
|
|
5767
6209
|
/**
|
|
5768
6210
|
* The `Source` interface must be implemented by each source type, including "core" types (`vector`, `raster`,
|
|
5769
6211
|
* `video`, etc.) and all custom, third-party types.
|
|
@@ -5811,11 +6253,11 @@ export interface Source {
|
|
|
5811
6253
|
readonly abortTile?: (tile: Tile, callback: Callback<void>) => void;
|
|
5812
6254
|
readonly unloadTile?: (tile: Tile, callback: Callback<void>) => void;
|
|
5813
6255
|
/**
|
|
5814
|
-
|
|
5815
|
-
|
|
5816
|
-
|
|
5817
|
-
|
|
5818
|
-
|
|
6256
|
+
* @returns A plain (stringifiable) JS object representing the current state of the source.
|
|
6257
|
+
* Creating a source using the returned object as the `options` should result in a Source that is
|
|
6258
|
+
* equivalent to this one.
|
|
6259
|
+
* @private
|
|
6260
|
+
*/
|
|
5819
6261
|
serialize(): any;
|
|
5820
6262
|
readonly prepare?: () => void;
|
|
5821
6263
|
}
|
|
@@ -6082,6 +6524,19 @@ export declare class SourceCache extends Evented {
|
|
|
6082
6524
|
*/
|
|
6083
6525
|
reloadTilesForDependencies(namespaces: Array<string>, keys: Array<string>): void;
|
|
6084
6526
|
}
|
|
6527
|
+
declare const status: {
|
|
6528
|
+
unavailable: string;
|
|
6529
|
+
deferred: string;
|
|
6530
|
+
loading: string;
|
|
6531
|
+
loaded: string;
|
|
6532
|
+
error: string;
|
|
6533
|
+
};
|
|
6534
|
+
export declare type PluginState = {
|
|
6535
|
+
pluginStatus: typeof status[keyof typeof status];
|
|
6536
|
+
pluginURL: string;
|
|
6537
|
+
};
|
|
6538
|
+
export declare type PluginStateSyncCallback = (state: PluginState) => void;
|
|
6539
|
+
declare const registerForPluginStateChange: (callback: PluginStateSyncCallback) => PluginStateSyncCallback;
|
|
6085
6540
|
export declare type QueryResult<T> = {
|
|
6086
6541
|
key: T;
|
|
6087
6542
|
x1: number;
|
|
@@ -6089,7 +6544,10 @@ export declare type QueryResult<T> = {
|
|
|
6089
6544
|
x2: number;
|
|
6090
6545
|
y2: number;
|
|
6091
6546
|
};
|
|
6092
|
-
export declare
|
|
6547
|
+
export declare type GridKey = {
|
|
6548
|
+
overlapMode?: OverlapMode;
|
|
6549
|
+
};
|
|
6550
|
+
export declare class GridIndex<T extends GridKey> {
|
|
6093
6551
|
circleKeys: Array<T>;
|
|
6094
6552
|
boxKeys: Array<T>;
|
|
6095
6553
|
boxCells: Array<Array<number>>;
|
|
@@ -6112,8 +6570,8 @@ export declare class GridIndex<T> {
|
|
|
6112
6570
|
private _insertCircleCell;
|
|
6113
6571
|
private _query;
|
|
6114
6572
|
query(x1: number, y1: number, x2: number, y2: number): Array<QueryResult<T>>;
|
|
6115
|
-
hitTest(x1: number, y1: number, x2: number, y2: number, predicate?: (key: T) => boolean): boolean;
|
|
6116
|
-
hitTestCircle(x: number, y: number, radius: number, predicate?: (key: T) => boolean): boolean;
|
|
6573
|
+
hitTest(x1: number, y1: number, x2: number, y2: number, overlapMode: OverlapMode, predicate?: (key: T) => boolean): boolean;
|
|
6574
|
+
hitTestCircle(x: number, y: number, radius: number, overlapMode: OverlapMode, predicate?: (key: T) => boolean): boolean;
|
|
6117
6575
|
private _queryCell;
|
|
6118
6576
|
private _queryCellCircle;
|
|
6119
6577
|
private _forEachCell;
|
|
@@ -6126,6 +6584,7 @@ export declare type FeatureKey = {
|
|
|
6126
6584
|
bucketInstanceId: number;
|
|
6127
6585
|
featureIndex: number;
|
|
6128
6586
|
collisionGroupID: number;
|
|
6587
|
+
overlapMode: OverlapMode;
|
|
6129
6588
|
};
|
|
6130
6589
|
export declare class CollisionIndex {
|
|
6131
6590
|
grid: GridIndex<FeatureKey>;
|
|
@@ -6137,11 +6596,11 @@ export declare class CollisionIndex {
|
|
|
6137
6596
|
gridRightBoundary: number;
|
|
6138
6597
|
gridBottomBoundary: number;
|
|
6139
6598
|
constructor(transform: Transform, grid?: GridIndex<FeatureKey>, ignoredGrid?: GridIndex<FeatureKey>);
|
|
6140
|
-
placeCollisionBox(collisionBox: SingleCollisionBox,
|
|
6599
|
+
placeCollisionBox(collisionBox: SingleCollisionBox, overlapMode: OverlapMode, textPixelRatio: number, posMatrix: mat4, collisionGroupPredicate?: (key: FeatureKey) => boolean): {
|
|
6141
6600
|
box: Array<number>;
|
|
6142
6601
|
offscreen: boolean;
|
|
6143
6602
|
};
|
|
6144
|
-
placeCollisionCircles(
|
|
6603
|
+
placeCollisionCircles(overlapMode: OverlapMode, symbol: any, lineVertexArray: SymbolLineVertexArray, glyphOffsetArray: GlyphOffsetArray, fontSize: number, posMatrix: mat4, labelPlaneMatrix: mat4, labelToScreenMatrix: mat4, showCollisionCircles: boolean, pitchWithMap: boolean, collisionGroupPredicate: (key: FeatureKey) => boolean, circlePixelDiameter: number, textPixelPadding: number): {
|
|
6145
6604
|
circles: Array<number>;
|
|
6146
6605
|
offscreen: boolean;
|
|
6147
6606
|
collisionDetected: boolean;
|
|
@@ -6154,8 +6613,8 @@ export declare class CollisionIndex {
|
|
|
6154
6613
|
* @private
|
|
6155
6614
|
*/
|
|
6156
6615
|
queryRenderedSymbols(viewportQueryGeometry: Array<Point>): {};
|
|
6157
|
-
insertCollisionBox(collisionBox: Array<number>, ignorePlacement: boolean, bucketInstanceId: number, featureIndex: number, collisionGroupID: number): void;
|
|
6158
|
-
insertCollisionCircles(collisionCircles: Array<number>, ignorePlacement: boolean, bucketInstanceId: number, featureIndex: number, collisionGroupID: number): void;
|
|
6616
|
+
insertCollisionBox(collisionBox: Array<number>, overlapMode: OverlapMode, ignorePlacement: boolean, bucketInstanceId: number, featureIndex: number, collisionGroupID: number): void;
|
|
6617
|
+
insertCollisionCircles(collisionCircles: Array<number>, overlapMode: OverlapMode, ignorePlacement: boolean, bucketInstanceId: number, featureIndex: number, collisionGroupID: number): void;
|
|
6159
6618
|
projectAndGetPerspectiveRatio(posMatrix: mat4, x: number, y: number): {
|
|
6160
6619
|
point: Point;
|
|
6161
6620
|
perspectiveRatio: number;
|
|
@@ -6200,7 +6659,7 @@ export declare class RetainedQueryData {
|
|
|
6200
6659
|
}
|
|
6201
6660
|
export declare type CollisionGroup = {
|
|
6202
6661
|
ID: number;
|
|
6203
|
-
predicate?:
|
|
6662
|
+
predicate?: (key: FeatureKey) => boolean;
|
|
6204
6663
|
};
|
|
6205
6664
|
export declare class CollisionGroups {
|
|
6206
6665
|
collisionGroups: {
|
|
@@ -6276,7 +6735,7 @@ export declare class Placement {
|
|
|
6276
6735
|
};
|
|
6277
6736
|
constructor(transform: Transform, fadeDuration: number, crossSourceCollisions: boolean, prevPlacement?: Placement);
|
|
6278
6737
|
getBucketParts(results: Array<BucketPart>, styleLayer: StyleLayer, tile: Tile, sortAcrossTiles: boolean): void;
|
|
6279
|
-
attemptAnchorPlacement(anchor: TextAnchor, textBox: SingleCollisionBox, width: number, height: number, textBoxScale: number, rotateWithMap: boolean, pitchWithMap: boolean, textPixelRatio: number, posMatrix: mat4, collisionGroup: CollisionGroup,
|
|
6738
|
+
attemptAnchorPlacement(anchor: TextAnchor, textBox: SingleCollisionBox, width: number, height: number, textBoxScale: number, rotateWithMap: boolean, pitchWithMap: boolean, textPixelRatio: number, posMatrix: mat4, collisionGroup: CollisionGroup, textOverlapMode: OverlapMode, symbolInstance: SymbolInstance, bucket: SymbolBucket, orientation: number, iconBox?: SingleCollisionBox | null): {
|
|
6280
6739
|
shift: Point;
|
|
6281
6740
|
placedGlyphBoxes: {
|
|
6282
6741
|
box: Array<number>;
|
|
@@ -6493,10 +6952,10 @@ export declare class Style extends Evented {
|
|
|
6493
6952
|
*/
|
|
6494
6953
|
removeSource(id: string): this;
|
|
6495
6954
|
/**
|
|
6496
|
-
|
|
6497
|
-
|
|
6498
|
-
|
|
6499
|
-
|
|
6955
|
+
* Set the data of a GeoJSON source, given its id.
|
|
6956
|
+
* @param {string} id id of the source
|
|
6957
|
+
* @param {GeoJSON|string} data GeoJSON source
|
|
6958
|
+
*/
|
|
6500
6959
|
setGeoJSONSourceData(id: string, data: GeoJSON.GeoJSON | string): void;
|
|
6501
6960
|
/**
|
|
6502
6961
|
* Get a source by id.
|
|
@@ -6516,7 +6975,7 @@ export declare class Style extends Evented {
|
|
|
6516
6975
|
/**
|
|
6517
6976
|
* Moves a layer to a different z-position. The layer will be inserted before the layer with
|
|
6518
6977
|
* ID `before`, or appended if `before` is omitted.
|
|
6519
|
-
* @param {string} id
|
|
6978
|
+
* @param {string} id ID of the layer to move
|
|
6520
6979
|
* @param {string} [before] ID of an existing layer to insert before
|
|
6521
6980
|
*/
|
|
6522
6981
|
moveLayer(id: string, before?: string): void;
|
|
@@ -6640,6 +7099,7 @@ export declare class Painter {
|
|
|
6640
7099
|
emptyProgramConfiguration: ProgramConfiguration;
|
|
6641
7100
|
width: number;
|
|
6642
7101
|
height: number;
|
|
7102
|
+
pixelRatio: number;
|
|
6643
7103
|
tileExtentBuffer: VertexBuffer;
|
|
6644
7104
|
tileExtentSegments: SegmentVector;
|
|
6645
7105
|
debugBuffer: VertexBuffer;
|
|
@@ -6679,7 +7139,7 @@ export declare class Painter {
|
|
|
6679
7139
|
debugOverlayTexture: Texture;
|
|
6680
7140
|
debugOverlayCanvas: HTMLCanvasElement;
|
|
6681
7141
|
constructor(gl: WebGLRenderingContext, transform: Transform);
|
|
6682
|
-
resize(width: number, height: number): void;
|
|
7142
|
+
resize(width: number, height: number, pixelRatio: number): void;
|
|
6683
7143
|
setup(): void;
|
|
6684
7144
|
clearStencil(): void;
|
|
6685
7145
|
_renderTileClippingMasks(layer: StyleLayer, tileIDs: Array<OverscaledTileID>): void;
|
|
@@ -7662,12 +8122,12 @@ export declare class ScrollZoomHandler {
|
|
|
7662
8122
|
*/
|
|
7663
8123
|
setZoomRate(zoomRate: number): void;
|
|
7664
8124
|
/**
|
|
7665
|
-
|
|
7666
|
-
|
|
7667
|
-
|
|
7668
|
-
|
|
7669
|
-
|
|
7670
|
-
|
|
8125
|
+
* Set the zoom rate of a mouse wheel
|
|
8126
|
+
* @param {number} [wheelZoomRate=1/450] The rate used to scale mouse wheel movement to a zoom value.
|
|
8127
|
+
* @example
|
|
8128
|
+
* // Slow down zoom of mouse wheel
|
|
8129
|
+
* map.scrollZoom.setWheelZoomRate(1/600);
|
|
8130
|
+
*/
|
|
7671
8131
|
setWheelZoomRate(wheelZoomRate: number): void;
|
|
7672
8132
|
/**
|
|
7673
8133
|
* Returns a Boolean indicating whether the "scroll to zoom" interaction is enabled.
|
|
@@ -8255,6 +8715,7 @@ export declare type MapOptions = {
|
|
|
8255
8715
|
localIdeographFontFamily?: string;
|
|
8256
8716
|
style: StyleSpecification | string;
|
|
8257
8717
|
pitchWithRotate?: boolean;
|
|
8718
|
+
pixelRatio?: number;
|
|
8258
8719
|
};
|
|
8259
8720
|
export declare type Complete<T> = {
|
|
8260
8721
|
[P in keyof Required<T>]: Pick<T, P> extends Required<Pick<T, P>> ? T[P] : (T[P] | undefined);
|
|
@@ -8304,6 +8765,7 @@ export declare class Map extends Camera {
|
|
|
8304
8765
|
_locale: any;
|
|
8305
8766
|
_removed: boolean;
|
|
8306
8767
|
_clickTolerance: number;
|
|
8768
|
+
_pixelRatio: number;
|
|
8307
8769
|
/**
|
|
8308
8770
|
* The map's {@link ScrollZoomHandler}, which implements zooming in and out with a scroll wheel or trackpad.
|
|
8309
8771
|
* Find more details and examples using `scrollZoom` in the {@link ScrollZoomHandler} section.
|
|
@@ -8407,6 +8869,18 @@ export declare class Map extends Camera {
|
|
|
8407
8869
|
* if (mapDiv.style.visibility === true) map.resize();
|
|
8408
8870
|
*/
|
|
8409
8871
|
resize(eventData?: any): this;
|
|
8872
|
+
/**
|
|
8873
|
+
* Returns the map's pixel ratio.
|
|
8874
|
+
* @returns {number} The pixel ratio.
|
|
8875
|
+
*/
|
|
8876
|
+
getPixelRatio(): number;
|
|
8877
|
+
/**
|
|
8878
|
+
* Sets the map's pixel ratio. This allows to override `devicePixelRatio`.
|
|
8879
|
+
* After this call, the canvas' `width` attribute will be `container.clientWidth * pixelRatio`
|
|
8880
|
+
* and its height attribute will be `container.clientHeight * pixelRatio`.
|
|
8881
|
+
* @param {number} pixelRatio The pixel ratio.
|
|
8882
|
+
*/
|
|
8883
|
+
setPixelRatio(pixelRatio: number): void;
|
|
8410
8884
|
/**
|
|
8411
8885
|
* Returns the map's geographical bounds. When the bearing or pitch is non-zero, the visible region is not
|
|
8412
8886
|
* an axis-aligned rectangle, and the result is the smallest bounds that encompasses the visible region.
|
|
@@ -8666,6 +9140,8 @@ export declare class Map extends Camera {
|
|
|
8666
9140
|
* | [`styledataloading`](#map.event:styledataloading) | |
|
|
8667
9141
|
* | [`sourcedataloading`](#map.event:sourcedataloading) | |
|
|
8668
9142
|
* | [`styleimagemissing`](#map.event:styleimagemissing) | |
|
|
9143
|
+
* | [`dataabort`](#map.event:dataabort) | |
|
|
9144
|
+
* | [`sourcedataabort`](#map.event:sourcedataabort) | |
|
|
8669
9145
|
*
|
|
8670
9146
|
* @param {string | Listener} layerIdOrListener The ID of a style layer or a listener if no ID is provided. Event will only be triggered if its location
|
|
8671
9147
|
* is within a visible feature in this layer. The event will have a `features` property containing
|
|
@@ -8919,10 +9395,10 @@ export declare class Map extends Camera {
|
|
|
8919
9395
|
/**
|
|
8920
9396
|
* Updates the requestManager's transform request with a new function
|
|
8921
9397
|
*
|
|
8922
|
-
*
|
|
9398
|
+
* @param transformRequest A callback run before the Map makes a request for an external URL. The callback can be used to modify the url, set headers, or set the credentials property for cross-origin requests.
|
|
8923
9399
|
* Expected to return an object with a `url` property and optionally `headers` and `credentials` properties
|
|
8924
9400
|
*
|
|
8925
|
-
*
|
|
9401
|
+
* @returns {Map} `this`
|
|
8926
9402
|
*
|
|
8927
9403
|
* @example
|
|
8928
9404
|
* map.setTransformRequest((url: string, resourceType: string) => {});
|
|
@@ -9063,9 +9539,9 @@ export declare class Map extends Camera {
|
|
|
9063
9539
|
* @param options Options object.
|
|
9064
9540
|
* @param options.pixelRatio The ratio of pixels in the image to physical pixels on the screen
|
|
9065
9541
|
* @param options.sdf Whether the image should be interpreted as an SDF image
|
|
9066
|
-
* @param options.content
|
|
9067
|
-
* @param options.stretchX
|
|
9068
|
-
* @param options.stretchY
|
|
9542
|
+
* @param options.content `[x1, y1, x2, y2]` If `icon-text-fit` is used in a layer with this image, this option defines the part of the image that can be covered by the content in `text-field`.
|
|
9543
|
+
* @param options.stretchX `[[x1, x2], ...]` If `icon-text-fit` is used in a layer with this image, this option defines the part(s) of the image that can be stretched horizontally.
|
|
9544
|
+
* @param options.stretchY `[[y1, y2], ...]` If `icon-text-fit` is used in a layer with this image, this option defines the part(s) of the image that can be stretched vertically.
|
|
9069
9545
|
*
|
|
9070
9546
|
* @example
|
|
9071
9547
|
* // If the style's sprite does not already contain an image with ID 'cat',
|
|
@@ -9127,7 +9603,7 @@ export declare class Map extends Camera {
|
|
|
9127
9603
|
*
|
|
9128
9604
|
* @param id The ID of the image.
|
|
9129
9605
|
*
|
|
9130
|
-
* @returns {boolean}
|
|
9606
|
+
* @returns {boolean} A Boolean indicating whether the image exists.
|
|
9131
9607
|
* @example
|
|
9132
9608
|
* // Check if an image with the ID 'cat' exists in
|
|
9133
9609
|
* // the style's sprite.
|
|
@@ -9166,16 +9642,16 @@ export declare class Map extends Camera {
|
|
|
9166
9642
|
*/
|
|
9167
9643
|
loadImage(url: string, callback: Callback<HTMLImageElement | ImageBitmap>): void;
|
|
9168
9644
|
/**
|
|
9169
|
-
|
|
9170
|
-
|
|
9171
|
-
|
|
9172
|
-
|
|
9173
|
-
|
|
9174
|
-
|
|
9175
|
-
|
|
9176
|
-
|
|
9177
|
-
|
|
9178
|
-
|
|
9645
|
+
* Returns an Array of strings containing the IDs of all images currently available in the map.
|
|
9646
|
+
* This includes both images from the style's original sprite
|
|
9647
|
+
* and any images that have been added at runtime using {@link Map#addImage}.
|
|
9648
|
+
*
|
|
9649
|
+
* @returns {Array<string>} An Array of strings containing the names of all sprites/images currently available in the map.
|
|
9650
|
+
*
|
|
9651
|
+
* @example
|
|
9652
|
+
* var allImages = map.listImages();
|
|
9653
|
+
*
|
|
9654
|
+
*/
|
|
9179
9655
|
listImages(): string[];
|
|
9180
9656
|
/**
|
|
9181
9657
|
* Adds a [MapLibre style layer](https://maplibre.org/maplibre-gl-js-docs/style-spec/#layers)
|
|
@@ -9534,7 +10010,7 @@ export declare class Map extends Camera {
|
|
|
9534
10010
|
* }, 'hover');
|
|
9535
10011
|
* });
|
|
9536
10012
|
*
|
|
9537
|
-
|
|
10013
|
+
*/
|
|
9538
10014
|
removeFeatureState(target: {
|
|
9539
10015
|
source: string;
|
|
9540
10016
|
sourceLayer?: string;
|
|
@@ -9604,7 +10080,7 @@ export declare class Map extends Camera {
|
|
|
9604
10080
|
getCanvas(): HTMLCanvasElement;
|
|
9605
10081
|
_containerDimensions(): number[];
|
|
9606
10082
|
_setupContainer(): void;
|
|
9607
|
-
_resizeCanvas(width: number, height: number): void;
|
|
10083
|
+
_resizeCanvas(width: number, height: number, pixelRatio: number): void;
|
|
9608
10084
|
_setupPainter(): void;
|
|
9609
10085
|
_contextLost(event: any): void;
|
|
9610
10086
|
_contextRestored(event: any): void;
|
|
@@ -9650,11 +10126,11 @@ export declare class Map extends Camera {
|
|
|
9650
10126
|
*/
|
|
9651
10127
|
_render(paintStartTimeStamp: number): this;
|
|
9652
10128
|
/**
|
|
9653
|
-
|
|
9654
|
-
|
|
9655
|
-
|
|
9656
|
-
|
|
9657
|
-
|
|
10129
|
+
* Force a synchronous redraw of the map.
|
|
10130
|
+
* @example
|
|
10131
|
+
* map.redraw();
|
|
10132
|
+
* @returns {Map} `this`
|
|
10133
|
+
*/
|
|
9658
10134
|
redraw(): Map;
|
|
9659
10135
|
/**
|
|
9660
10136
|
* Clean up and release all internal resources associated with this map.
|
|
@@ -10046,26 +10522,26 @@ export declare class Marker extends Evented {
|
|
|
10046
10522
|
* the marker on screen.
|
|
10047
10523
|
*
|
|
10048
10524
|
* @returns {LngLat} A {@link LngLat} describing the marker's location.
|
|
10049
|
-
|
|
10050
|
-
|
|
10051
|
-
|
|
10052
|
-
|
|
10053
|
-
|
|
10054
|
-
|
|
10055
|
-
|
|
10525
|
+
* @example
|
|
10526
|
+
* // Store the marker's longitude and latitude coordinates in a variable
|
|
10527
|
+
* var lngLat = marker.getLngLat();
|
|
10528
|
+
* // Print the marker's longitude and latitude values in the console
|
|
10529
|
+
* console.log('Longitude: ' + lngLat.lng + ', Latitude: ' + lngLat.lat )
|
|
10530
|
+
* @see [Create a draggable Marker](https://maplibre.org/maplibre-gl-js-docs/example/drag-a-marker/)
|
|
10531
|
+
*/
|
|
10056
10532
|
getLngLat(): LngLat;
|
|
10057
10533
|
/**
|
|
10058
|
-
|
|
10059
|
-
|
|
10060
|
-
|
|
10061
|
-
|
|
10062
|
-
|
|
10063
|
-
|
|
10064
|
-
|
|
10065
|
-
|
|
10066
|
-
|
|
10067
|
-
|
|
10068
|
-
|
|
10534
|
+
* Set the marker's geographical position and move it.
|
|
10535
|
+
* @param {LngLat} lnglat A {@link LngLat} describing where the marker should be located.
|
|
10536
|
+
* @returns {Marker} `this`
|
|
10537
|
+
* @example
|
|
10538
|
+
* // Create a new marker, set the longitude and latitude, and add it to the map
|
|
10539
|
+
* new maplibregl.Marker()
|
|
10540
|
+
* .setLngLat([-65.017, -16.457])
|
|
10541
|
+
* .addTo(map);
|
|
10542
|
+
* @see [Add custom icons with Markers](https://maplibre.org/maplibre-gl-js-docs/example/custom-marker-icons/)
|
|
10543
|
+
* @see [Create a draggable Marker](https://maplibre.org/maplibre-gl-js-docs/example/drag-a-marker/)
|
|
10544
|
+
*/
|
|
10069
10545
|
setLngLat(lnglat: LngLatLike): this;
|
|
10070
10546
|
/**
|
|
10071
10547
|
* Returns the `Marker`'s HTML element.
|
|
@@ -10234,23 +10710,23 @@ export declare class GeolocateControl extends Evented implements IControl {
|
|
|
10234
10710
|
_finish(): void;
|
|
10235
10711
|
_setupUI(supported: boolean): void;
|
|
10236
10712
|
/**
|
|
10237
|
-
|
|
10238
|
-
|
|
10239
|
-
|
|
10240
|
-
|
|
10241
|
-
|
|
10242
|
-
|
|
10243
|
-
|
|
10244
|
-
|
|
10245
|
-
|
|
10246
|
-
|
|
10247
|
-
|
|
10248
|
-
|
|
10249
|
-
|
|
10250
|
-
|
|
10251
|
-
|
|
10252
|
-
|
|
10253
|
-
|
|
10713
|
+
* Programmatically request and move the map to the user's location.
|
|
10714
|
+
*
|
|
10715
|
+
* @returns {boolean} Returns `false` if called before control was added to a map, otherwise returns `true`.
|
|
10716
|
+
* @example
|
|
10717
|
+
* // Initialize the geolocate control.
|
|
10718
|
+
* var geolocate = new maplibregl.GeolocateControl({
|
|
10719
|
+
* positionOptions: {
|
|
10720
|
+
* enableHighAccuracy: true
|
|
10721
|
+
* },
|
|
10722
|
+
* trackUserLocation: true
|
|
10723
|
+
* });
|
|
10724
|
+
* // Add the control to the map.
|
|
10725
|
+
* map.addControl(geolocate);
|
|
10726
|
+
* map.on('load', function() {
|
|
10727
|
+
* geolocate.trigger();
|
|
10728
|
+
* });
|
|
10729
|
+
*/
|
|
10254
10730
|
trigger(): boolean;
|
|
10255
10731
|
_clearWatch(): void;
|
|
10256
10732
|
}
|
|
@@ -10261,6 +10737,7 @@ export declare type AttributionOptions = {
|
|
|
10261
10737
|
export declare class AttributionControl implements IControl {
|
|
10262
10738
|
options: AttributionOptions;
|
|
10263
10739
|
_map: Map;
|
|
10740
|
+
_compact: boolean;
|
|
10264
10741
|
_container: HTMLElement;
|
|
10265
10742
|
_innerContainer: HTMLElement;
|
|
10266
10743
|
_compactButton: HTMLElement;
|
|
@@ -10277,6 +10754,7 @@ export declare class AttributionControl implements IControl {
|
|
|
10277
10754
|
_updateData(e: any): void;
|
|
10278
10755
|
_updateAttributions(): void;
|
|
10279
10756
|
_updateCompact(): void;
|
|
10757
|
+
_updateCompactMinimize(): void;
|
|
10280
10758
|
}
|
|
10281
10759
|
export declare type Unit = "imperial" | "metric" | "nautical";
|
|
10282
10760
|
export declare type ScaleOptions = {
|
|
@@ -10322,6 +10800,72 @@ export declare class FullscreenControl implements IControl {
|
|
|
10322
10800
|
}
|
|
10323
10801
|
declare function prewarm(): void;
|
|
10324
10802
|
declare function clearPrewarmedResources(): void;
|
|
10803
|
+
export declare class RasterDEMTileSource extends RasterTileSource implements Source {
|
|
10804
|
+
encoding: "mapbox" | "terrarium";
|
|
10805
|
+
constructor(id: string, options: RasterDEMSourceSpecification, dispatcher: Dispatcher, eventedParent: Evented);
|
|
10806
|
+
serialize(): {
|
|
10807
|
+
type: string;
|
|
10808
|
+
url: string;
|
|
10809
|
+
tileSize: number;
|
|
10810
|
+
tiles: string[];
|
|
10811
|
+
bounds: [
|
|
10812
|
+
number,
|
|
10813
|
+
number,
|
|
10814
|
+
number,
|
|
10815
|
+
number
|
|
10816
|
+
];
|
|
10817
|
+
encoding: "mapbox" | "terrarium";
|
|
10818
|
+
};
|
|
10819
|
+
loadTile(tile: Tile, callback: Callback<void>): void;
|
|
10820
|
+
_getNeighboringTiles(tileID: OverscaledTileID): {};
|
|
10821
|
+
unloadTile(tile: Tile): void;
|
|
10822
|
+
}
|
|
10823
|
+
export declare class VideoSource extends ImageSource {
|
|
10824
|
+
options: VideoSourceSpecification;
|
|
10825
|
+
urls: Array<string>;
|
|
10826
|
+
video: HTMLVideoElement;
|
|
10827
|
+
roundZoom: boolean;
|
|
10828
|
+
/**
|
|
10829
|
+
* @private
|
|
10830
|
+
*/
|
|
10831
|
+
constructor(id: string, options: VideoSourceSpecification, dispatcher: Dispatcher, eventedParent: Evented);
|
|
10832
|
+
load(): void;
|
|
10833
|
+
/**
|
|
10834
|
+
* Pauses the video.
|
|
10835
|
+
*/
|
|
10836
|
+
pause(): void;
|
|
10837
|
+
/**
|
|
10838
|
+
* Plays the video.
|
|
10839
|
+
*/
|
|
10840
|
+
play(): void;
|
|
10841
|
+
/**
|
|
10842
|
+
* Sets playback to a timestamp, in seconds.
|
|
10843
|
+
* @private
|
|
10844
|
+
*/
|
|
10845
|
+
seek(seconds: number): void;
|
|
10846
|
+
/**
|
|
10847
|
+
* Returns the HTML `video` element.
|
|
10848
|
+
*
|
|
10849
|
+
* @returns {HTMLVideoElement} The HTML `video` element.
|
|
10850
|
+
*/
|
|
10851
|
+
getVideo(): HTMLVideoElement;
|
|
10852
|
+
onAdd(map: Map): void;
|
|
10853
|
+
/**
|
|
10854
|
+
* Sets the video's coordinates and re-renders the map.
|
|
10855
|
+
*
|
|
10856
|
+
* @method setCoordinates
|
|
10857
|
+
* @instance
|
|
10858
|
+
* @memberof VideoSource
|
|
10859
|
+
* @returns {VideoSource} this
|
|
10860
|
+
*/
|
|
10861
|
+
prepare(): void;
|
|
10862
|
+
serialize(): {
|
|
10863
|
+
type: string;
|
|
10864
|
+
urls: string[];
|
|
10865
|
+
coordinates: Coordinates;
|
|
10866
|
+
};
|
|
10867
|
+
hasTransition(): boolean;
|
|
10868
|
+
}
|
|
10325
10869
|
declare const exported: {
|
|
10326
10870
|
supported: import("@mapbox/mapbox-gl-supported").IsSupported;
|
|
10327
10871
|
setRTLTextPlugin: (url: string, callback: (error?: Error) => void, deferred?: boolean) => void;
|
|
@@ -10340,12 +10884,20 @@ declare const exported: {
|
|
|
10340
10884
|
Point: typeof Point;
|
|
10341
10885
|
MercatorCoordinate: typeof MercatorCoordinate;
|
|
10342
10886
|
Evented: typeof Evented;
|
|
10887
|
+
AJAXError: typeof AJAXError;
|
|
10343
10888
|
config: {
|
|
10344
10889
|
MAX_PARALLEL_IMAGE_REQUESTS: number;
|
|
10345
10890
|
REGISTERED_PROTOCOLS: {
|
|
10346
10891
|
[x: string]: any;
|
|
10347
10892
|
};
|
|
10348
10893
|
};
|
|
10894
|
+
CanvasSource: typeof CanvasSource;
|
|
10895
|
+
GeoJSONSource: typeof GeoJSONSource;
|
|
10896
|
+
ImageSource: typeof ImageSource;
|
|
10897
|
+
RasterDEMTileSource: typeof RasterDEMTileSource;
|
|
10898
|
+
RasterTileSource: typeof RasterTileSource;
|
|
10899
|
+
VectorTileSource: typeof VectorTileSource;
|
|
10900
|
+
VideoSource: typeof VideoSource;
|
|
10349
10901
|
/**
|
|
10350
10902
|
* Initializes resources like WebWorkers that can be shared across maps to lower load
|
|
10351
10903
|
* times in some situations. `maplibregl.workerUrl` and `maplibregl.workerCount`, if being
|
|
@@ -10493,14 +11045,14 @@ declare const exported: {
|
|
|
10493
11045
|
* @see [Add support for right-to-left scripts](https://maplibre.org/maplibre-gl-js-docs/example/mapbox-gl-rtl-text/)
|
|
10494
11046
|
*/
|
|
10495
11047
|
/**
|
|
10496
|
-
|
|
10497
|
-
|
|
10498
|
-
|
|
10499
|
-
|
|
10500
|
-
|
|
10501
|
-
|
|
10502
|
-
|
|
10503
|
-
|
|
11048
|
+
* Gets the map's [RTL text plugin](https://www.mapbox.com/mapbox-gl-js/plugins/#mapbox-gl-rtl-text) status.
|
|
11049
|
+
* The status can be `unavailable` (i.e. not requested or removed), `loading`, `loaded` or `error`.
|
|
11050
|
+
* If the status is `loaded` and the plugin is requested again, an error will be thrown.
|
|
11051
|
+
*
|
|
11052
|
+
* @function getRTLTextPluginStatus
|
|
11053
|
+
* @example
|
|
11054
|
+
* const pluginStatus = maplibregl.getRTLTextPluginStatus();
|
|
11055
|
+
*/
|
|
10504
11056
|
export default exported;
|
|
10505
11057
|
|
|
10506
11058
|
export as namespace maplibregl;
|