import { Collection, Feature, Map, MapBrowserEvent, MapEvent } from 'ol'; import { ProjectionLike } from 'ol/proj.js'; import VectorSource from 'ol/source/Vector.js'; import VectorLayer from 'ol/layer/Vector.js'; import { DragBox } from 'ol/interaction.js'; import { DragBoxEvent } from 'ol/interaction/DragBox.js'; import { Geometry } from 'ol/geom.js'; import { Extent } from 'ol/extent.js'; import SwipeManager from './tools/swipemanager.js'; import WmsManager3d from './tools/wmsmanager3d.js'; import OsmManager from './tools/osmmanager.js'; import VectorTilesManager from './tools/vectortilesmanager.js'; import WmtsManager from './tools/wmtsmanager.js'; import ViewManager from './tools/viewmanager.js'; import CogManager from './tools/cogmanager.js'; import DrawingManager from './tools/drawingmanager.js'; import GirafeHTMLElement from '../../base/GirafeHTMLElement.js'; import Basemap from '../../models/basemaps/basemap.js'; import Layer from '../../models/layers/layer.js'; import BaseLayer from '../../models/layers/baselayer.js'; import { FocusFeature } from './tools/focusfeature.js'; import XyzManager from './tools/xyzmanager.js'; import SelectionParam from '../../models/selectionparam.js'; import { CameraConfig } from '../../tools/state/globe.js'; import { Callback } from '../../tools/state/statemanager.js'; declare global { interface Window { Cesium: unknown; } } export default class MapComponent extends GirafeHTMLElement { templateUrl: null; styleUrls: null; template: () => import("uhtml").Hole; olMap: Map; mapTarget: HTMLDivElement; map3d: any; map3dTarget: HTMLDivElement; map3dShadowsTimestamp: number; loading: boolean; swiper: HTMLInputElement; closeSwiperButton: HTMLButtonElement; swipeManager: SwipeManager; wmtsManager: WmtsManager; wmsManager3d: WmsManager3d | null; osmManager: OsmManager; cogManager: CogManager; xyzManager: XyzManager; drawingManager: DrawingManager; viewManager: ViewManager; vectorTilesManager: VectorTilesManager; defaultSrid: ProjectionLike; crosshairFeature: Feature; crosshairLayer: VectorLayer; geolocationSource: VectorSource; private readonly markerSource; private readonly markerLayer; get projection(): import("ol/proj.js").Projection; get config(): import("../../tools/main.js").GirafeConfig; /** * * @param path Overridden to make those methods public for this component * @param callback */ subscribe(path: string, callback: Callback): Callback; subscribe(path: RegExp, callback: Callback): Callback; selectedFeaturesCollection: Collection>; highlightedFeaturesCollection: Collection>; selectionLayer: VectorLayer; highlightLayer: VectorLayer; pixelTolerance: number; dragbox: DragBox; focusFeature: FocusFeature; mapTargetResizeObserver: ResizeObserver; constructor(); resetAllSwipedLayers(layers: BaseLayer[]): void; registerEvents(): void; locateUser(): void; getCurrentLocation(): void; disableLocateUser: () => void; readonly updateGeolocation: (position: GeolocationPosition) => void; render(): void; listenOpenLayersEvents(): void; onLoadStart(_e: MapEvent): void; onLoadEnd(_e: MapEvent): void; onPointerMove(e: MapBrowserEvent): void; onMoveEnd(_e: MapEvent): void; onClick(e: MapBrowserEvent): void; onDragSelection(_e: DragBoxEvent): void; select(extent: number[]): void; selectNone(): void; onSelectFeatures(selectionParams: SelectionParam[]): Promise; protected connectedCallback(): void; onCustomGirafeEvent(details: { action: string; layer: Layer; extent: Extent; }): void; onChangeSwiped(layer: Layer): void; /** * updates icon position when swipe is moved */ updateCloseSwiperPosition(): void; private setSelectLayerStyle; private setHighlightLayerStyle; private setCrosshairStyle; create3dMap(): Promise; addAllActiveLayers3dMap(layer: BaseLayer): void; onGlobeToggled(): Promise; onShadowsToggled(shadows: boolean): void; onShadowsTimestampChanged(shadowsTimestamp: number): void; onFeaturesSelected(features: Feature[]): void; onFeatureHighlighted(features: Feature[]): void; onCameraChanged(camera: CameraConfig | null): void; zoomToExtent(extent: Extent): void; onChangeProjection(_oldSrid: string, newSrid: string): void; onChangeDarkMode(): void; private onLayerToggled; private onAddLayers; onRemoveLayers(layerInfos: Layer[]): void; onChangeOrder: () => void; private reorderLayers; private onChangeLayerOpacity; private onChangeBasemapOpacity; /** * Change filter configuration on layer (only LayerWMS are affected) */ private onChangeFilter; /** * Change time configuration on layer (only LayerWMS are affected) */ private onChangeTime; private setTimeRestrictionOnChildren; removeAllBasemapLayers(): void; onChangeBasemaps(basemaps: Basemap[]): void; /** * This method checks for the presence of an initial selection originating from a shared state. * If present, it applies the query-based or bbox-based selection to the map. */ private applyFeatureSelectionFromSharedState; /** * Applies a feature selection based on the query parameters present in the URL starting with `wfs_`. * If the specified layer does not exist in the current tree, it's fetched from the themes and added to the tree. * If the layer is resolution-restricted, the map is zoomed to a resolution where the layer is visible. */ private applyFeatureSelectionFromPermalink; /** * Selects features based on the given list of wfs filters for a specified WMS layer * and optionally moves the map to the selection. The WFS client combines the WFS filters with an AND operator. */ private selectFeaturesByQuery; /** * Centers the map view on the given features. If the features' extent doesn't fit in the current zoom level, * the zoom level is adjusted. */ private centerMapOnFeatures; /** * Moves the map to the position defined in the permalink, making sure the map is initialized and ready to be moved. */ private applyMapPositionFromPermalink; private clearAllMarkers; private addMarker; private showCrosshair; }