/// import { EventEmitter } from "../../stencil-public-runtime"; import { MapGeoJSONFeature } from "maplibre-gl"; import MapboxDraw from "@mapbox/mapbox-gl-draw"; export declare class Map { el: HTMLGlMapElement; /** * Emitted when a new feature is created in a drawing session. */ glDrawCreate: EventEmitter; /** * Emitted when a feature is deleted in a drawing session. */ glDrawDelete: EventEmitter; /** * Emitted when a draw session starts. */ glDrawEnter: EventEmitter; /** * Emitted when a draw session ends. */ glDrawExit: EventEmitter; /** * Emitted after the map style has been updated. */ glStyleUpdated: EventEmitter; /** * Emitted after one or more features has been clicked */ glClickedFeaturesGathered: EventEmitter; /** * Webmapgl uses the mapbox-gl-draw plugin for drawing features. * This property is a reference to the `MapboxDraw` instance when a draw session is active. */ draw: MapboxDraw; /** * Options object used to initialize `MapboxDraw`. */ readonly drawOptions?: MapboxDraw.MapboxDrawOptions; /** * There is an active draw session. It is usually set by `gl-draw-controller`. */ readonly drawing: boolean; /** * Default glyphs URL. It can be overridden by child `gl-style` components. */ readonly glyphs: string; /** * Store the map location and zoom level in the URL hash. If the value is * a string, that value will be used as the key in the URL hash. */ readonly hash: string | boolean; /** * Initial center latitude of the map. */ readonly latitude: number; /** * Initial center longitude of the map. */ readonly longitude: number; /** * Initial zoom level of the map. */ readonly zoom: number; /** * Minimum zoom level. */ readonly minzoom: number; /** * Maximum zoom level. */ readonly maxzoom: number; /** * Default sprite URL. It can be overridden by child `gl-style` components. */ readonly sprite: string; /** * Reference to the `maplibregl.Map` object. It can be used to customize * map properties and behaviors beyond those exposed by `gl-map`. */ map: maplibregl.Map; /** * How many, and what, feature to return should the user click on the map */ readonly clickMode: "all" | "top-layer" | "top-feature"; /** * Milliseconds to wait before opening the popup. This delay allows for * handling multiple feature click events in a single popup. Multiple events * can be fired in quick succession when the user clicks on multiple * overlapping features. */ readonly clickEventDelay: number; private _features; private _clickEventTimeout; private _resizeMapTimeout; private _style; private _updateStyleTimeout; componentWillLoad(): void; componentDidUpdate(): void; private updateStyle; handleFeatureClick(e: CustomEvent<{ features: MapGeoJSONFeature[]; }>): void; handleStyleAdded(): Promise; handleStyleModified(): Promise; handleStyleRemoved(): Promise; updateDrawing(): Promise; /** * Informs Mapbox GL that the map canvas has been resized. It uses a * timeout and can be called repeatedly (e.g., in an event handler) without * a performance penalty. For a synchronous resize, use `.map.resize()`. */ resizeMap(): Promise; private getStyleLayers; private getStyleSources; private loadStyle; private prefix; private filterTopLayer; private filterTopFeature; private filterFeatureClicks; }