import { EventEmitter, NgZone } from '@angular/core'; import * as MapLibreGl from 'maplibre-gl'; import { Observable } from 'rxjs'; import { LayerEvents, MapEvent, MapImageData, MapImageOptions } from './map.types'; import * as i0 from "@angular/core"; export interface SetupMap { customMapboxApiUrl?: string; mapOptions: Omit & { bearing?: [number]; pitch?: [number]; zoom?: [number]; }; mapEvents: MapEvent; } export interface SetupLayer { layerOptions: MapLibreGl.Layer; layerEvents: LayerEvents; } export interface SetupPopup { popupOptions: MapLibreGl.PopupOptions; popupEvents: { open: EventEmitter; close: EventEmitter; popupOpen: EventEmitter; popupClose: EventEmitter; }; } export interface SetupMarker { markersOptions: { pitchAlignment?: MapLibreGl.MarkerOptions['pitchAlignment']; rotationAlignment?: MapLibreGl.MarkerOptions['rotationAlignment']; offset?: MapLibreGl.MarkerOptions['offset']; anchor?: MapLibreGl.MarkerOptions['anchor']; draggable?: MapLibreGl.MarkerOptions['draggable']; element: HTMLElement; feature?: GeoJSON.Feature; lngLat?: MapLibreGl.LngLatLike; clickTolerance?: MapLibreGl.MarkerOptions['clickTolerance']; }; markersEvents: { markerDragStart: EventEmitter; markerDrag: EventEmitter; markerDragEnd: EventEmitter; dragStart: EventEmitter; drag: EventEmitter; dragEnd: EventEmitter; }; } export declare type MovingOptions = MapLibreGl.FlyToOptions | (MapLibreGl.AnimationOptions & MapLibreGl.CameraOptions) | MapLibreGl.CameraOptions; export declare class MapService { private zone; mapInstance: MapLibreGl.Map; mapCreated$: Observable; mapLoaded$: Observable; mapEvents: MapEvent; private mapCreated; private mapLoaded; private markersToRemove; private popupsToRemove; private imageIdsToRemove; private subscription; constructor(zone: NgZone); setup(options: SetupMap): void; destroyMap(): void; updateMinZoom(minZoom: number): void; updateMaxZoom(maxZoom: number): void; updateMinPitch(minPitch: number): void; updateMaxPitch(maxPitch: number): void; updateRenderWorldCopies(status: boolean): void; updateScrollZoom(status: boolean): void; updateDragRotate(status: boolean): void; updateTouchPitch(status: boolean): void; updateTouchZoomRotate(status: boolean): void; updateDoubleClickZoom(status: boolean): void; updateKeyboard(status: boolean): void; updateDragPan(status: boolean): void; updateBoxZoom(status: boolean): void; updateStyle(style: MapLibreGl.Style): void; updateMaxBounds(maxBounds: MapLibreGl.LngLatBoundsLike): void; changeCanvasCursor(cursor: string): void; queryRenderedFeatures(pointOrBox?: MapLibreGl.PointLike | [MapLibreGl.PointLike, MapLibreGl.PointLike], parameters?: { layers?: string[]; filter?: any[]; }): GeoJSON.Feature[]; panTo(center: MapLibreGl.LngLatLike, options?: MapLibreGl.AnimationOptions): void; move(movingMethod: 'jumpTo' | 'easeTo' | 'flyTo', movingOptions?: MovingOptions, zoom?: number, center?: MapLibreGl.LngLatLike, bearing?: number, pitch?: number): void; addLayer(layer: SetupLayer, bindEvents: boolean, before?: string): void; removeLayer(layerId: string): void; addMarker(marker: SetupMarker): MapLibreGl.Marker; removeMarker(marker: MapLibreGl.Marker): void; createPopup(popup: SetupPopup, element: Node): MapLibreGl.Popup; addPopupToMap(popup: MapLibreGl.Popup, lngLat: MapLibreGl.LngLatLike, skipOpenEvent?: boolean): void; addPopupToMarker(marker: MapLibreGl.Marker, popup: MapLibreGl.Popup): void; removePopupFromMap(popup: MapLibreGl.Popup, skipCloseEvent?: boolean): void; removePopupFromMarker(marker: MapLibreGl.Marker): void; addControl(control: MapLibreGl.Control | MapLibreGl.IControl, position?: 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'): void; removeControl(control: MapLibreGl.Control | MapLibreGl.IControl): void; loadAndAddImage(imageId: string, url: string, options?: MapImageOptions): Promise; addImage(imageId: string, data: MapImageData, options?: MapImageOptions): void; removeImage(imageId: string): void; addSource(sourceId: string, source: MapLibreGl.AnySourceData): void; getSource(sourceId: string): T; removeSource(sourceId: string): void; setAllLayerPaintProperty(layerId: string, paint: MapLibreGl.BackgroundPaint | MapLibreGl.FillPaint | MapLibreGl.FillExtrusionPaint | MapLibreGl.LinePaint | MapLibreGl.SymbolPaint | MapLibreGl.RasterPaint | MapLibreGl.CirclePaint): void; setAllLayerLayoutProperty(layerId: string, layout: MapLibreGl.BackgroundLayout | MapLibreGl.FillLayout | MapLibreGl.FillExtrusionLayout | MapLibreGl.LineLayout | MapLibreGl.SymbolLayout | MapLibreGl.RasterLayout | MapLibreGl.CircleLayout): void; setLayerFilter(layerId: string, filter: any[]): void; setLayerBefore(layerId: string, beforeId: string): void; setLayerZoomRange(layerId: string, minZoom?: number, maxZoom?: number): void; fitBounds(bounds: MapLibreGl.LngLatBoundsLike, options?: MapLibreGl.FitBoundsOptions): void; fitScreenCoordinates(points: [MapLibreGl.PointLike, MapLibreGl.PointLike], bearing: number, options?: MapLibreGl.AnimationOptions & MapLibreGl.CameraOptions): void; applyChanges(): void; private createMap; private removeMarkers; private removePopups; private removeImages; private findLayersBySourceId; private hookEvents; private assign; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; }