import * as rxjs from 'rxjs'; import { Observable, Subscription, Subject } from 'rxjs'; import * as geojson from 'geojson'; import { Feature, Geometry, FeatureCollection, Polygon, Point, LineString, MultiPoint, MultiLineString, MultiPolygon, GeometryCollection } from 'geojson'; import MapboxDraw from '@mapbox/mapbox-gl-draw'; import * as i0 from '@angular/core'; import { OnInit, EventEmitter, ElementRef, SimpleChanges, AfterViewInit, OnChanges, OnDestroy, PipeTransform, ChangeDetectorRef, DestroyRef, WritableSignal } from '@angular/core'; import { CdkDragDrop } from '@angular/cdk/drag-drop'; import { TranslateService } from '@ngx-translate/core'; import { ElementIdentifier, CollectionService, ArlasColorService } from 'arlas-web-components'; import { HttpClient } from '@angular/common/http'; import { MatSnackBar } from '@angular/material/snack-bar'; import { HistogramData } from 'arlas-d3'; import { Subject as Subject$1 } from 'rxjs/internal/Subject'; import { FormControl, FormGroup, UntypedFormControl } from '@angular/forms'; import { MatDialogRef, MatDialog } from '@angular/material/dialog'; /** All the map controls configuration * These interfaces are generic. */ type ControlPosition = 'top-right' | 'top-left' | 'bottom-right' | 'bottom-left'; interface IconConfig { path: string; recolorable?: boolean; } interface ConfigControls { enable: boolean; position?: ControlPosition; config?: any; overrideEvent?: { event: any; fn: (e: Event) => void; }; } interface NavigationConfigControls extends ConfigControls { config: { showCompass: boolean; showZoom: boolean; visualizePitch: boolean; }; } interface ControlsOption { mapAttribution?: ConfigControls; scale?: ConfigControls; navigationControl?: NavigationConfigControls; globe?: ConfigControls; } interface DrawConfigControl extends ConfigControls { name?: string; } interface DrawControlsOption { draw: { control: any; position?: ControlPosition; }; addGeoBox: DrawConfigControl; removeAois: DrawConfigControl; } declare class ControlButton { map: ArlasMap | undefined; btn?: HTMLButtonElement; container?: HTMLDivElement; icon?: string; name: string; private readonly tooltip; btnClasses: string[]; containerClasses: string[]; constructor(name: string, tooltip?: string); protected _buildClasses(): void; onAdd(map: ArlasMap): HTMLDivElement; onRemove(): void; } interface MapExtent { bounds: number[][]; center: number[]; zoom: number; } interface OnMoveResult { zoom: number; zoomStart: number; center: Array; centerWithOffset: Array; extend: Array; extendWithOffset: Array; rawExtendWithOffset: Array; extendForLoad: Array; extendForTest: Array; rawExtendForLoad: Array; rawExtendForTest: Array; xMoveRatio: number; yMoveRatio: number; visibleLayers: Set; } declare class ArlasLngLat { lng: number; lat: number; constructor(lng: number, lat: number); toArray(): number[]; } declare class ArlasLngLatBounds { sw: ArlasLngLat; ne: ArlasLngLat; constructor(sw: ArlasLngLat, ne: ArlasLngLat); getEast(): number; getNorth(): number; getWest(): number; getSouth(): number; } /** Conf */ interface MapConfig { displayCurrentCoordinates: boolean; fitBoundsPadding: number; margePanForLoad: number; margePanForTest: number; wrapLatLng: boolean; offset: ArlasMapOffset; mapProviderOptions: T; maxWidthScale?: number; unitScale?: string; controls?: ControlsOption; } interface ArlasMapOption { container: string; style: any; center: [number, number]; zoom: number; maxZoom: number; minZoom: number; renderWorldCopies: boolean; preserveDrawingBuffer: boolean; locale: { 'NavigationControl.ZoomIn'?: string; 'NavigationControl.ZoomOut'?: string; 'NavigationControl.ResetBearing'?: string; 'GlobeControl.Enable'?: string; 'GlobeControl.Disable'?: string; }; pitchWithRotate: boolean; transformRequest: unknown; attributionControl: boolean; maxPitch: number; } interface ArlasMapOffset { north: number; east: number; south: number; west: number; } declare const GEOJSON_SOURCE_TYPE = "geojson"; declare const CROSS_LAYER_PREFIX = "arlas_cross"; declare const ZOOM_IN: "Zoom in"; declare const ZOOM_OUT: "Zoom out"; declare const RESET_BEARING: "Reset bearing to north"; declare const LAYER_SWITCHER_TOOLTIP: "Manage layers"; declare const OPACITY_SUFFIX = "-opacity"; declare const HILLSHADE_SOURCE = "arlas-hillshade"; declare const TERRAIN_SOURCE = "arlas-terrain"; /** * The aim of this class is to handle all core interaction we have * with a map provider. * The aim is also to separate the Arlas map from the Angular framework. * It will be instantiated in the map.component and will be responsible for initializing the map and all map behavior. */ declare abstract class AbstractArlasMapGL { protected config: MapConfig; /** * props and methods with unknown type will be specific to the map provider * we use. * ex: endLngLat will have a type Maplibre.Pointlike/ Mapbox.Point */ abstract startLngLat?: ArlasLngLat; abstract endLngLat?: ArlasLngLat; abstract moveLngLat?: ArlasLngLat; protected _offset: ArlasMapOffset; protected _margePanForLoad: number; protected _margePanForTest: number; protected _fitBoundsPadding: number; protected _displayCurrentCoordinates: boolean; protected _wrapLatLng: boolean; protected _controls: ControlsOption; protected _maxWidthScale?: number; protected _unitScale?: string; currentLat: i0.WritableSignal; currentLng: i0.WritableSignal; readonly POLYGON_LABEL_SOURCE = "polygon_label"; protected _north: number; protected _east: number; protected _west: number; protected _south: number; zoom: number; protected _zoomStart: number; protected _dragStartX: number; protected _dragStartY: number; protected _dragEndX: number; protected _dragEndY: number; protected _xMoveRatio: number; protected _yMoveRatio: number; protected _moveEnd$: Observable; protected _zoomStart$: Observable; protected _dragStart$: Observable; protected _dragEnd$: Observable; protected _eventSubscription: Subscription[]; protected evented: EventTarget; protected constructor(config: MapConfig); protected init(config: MapConfig): void; protected _initOnLoad(): void; onCustomEvent(event: string, loadFn: () => void): void; protected _initMapMoveEvents(): void; protected _updateBounds(): void; protected _updateZoom(e?: any): void; protected _updateCurrentLngLat(e: any): void; protected _updateDragEnd(e: any): void; protected _updateDragStart(e: any): void; protected _updateEndLngLat(e: any): void; protected _updateMoveRatio(e: any): void; protected _updateStartLngLat(e: any): void; protected _updateZoomStart(): void; protected _updateOnZoomStart(): void; protected _updateOnDragStart(): void; protected _updateOnDragEnd(): void; protected _updateOnMoveEnd(): void; onMoveEnd(visualisationsSets: { visualisations: Map>; status: Map; }, cb?: () => void): Observable; setLayoutProperty(layer: string, name: string, value: any, options?: any): this; unsubscribeEvents(): void; getMaxZoom(): number; getMinZoom(): number; getPitch(): number; protected abstract _initMapProvider(mapGLConfig: MapConfig): void; protected abstract _initControls(): void; protected abstract _getMoveEnd(visualisationsSets: { visualisations: Map>; status: Map; }): OnMoveResult; abstract addControl(control: any, position?: ControlPosition, eventOverride?: { event: string; fn: (e?: Event) => void; }): void; abstract calcOffsetPoint(): any; abstract disableDragPan(): void; abstract enableDragPan(): void; abstract fitBounds(bounds: ArlasLngLatBounds | number[], options?: unknown, unknown?: unknown): this; abstract fitToPaddedBounds(bounds: ArlasLngLatBounds | number[]): void; abstract getBounds(): unknown; abstract getCanvasContainer(): HTMLElement; abstract getEastBounds(): number; abstract getMapExtend(): MapExtent; abstract getMapProvider(): any; abstract getMaxBounds(): unknown; abstract getNorthBounds(): number; abstract getNorthEastBounds(): ArlasLngLat; abstract getSouthBounds(): number; abstract getSouthWestBounds(): ArlasLngLat; abstract getWestBounds(): number; abstract getZoom(): number; abstract initDrawControls(config: DrawControlsOption): void; abstract on(type: string, listener: (ev: any) => void): this; abstract onLoad(fn: () => void): void; abstract onIdle(fn: () => void): void; abstract queryRenderedFeatures(pointOrBox?: unknown, options?: { layers?: string[]; filter?: any[]; }): any[]; abstract resize(eventData?: unknown): this; abstract setCenter(center: unknown, unknown?: unknown): this; abstract setMaxBounds(unknown?: unknown): this; abstract setFilter(layer: string, filter?: boolean | any[], options?: unknown): this; abstract paddedBounds(npad: number, spad: number, epad: number, wpad: number, map: any, SW: ArlasLngLat, NE: ArlasLngLat): ArlasLngLat[]; abstract setLayerOpacity(layerId: string, layerType: string, opacityValue: any): this; /** * Returns the corresponding keyword for paint style based on the layer type * @param layerType Type of the layer */ abstract layerTypeToPaintKeyword(layerType: string): string; /** * Gets all the layers on the map ordered from the one the more in the background to the top-most */ abstract getLayersOrder(): string[]; /** Gets bounds of the given geometry */ geometryToBounds(geometry: any, paddingPercentage?: number): ArlasLngLatBounds; } type DrawEvents = 'draw.create' | 'draw.delete' | 'draw.combine' | 'draw.uncombine' | 'draw.update' | 'draw.selectionchange' | 'draw.modechange' | 'draw.render' | 'draw.actionable' | 'draw.edit.saveInitialFeature' | 'draw.onClick' | 'draw.onStart' | 'draw.onStop' | 'draw.invalidGeometry'; type DrawModes = 'SIMPLE_SELECT' | 'DRAW_CIRCLE' | 'DIRECT_SELECT' | 'DRAW_LINE_STRING' | 'DRAW_POLYGON' | 'DRAW_POINT' | 'DRAW_RADIUS_CIRCLE' | 'DRAW_STRIP' | 'DIRECT_STRIP' | 'DRAW_RECTANGLE' | 'STATIC'; interface DrawEventsInterface { onDrawCreate: (...args: any[]) => void; onDrawUpdate: (...args: any[]) => void; onDrawDelete: (...args: any[]) => void; onDrawOnClick: (...args: any[]) => void; onDrawOnStart: (...args: any[]) => void; onDrawOnStop: (...args: any[]) => void; onDrawInvalidGeometry: (...args: any[]) => void; onDrawEditSaveInitialFeature: (...args: any[]) => void; onDrawSelectionchange: (...args: any[]) => void; onDrawModeChange: (...args: any[]) => void; } declare class AbstractDraw implements DrawEventsInterface { protected config: any; arlasMap: AbstractArlasMapGL; enabled: boolean; drawProvider: MapboxDraw; constructor(config: any, enabled: boolean, map: AbstractArlasMapGL); onAdd(map: AbstractArlasMapGL): any; onRemove(map: AbstractArlasMapGL): any; setMode(drawModes: DrawModes, replaceMode: string): void; getAllFeatures(): Feature[]; onDrawCreate(fn: (e: any) => void): void; onDrawDelete(fn: (e: any) => void): void; onDrawEditSaveInitialFeature(fn: (e: any) => void): void; onDrawInvalidGeometry(fn: (e: any) => void): void; onDrawModeChange(fn: (e: any) => void): void; onDrawOnClick(fn: (e: any) => void): void; onDrawOnStart(fn: (e: any) => void): void; onDrawOnStop(fn: (e: any) => void): void; onDrawSelectionchange(fn: (e: any) => void): void; onDrawUpdate(fn: (e: any) => void): void; getMode(modes: DrawModes): string; on(event: DrawEvents, fn: (e: any) => void): void; add(feature: Feature | FeatureCollection): void; get(featureId: string): Feature | undefined; delete(ids: string | Array): this; deleteAll(): this; set(featureCollection: FeatureCollection): Array; trash(): this; combineFeatures(): this; uncombineFeatures(): this; getCurrentMode(): string; getFeatureIdsAt(point: { x: number; y: number; }): Array; getSelectedIds(): Array; getSelected(): FeatureCollection; getAll(): FeatureCollection; getSelectedFeatures(): Feature[]; setFeatureProperty(featureId: string, property: string, value: any): this; changeMode(mode: string, opt?: any): this; } declare class ArlasPoint { x: number; y: number; constructor(x: number, y: number); } interface ArlasDataLayer { id: string; type: string; minzoom?: number; maxzoom?: number; source: string; metadata?: LayerMetadata; paint: ArlasPaint; layout?: any; filter?: any; } interface MapLayers { layers: Array; externalEventLayers?: Array; events: LayerEvents; } interface LayerEvents { onHover: Set; emitOnClick: Set; zoomOnClick: Set; } interface ExternalEventLayer { id: string; on: ExternalEvent; } declare enum ExternalEvent { select = "select", hover = "hover" } interface FillStroke { width?: PaintValue; opacity?: number; color?: PaintValue; } interface FillExtrusion { height?: ExpressionValue; opacity?: number; color?: PaintValue; } /** Metadata of a layer containing info about * - the collection * - whether it has an interaction with the resultlist (scrollable) * - geomType for circle heatmap. */ interface LayerMetadata { collection?: string; collectionDisplayName?: string; stroke?: FillStroke; extrusion?: FillExtrusion; isScrollableLayer?: boolean; hiddenProps?: MetadataHiddenProps; showLegend?: boolean; cellShape?: CellShape; } type CellShape = 'hexagonal' | 'square'; interface MetadataHiddenProps { geomType?: string; } type PaintValue = ExpressionValue | PaintColor; type ExpressionValue = Array | number> | string | number; interface ArlasPaint { [key: string]: PaintValue; } interface PaintColor { property: string; type: string; stops: Array>; } declare const HOVER_LAYER_PREFIX = "arlas-hover-"; declare const SELECT_LAYER_PREFIX = "arlas-select-"; declare const FILLSTROKE_LAYER_PREFIX = "arlas-fill_stroke-"; declare const SCROLLABLE_ARLAS_ID = "scrollable_arlas_id:"; declare const EXTRUSION_LAYER_PREFIX = "arlas-extrusion-"; declare const ARLAS_ID = "arlas_id:"; declare const ARLAS_VSET = ":arlas_vset:"; /** FROM V15.0.0 layer ids look like 'arlas_id:NAME:timestamp * This pipe extracts the 'NAME' in that id */ declare function getLayerName(id: string): string; interface MapMouseEvent { type: string; point: ArlasPoint; lngLat: ArlasLngLat; } type InteractedFeature = GeoJSON.Feature & { source: string; layer: ArlasDataLayer; }; interface InteractedFeatures { features: InteractedFeature[]; point: [number, number]; } interface MapLayerMouseEvent extends MapMouseEvent { features: InteractedFeature[]; } /** This file describes how to style a vector layer */ declare enum VectorStyleEnum { circle = "circle", fill = "fill", line = "line" } declare class VectorStyle { type: VectorStyleEnum; style: ArlasPaint; constructor(type: VectorStyleEnum, style: ArlasPaint); } /** * This service exposes a list of map interaction methods that are abstract. * Theses methods will be implemented by the chosen cartographical framework to use. * * L: a layer class/interface. * S: a source class/interface. * M: a Map configuration class/interface. */ declare abstract class ArlasMapFrameworkService { /** Bus used to transmit errors */ private readonly _errorBus$; readonly errorBus$: rxjs.Observable; abstract getInitTransformRequest(): Function; abstract setTransformRequest(map: AbstractArlasMapGL, transformRequest: Function): void; abstract buildMapProviderOption(mapOption: ArlasMapOption): M; abstract createMap(config: MapConfig): AbstractArlasMapGL; abstract createDraw(drawOptions: any, enabled: boolean, map: AbstractArlasMapGL): AbstractDraw; /** * @description Gets the bounds from the two given coordinates. * @param c1 Coordinates of the first corner. * @param c2 Coordinates of the second corner. * @returns Bounds formed from the two given coordinates. */ getLngLatBound(c1: ArlasLngLat, c2: ArlasLngLat): ArlasLngLatBounds; /** * Fits the map to its current bounds. To be used when a map container is resized. * @param map Map instance. */ abstract fitMapBounds(map: AbstractArlasMapGL): void; abstract getBoundsAsString(map: AbstractArlasMapGL): string; /** * @description Gets the Point (geometry) from mouse click on the screen. * @param mouseEvent Click mouse event. * @param container Map container. * @returns a Point instance. */ abstract getPointFromScreen(mouseEvent: MouseEvent, container: HTMLElement): ArlasPoint; /** * @description Sets `data` to a Geojson `source` of the map * @param source A Geojson source * @param data A feature collection object. */ abstract setDataToGeojsonSource(source: S, data: FeatureCollection): void; /** * Returns the canvas element of the map * @param map Map instance. */ abstract getCanvas(map: AbstractArlasMapGL): HTMLCanvasElement; abstract addImage(name: string, url: string, map: AbstractArlasMapGL, errorMessage: string, opt?: any): void; /** * @description Adds a layer to the map instance. * @param map Map instance. * @param layer A layer. It could be a layer identifier OR a layer object (it will depend on the framwork implementation). * @param beforeId Identifier of an already added layer. The 'layer' is added under this 'beforeId' layer. */ abstract addLayer(map: AbstractArlasMapGL, layer: L, beforeId?: L | string): void; abstract getLayersFromPattern(map: AbstractArlasMapGL, layersIdPattern: string): L[]; abstract getLayerIdsFromPattern(map: AbstractArlasMapGL, layersIdPattern: string): string[]; abstract getLayersStartingWithSource(map: AbstractArlasMapGL, sourceIdPattern: string): L[]; abstract getAllLayers(map: AbstractArlasMapGL): L[]; abstract hasLayer(map: AbstractArlasMapGL, layer: L | string): boolean; abstract hasLayersFromPattern(map: AbstractArlasMapGL, layersIdPattern: string): boolean; abstract moveLayer(map: AbstractArlasMapGL, layer: L | string, beforeId?: string): void; abstract onLayerEvent(eventName: string, map: AbstractArlasMapGL, layer: L | string, fn: (e: any) => void): void; abstract removeLayer(map: AbstractArlasMapGL, layer: L | string, removeSource?: boolean): void; abstract removeLayers(map: AbstractArlasMapGL, layers: L[] | string[]): void; abstract removeLayersFromPattern(map: AbstractArlasMapGL, layersIdPattern: string): void; abstract setLayerVisibility(layer: L | string, isVisible: boolean, map: AbstractArlasMapGL): void; abstract isLayerVisible(layer: L | string): boolean; abstract getLayer(map: AbstractArlasMapGL, layerId: string): L; abstract setTerrain(source: S, map: AbstractArlasMapGL, exaggeration?: number): string[]; abstract removeTerrain(map: AbstractArlasMapGL): void; abstract queryFeatures(mouseEvent: MapLayerMouseEvent, map: AbstractArlasMapGL, layersIdPattern: string, options?: any): Feature[]; abstract hasSource(map: AbstractArlasMapGL, source: L | AbstractArlasMapGL | string): boolean; abstract getSource(sourceId: string, options: L | AbstractArlasMapGL | string): S; abstract getAllSources(options: L | AbstractArlasMapGL | string): Record; abstract setSource(sourceId: string, source: S, options: L | AbstractArlasMapGL | string): void; abstract removeSource(map: AbstractArlasMapGL, source: S | string): void; abstract addPopup(map: AbstractArlasMapGL, popup: any): void; abstract createPopup(lng: number, lat: number, message: string): void; abstract removePopup(map: AbstractArlasMapGL, popup: any): void; abstract onMapEvent(eventName: any, map: AbstractArlasMapGL, fn: (e: any) => void): void; abstract setMapCursor(map: AbstractArlasMapGL, cursor: string): void; abstract flyTo(lat: number, lng: number, zoom: number, map: AbstractArlasMapGL): void; abstract addIconLayer(map: AbstractArlasMapGL, layerId: string, iconName: string, iconSize: number, data: GeoJSON.Feature | GeoJSON.FeatureCollection, beforeId?: string): void; abstract addRasterLayer(map: AbstractArlasMapGL, layerId: string, url: string, bounds: number[], maxZoom: number, tileSize: number, beforeId?: string): void; abstract addGeojsonLayer(map: AbstractArlasMapGL, layerId: string, style: VectorStyle, data: GeoJSON.Feature | GeoJSON.FeatureCollection, beforeId?: string): void; /** * Adds a layer displaying the given image on the totality of the given bounds */ abstract addImageLayer(map: AbstractArlasMapGL, layerId: string, imageURL: string, bounds: [[number, number], [number, number], [number, number], [number, number]], beforeId?: string): void; abstract filterGeojsonData(map: AbstractArlasMapGL, layer: L | string, filter: any): void; abstract createGeojsonSource(data: GeoJSON.GeoJSON): S; abstract createRasterSource(url: string, bounds: number[], maxZoom: number, tileSize: number): S; emitError(message: string): void; /** * Toggle layer visibility * @param map * @param ids * @param isVisible */ toggleLayersVisibility(map: AbstractArlasMapGL, ids: string[], isVisible: boolean): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵprov: i0.ɵɵInjectableDeclaration>; } /** Data source of a layer */ interface ArlasMapSource { id: string; source: string | SourceType; } interface VisualisationSetConfig { name: string; layers: Array; enabled?: boolean; } declare const QUICKLOOK_ON_MAP_LAYER_PREFIX = "arlas-quicklook-source"; declare const ARLAS_RASTER_SOURCE_PREFIX = "arlas-raster-source-"; /** * This service propose a set of method to execute the ArlasMapComponent logic. * Do not confuse with ArlasMapFrameworkService that is more dedicated to a framework logic. */ declare abstract class AbstractArlasMapService { /** @description List of arlas data sources declared in configuration */ dataSources: S[]; /** @description Map of ARLAS data layers and their ids (the ids being the key of the map). */ layersMap: Map; /** * @description Object to describe visualisation sets * - visulisations: a map of ; * - status: a map of */ visualisationsSets: { visualisations: Map>; status: Map; }; protected readonly mapFrameworkService: ArlasMapFrameworkService; /** * @description Declares the arlas data sources provided in configuration. * @param dataSourcesIds Identifiers of arlas data sources. * @param data A feature collection. * @param map Map instance. */ abstract declareArlasDataSources(dataSourcesIds: Set, data: FeatureCollection, map: AbstractArlasMapGL): void; abstract declareLabelSources(labelSourceId: string, data: FeatureCollection, map: AbstractArlasMapGL): void; abstract declareBasemapSources(basemapSources: Array>, map: AbstractArlasMapGL): void; abstract setLayersMap(mapLayers: MapLayers, layers?: Array): void; updateLabelSources(labelSourceId: string, data: FeatureCollection, map: AbstractArlasMapGL): void; /** * @description Inits a map of visulisation sets from the configuration. * @param visualisationSetsConfig Visualisation set configuration. */ initVisualisationSet(visualisationSetsConfig: VisualisationSetConfig[]): void; initMapLayers(mapLayers: MapLayers, map: AbstractArlasMapGL): void; abstract moveArlasDataLayer(map: AbstractArlasMapGL, layer: any, layersMap: Map, beforeId?: string): void; /** * Add a layer to the map instance. This method handles any specific treatment when adding ARLAS data. * For instance, in mapbox and maplibre implementation, adding a fill layer needs to add systematically the stroke layer. * @param map Map instance. * @param layer A layer. It could be a layer identifier OR a layer object (it will depend on the framwork implementation). * @param layersMap Map of ARLAS data layers and their ids (the ids being the key of the map). * @param beforeId Identifier of an already added layer. The layers of layersMap are added under this 'beforeId' layer. */ abstract addArlasDataLayer(map: AbstractArlasMapGL, layer: ArlasDataLayer | string, layersMap: Map, beforeId?: string): void; addArlasDataLayers(visualisationSetsConfig: VisualisationSetConfig[], mapLayers: MapLayers, map: AbstractArlasMapGL): void; private _addExternalEventLayers; reorderLayers(visualisationSetsConfig: VisualisationSetConfig[], map: AbstractArlasMapGL): void; /** Moves the active draw layers to the top of the map */ protected abstract reorderActiveDrawLayers(map: AbstractArlasMapGL): void; /** Moves the inactive draw layers to the top of the map */ protected abstract reorderInactiveDrawLayers(map: AbstractArlasMapGL): void; /** * Reorders the image layers (COG, quicklook, cross) on the map to respect the following order (top to bottom): * - Cross over COGs to close them * - COGs * - Quicklooks * @param map Map instance */ reorderImageLayers(map: AbstractArlasMapGL): void; abstract filterLayers(mapLayers: MapLayers, map: AbstractArlasMapGL, visibilityCondition: boolean, visibilityFilter: Array, visibilityEvent: ExternalEvent, collection?: string): void; selectFeatures(mapLayers: MapLayers, map: AbstractArlasMapGL, elementToSelect: Array): void; selectFeaturesByCollection(mapLayers: MapLayers, map: AbstractArlasMapGL, features: Array, collection: string): void; updateLayoutVisibility(visualisationName: string, visualisationSetsConfig: VisualisationSetConfig[], map: AbstractArlasMapGL): Set; updateVisibility(visibilityStatus: Map, visualisationSetsConfig: VisualisationSetConfig[], map: AbstractArlasMapGL): void; findVisualisationSetLayer(visuName: string, visualisationSetsConfig: VisualisationSetConfig[]): string[] | undefined; setVisualisationSetLayers(visuName: string, layers: string[], visualisationSetsConfig: VisualisationSetConfig[]): void; abstract updateMapStyle(map: AbstractArlasMapGL, l: any, ids: Array, sourceName: string): void; abstract getVisibleIdsFilter(map: AbstractArlasMapGL, layer: any, ids: Array): any[]; /** * Move an external layer * @param map * @param arlasDataLayers * @param additionalLayer * @param beforeId * @protected */ protected moveExternalLayer(map: AbstractArlasMapGL, arlasDataLayers: Map, additionalLayer: ArlasDataLayer, beforeId?: string): void; /** * Move layer if exist * @param map * @param arlasDataLayers * @param selectId * @param beforeId * @protected */ protected moveLayerIfExist(map: AbstractArlasMapGL, arlasDataLayers: Map, selectId: string, beforeId?: string): void; /** * Applies an opacity style to map layers based on a specified range of field values. * This method iterates over all layers whose source IDs start with the given sourceIdPrefix * and adjusts the opacity of features within those layers. Features with field values * within the specified range (between start and end values) will have the insideOpacity * applied, while features with values outside this range will have the outsideOpacity applied. * * @param {AbstractArlasMapGL} map - The map instance on which the opacity style will be applied. * @param {string} sourceIdPrefix - The prefix used to identify source IDs of the layers to which the opacity style will be applied. * @param {string} field - The name of the field on which the range filter is applied. * @param {number} start - The start value of the range filter. * @param {number} end - The end value of the range filter. * @param {number} insideOpacity - The opacity value to apply to features with field values within the specified range. * @param {number} outsideOpacity - The opacity value to apply to features with field values outside the specified range. */ abstract adjustOpacityByRange(map: AbstractArlasMapGL, sourceIdPrefix: string, field: string, start: number, end: number, insideOpacity: number, outsideOpacity: number): void; /** * Applies an opacity style to map layers based on a list of field values. * This method iterates over all layers whose source IDs start with the given sourceIdPrefix * and adjusts the opacity of features within those layers. Features with field values * within the specified list will have the insideOpacity applied, while features with values * outside this list will have the outsideOpacity applied. * * @param {AbstractArlasMapGL} map - The map instance on which the opacity style will be applied. * @param {string} sourceIdPrefix - The prefix used to identify source IDs of the layers to which the opacity style will be applied. * @param {string[]} values - List of values to match * @param {number} insideOpacity - The opacity value to apply to features with field values within the specified range. * @param {number} outsideOpacity - The opacity value to apply to features with field values outside the specified range. * @param {string[]} ignoreLayer - List of layer IDs to ignore when changing opacity. */ abstract adjustOpacityByValue(map: AbstractArlasMapGL, sourceIdPrefix: string, field: string, values: string[], insideOpacity: number, outsideOpacity: number, ignoreLayer?: string[]): void; /** * Resets the initial configured opacity style of the map layers whose source IDs start with the given sourceIdPrefix. * * @param {AbstractArlasMapGL} map - The map instance on which the opacity style will be applied. * @param {string} sourceIdPrefix - The prefix used to identify source IDs of the layers to which the opacity style will be applied. */ abstract resetOpacity(map: AbstractArlasMapGL, sourceIdPrefix: string): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵprov: i0.ɵɵInjectableDeclaration>; } interface BasemapStyle { name: string; styleFile: any; url?: string; image?: string; type?: 'protomap' | 'mapbox'; errored?: boolean; } declare class ArlasBasemaps { private readonly LOCAL_STORAGE_BASEMAPS; _selectedStyle?: BasemapStyle; _styles: BasemapStyle[]; private readonly defaultBasemapStyle?; private readonly basemapStyles?; constructor(defaultBasemapStyle?: BasemapStyle, basemapStyles?: BasemapStyle[]); styles(): BasemapStyle[]; setSelected(style: BasemapStyle): this; getStyle(b?: BasemapStyle): BasemapStyle | undefined; getSelected(): BasemapStyle; private getAllBasemapStyles; } declare abstract class BasemapService { protected POWERED_BY_ARLAS: string; protected LOCAL_STORAGE_BASEMAPS: string; protected basemapChangedSource: Subject; basemapChanged$: Observable; basemaps?: ArlasBasemaps; protected protomapBasemapAddedSource: Subject; protomapBasemapAdded$: Observable; protected readonly mapFrameworkService: ArlasMapFrameworkService; protected readonly http: HttpClient; setBasemaps(basemaps: ArlasBasemaps): void; abstract addProtomapBasemap(map: AbstractArlasMapGL): void; protected addPMtilesToSource(map: AbstractArlasMapGL, pmtilesSource: any): void; protected addProtomapLayerToMap(map: AbstractArlasMapGL, styleFile: any): void; notifyProtomapAddition(): void; abstract removeProtomapBasemap(map: AbstractArlasMapGL): void; abstract declareProtomapProtocol(map: AbstractArlasMapGL): void; cloneStyleFile(selected: BasemapStyle): T; buildInitStyle(clonedStyleFile: StyleType): StyleType; abstract getInitStyle(selected: BasemapStyle): any; abstract fetchSources$(): Observable; protected abstract getStyleFile(b: BasemapStyle): Observable; abstract setBasemap(s: any, newBasemap: BasemapStyle, map: AbstractArlasMapGL, options?: any): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵprov: i0.ɵɵInjectableDeclaration>; } interface AoiEdition { area: number; areaMessage?: string; show: boolean; envelope: { width: number; height: number; }; } interface Corner { lat: number; lng: number; } interface BboxDrawCommand { east: number; west: number; north: number; south: number; } declare class MapboxAoiDrawService { private mapDraw; private editionId?; private registeringMode; private ids; private readonly editAoiSource; editAoi$: rxjs.Observable; private readonly drawBboxSource; drawBbox$: rxjs.Observable; /** Set to true when the user is drawing a bbox. */ isDrawingBbox: boolean; /** Set to true when the user is drawing a circle. */ isDrawingCircle: boolean; /** Set to true when the user is drawing a strip. */ isDrawingStrip: boolean; /** Set to true when the user is drawing a polygon. */ isDrawingPolygon: boolean; /** Set to true when the user is in simple draw mode. */ isInSimpleDrawMode: boolean; /** Set to true when the drawn geometry is selected. */ isDrawSelected: boolean; isReady: boolean; isDrawing(): boolean; drawBbox(fCorner: Corner, sCorner: Corner): void; setDraw(mapboxDraw: AbstractDraw): void; /** * Add new features to the mapboxdraw object. * @param fc Featurecollection to be added to mapboxdraw object. * @param deleteOld if true, the mapboxdraw object is purged first, before adding the new given feature collection. */ addFeatures(fc: FeatureCollection, deleteOld?: boolean): void; /** Deletes all the features from Mapboxdraw object */ deleteAll(): void; /** Deletes all the features from Mapboxdraw object that have not been saved */ deleteUnregisteredFeatures(): void; /** Returns the area of the given feature */ calculateArea(feature: Feature): number; /** Returns the width x height of the given feature's envelope */ calculateEnvelopeDimension(feature: Feature): [number, number]; /** on selection of a drawn polygon, we get its corresponding id. */ private onSelectionChange; private hasFeatures; /** Triggered on deletion of feature(s). * - Removes the deleted feature(s) from this service's register. * - Stops emitting Aoi dimension info. * */ private onDelete; private onStop; /** * This event is triggered : * - after draw.update * - after draw.delete * - on adding/deleting features from mapboxdraw object. */ private onRender; emitStartBBox(): void; /** Emits dimension info of the given feature.*/ emitDimensions(feature: Feature): void; /** Stops emitting Aoi dimension info */ endDimensionsEmission(): void; /** Mapbox lacks a method to get the identifier of a new feature that is being drawn and not yet created * this method detects this feature on 'draw.render' event. */ private getUnregistredFeatures; /** registers the identifiers of each drawn polygon in this service. */ private registerAll; /** Unregisters the given feature id in this service. */ private unregister; /** Registers the given feature id in this service. */ private register; /** Gets the given feature from MapboxDraw object. */ private getFeature; /** Checks if the given feature has enough coordinates to represent an area (polygon) */ private isArea; /** Checks if the given feature has enough coordinates to represent a line */ private isLine; /** * Chck if its a valid circle * @param feature */ isValidCircle(feature: Feature): boolean; isValidPolygon(feature: Feature): boolean; isPolygon(feature: Feature): feature is Feature; isCircle(feature: Feature): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** Summarized style of a draw component */ interface DrawStyle { color?: string; opacity?: number; dash?: number[]; } interface DrawTheme { /** Style for active drawings */ active?: DrawStyle; /** Style for deactivated drawings */ inactive?: DrawStyle; } /** * Builds the style for the Mapbox/Maplibre draw layers * @param theme Theme summarizing the drawing styles */ declare function buildDrawStyle(theme: DrawTheme): ({ id: string; type: string; filter: (string | string[])[]; paint: { 'fill-color': string; 'fill-outline-color': string; 'fill-opacity': number; 'circle-radius'?: undefined; 'circle-color'?: undefined; 'circle-opacity'?: undefined; 'line-color'?: undefined; 'line-width'?: undefined; 'icon-opacity'?: undefined; 'icon-opacity-transition'?: undefined; }; layout?: undefined; } | { id: string; type: string; filter: (string | string[])[]; paint: { 'circle-radius': number; 'circle-color': string; 'fill-color'?: undefined; 'fill-outline-color'?: undefined; 'fill-opacity'?: undefined; 'circle-opacity'?: undefined; 'line-color'?: undefined; 'line-width'?: undefined; 'icon-opacity'?: undefined; 'icon-opacity-transition'?: undefined; }; layout?: undefined; } | { id: string; type: string; filter: (string | string[])[]; layout: { 'line-cap': string; 'line-join': string; }; paint: { 'line-color': string; 'line-dasharray': number[]; 'line-width': number; }; } | { id: string; type: string; filter: (string | string[])[]; paint: { 'circle-radius': number; 'circle-opacity': number; 'circle-color': string; 'fill-color'?: undefined; 'fill-outline-color'?: undefined; 'fill-opacity'?: undefined; 'line-color'?: undefined; 'line-width'?: undefined; 'icon-opacity'?: undefined; 'icon-opacity-transition'?: undefined; }; layout?: undefined; } | { id: string; type: string; filter: (string | string[])[]; layout: { 'line-cap': string; 'line-join': string; }; paint: { 'line-color': string; 'line-width': number; 'fill-color'?: undefined; 'fill-outline-color'?: undefined; 'fill-opacity'?: undefined; 'circle-radius'?: undefined; 'circle-color'?: undefined; 'circle-opacity'?: undefined; 'icon-opacity'?: undefined; 'icon-opacity-transition'?: undefined; }; } | { id: string; type: string; filter: (string | string[])[]; layout: { 'icon-image': string; 'icon-allow-overlap': boolean; 'icon-ignore-placement': boolean; 'icon-rotation-alignment': string; 'icon-rotate': string[]; }; paint: { 'icon-opacity': number; 'icon-opacity-transition': { delay: number; duration: number; }; 'fill-color'?: undefined; 'fill-outline-color'?: undefined; 'fill-opacity'?: undefined; 'circle-radius'?: undefined; 'circle-color'?: undefined; 'circle-opacity'?: undefined; 'line-color'?: undefined; 'line-width'?: undefined; }; })[]; declare class ArlasDrawComponent implements OnInit { private readonly drawService; private readonly _snackBar; private readonly translate; protected mapService: AbstractArlasMapService; map: i0.InputSignal; emptyData: FeatureCollection; /** @description Options object for draw tools : https://github.com/mapbox/mapbox-gl-draw/blob/master/docs/API.md#options */ drawOption: any; /** Draw instance. */ draw: AbstractDraw; /** @description Features drawn at component start */ drawData: FeatureCollection; /** @description Whether the draw tools are activated. */ drawButtonEnabled: boolean; /** @description Maximum number of vertices allowed for a polygon. */ drawPolygonVerticesLimit?: number; /** @description Whether the drawing buffer is activated */ /** If true, the map's canvas can be exported to a PNG using map.getCanvas().toDataURL(). Default: false */ preserveDrawingBuffer: boolean; /** @description Theme for the drawn polygons */ drawTheme: i0.InputSignal; /** @description Emits the geojson of an aoi added to the map. */ onAoiChanged: EventEmitter>; /** @description Emits the the dimensions of the polygon/bbox that is being drawn. */ onAoiEdit: EventEmitter; /** Number of drawn vertices (incremented in draw mode). Reset to 0 when the drawing is finished. */ nbPolygonVertices: number; /** Number of clicks while drawing a geometry. */ drawClickCounter: number; /** List of drawn polygons centroid */ polygonlabeldata: FeatureCollection; /** Drawn geometry's state when editing/updating. */ protected savedEditFeature?: any; /** Html element that holds the drawing message. */ protected drawTooltipElement: i0.Signal | undefined>; /** Message shown to explain how to draw. */ drawTooltipMessage: i0.WritableSignal; private readonly mapFrameworkService; constructor(drawService: MapboxAoiDrawService, _snackBar: MatSnackBar, translate: TranslateService, mapService: AbstractArlasMapService); /** * @description Stops the drawing mode by changing to static mode. */ private stopDrawingAtVerticeLimit; private listenToDrawOnCreate; private listenToDrawUpdate; private listenToDrawDelete; private listenToDrawInvalidGeometry; private listenToDrawSelectionChange; private listenToDrawModeChange; ngOnInit(): void; ngOnChanges(changes: SimpleChanges): void; /** * Update the tooltip message when drawing to reflect drawing mode and state */ updateTooltipMessage(): void; private readonly mouseMoveForDraw; /** * @description Emits the bbox drawn by the BboxGenerator component * @param east * @param south * @param west * @param north */ protected drawBbox(east: number, south: number, west: number, north: number): void; /** @description Enables bbox drawing mode.*/ addGeoBox(): void; /** * @description Removes all the aois if none of them is selected. Otherwise it removes the selected one only */ removeAois(): void; /** @description Deletes the selected drawn geometry. If no drawn geometry is selected, all geometries are deteleted */ deleteSelectedItem(): void; /** * @description Shows an invalid-geometry error on a snack bar. */ openInvalidGeometrySnackBar(): void; /** * @description Switches to a drawing mode of a polygon, circle, radius circle or strip. * @param mode Draw mode (DRAW_POLYGON, DRAW_CIRCLE, DRAW_RADIUS_CIRCLE or DRAW_STRIP). Default to DRAW_POLYGON * @param option Mapboxdraw option. */ switchToDrawMode(mode?: string, option?: any): void; /** * @description Switches to direct_select mode. * @param option Mapboxdraw option. */ switchToDirectSelectMode(option?: { featureIds: Array; allowCircleResize: boolean; } | { featureId: string; allowCircleResize: boolean; }): void; /** * @description Switches to simple_select mode. */ switchToEditMode(): void; /** * @description Switches to static mode. */ switchToStaticMode(): void; /** * @description Returns all the drawn polygons as wkt or geojson. * @param mode 'wkt' | 'geojson' * @returns */ getAllPolygon(mode: 'wkt' | 'geojson'): string | Object; /** * @returns the selected polygon geometry in WKT or GeoJson given the mode * @param mode : 'wkt' | 'geojson' * @returns Wkt string or Geojson object. */ getSelectedPolygon(mode: 'wkt' | 'geojson'): string | Object; handleKeyboardEvent(event: KeyboardEvent): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "arlas-draw", never, { "map": { "alias": "map"; "required": true; "isSignal": true; }; "emptyData": { "alias": "emptyData"; "required": false; }; "drawOption": { "alias": "drawOption"; "required": false; }; "drawData": { "alias": "drawData"; "required": false; }; "drawButtonEnabled": { "alias": "drawButtonEnabled"; "required": false; }; "drawPolygonVerticesLimit": { "alias": "drawPolygonVerticesLimit"; "required": false; }; "preserveDrawingBuffer": { "alias": "preserveDrawingBuffer"; "required": false; }; "drawTheme": { "alias": "drawTheme"; "required": false; "isSignal": true; }; }, { "onAoiChanged": "onAoiChanged"; "onAoiEdit": "onAoiEdit"; }, never, never, true, never>; } interface LegendData { minValue: number | string; maxValue: number | string; keysColorsMap?: Map; } interface Legend { type?: PROPERTY_SELECTOR_SOURCE; title?: string; minValue?: string | number; maxValue?: string | number; fixValue?: string | number; interpolatedValues?: Array; /** Map (field, (color & highlight)) */ manualValues?: Map; visible?: boolean; /** data to be plotted as histogram in the legend */ histogram?: Array; } interface CircleLegend extends FillLegend { radius: Legend; } interface FillLegend { color: Legend; colorPalette: string; strokeColor: Legend; strokeColorPalette: string; } interface HeatmapLegend { color: Legend; colorPalette: string; radius: Legend; } interface LabelLegend { color: Legend; colorPalette: string; size: Legend; } interface LineLegend { color: Legend; colorPalette: string; dashes: Array; width: Legend; } declare enum PROPERTY_SELECTOR_SOURCE { fix = "Fix", provided = "Provided", generated = "Generated", manual = "Manual", interpolated = "Interpolated", metric_on_field = "Metric on field", heatmap_density = "Density" } declare abstract class LegendService { /** Emits for each layerId that was hovered the properties associated to the features in order to highlight the right ones in the legend */ protected highlightSource: Subject<{ layerId: string; properties: Array<{ [name: string]: any; }>; }>; highlight$: rxjs.Observable<{ layerId: string; properties: Array<{ [name: string]: any; }>; }>; abstract getCircleLegend(paint: any, visibileMode: boolean, legendData: Map, layer: ArlasDataLayer): CircleLegend; abstract getLineLegend(paint: any, visibileMode: boolean, legendData: Map, layer: ArlasDataLayer): LineLegend; abstract getFillLegend(paint: any, visibileMode: boolean, legendData: Map, layer: ArlasDataLayer): FillLegend; abstract getHeatmapLegend(paint: any, visibileMode: boolean, legendData: Map, layer: ArlasDataLayer): HeatmapLegend; abstract getLabelLegend(paint: any, layout: any, visibileMode: boolean, legendData: Map, layer: ArlasDataLayer): LabelLegend; /** Based on the paint of a layer and its type, returns the field used for the color matching */ abstract getColorField(paint: any, layerType: string): string; highlightFeatures(layerId: string, features: Array>): void; static setProvidedColorLegend(colorLegend: Legend, field: string, legendData: Map, filter: any[], translate: TranslateService): void; static setMatchColorLegend(colorLegend: Legend, colorExpression: any[], legendData: Map, filter: any[], translate: TranslateService): void; static setInterpolatedColorLegend(colorLegend: Legend, colorExpression: any[], legendData: Map, visibleMode: boolean): string; static filterLegend(colorLegendValues: Map, filter: any[], field: string): void; static buildColorLegend(colorExpression: string | any, visibleMode: boolean, legendData: Map, filter: any[], translate: TranslateService): [Legend, string]; static buildRadiusLegend(radiusExpression: string | any, legendData: Map): Legend; protected static buildWidthLegend(lineWidth: number | any, legendData: Map): Legend; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } /** * Arlas Map terrain configuration */ interface TerrainConfiguration { /** Whether to display terrain */ enable: boolean; /** The source specification */ source?: S; /** Exaggeration factor for the elevation */ exaggeration?: number; } interface LayerDownloadEvent { layerId: string; layerName: string; collection: string; sourceName: string; downloadType: string; } declare class ArlasMapComponent implements AfterViewInit, OnChanges, OnDestroy { private readonly drawService; private readonly basemapService; private readonly translate; protected readonly mapService: AbstractArlasMapService; private readonly legendService; /** Map instance. */ map: i0.WritableSignal; /** Whether the legend is visible (open) */ legendOpen: boolean; /** Used to clear geojson sources. */ emptyData: FeatureCollection; /** Whether the list of basemaps is shown. */ showBasemapList: boolean; /** Visibility status of each visualisation set*. */ visibilityStatus: Map; /** Stores the currently hovered features indexed by layer ID. */ hoveredFeaturesByLayer: Map; drawComponent?: ArlasDrawComponent; /** ANGULAR INPUTS */ /** @description Html identifier given to the map container (it's a div ;))*/ id: string; /** @description An object with north,east,south,west properies which represent an offset in pixels */ /** Origin is top-left and x-axis is west to east and y-axis north to south.*/ offset: ArlasMapOffset; /** --- LAYERS */ /** @description List of configured (by the builder) layers. */ mapLayers: i0.InputSignal>; /** --- SCALE & COORDINATES */ /** @description Whether the map scale is displayed. */ displayScale: boolean; /** @description Maximim width in pixels that the map scale could take. */ maxWidthScale: number; /** @description Unit display for the map scale. */ unitScale: string; /** @description Whether to display the coordinates of the mouse while moving. */ displayCurrentCoordinates: i0.InputSignal; /** @description If true, the coordinates values are wrapped between -180 and 180. */ wrapLatLng: boolean; /** --- BASEMAPS */ /** @description Default basemap to display. */ defaultBasemapStyle?: BasemapStyle; /** @description List of available basemaps. */ basemapStyles: BasemapStyle[]; /** --- INITIAL MAP VIEW : ZOOMs, CENTER, BOUNDS */ /** @description Zoom of the map when it's initialized. */ initZoom: number; /** @description Max zoom of the map. */ maxZoom: number; /** @description Min zoom of the map. */ minZoom: number; /** @description Coordinates of the map's center when it's first loaded. */ initCenter: [number, number]; /** @description Maximum pitch of the map */ maxPitch: number; /** --- BOUNDS TO FIT STRATEGY */ /** @description Bounds that the view map fits. It's an array of two corners. */ /** Each corner is an lat-long position. For example: boundsToFit = [[30.51, -54.3],[30.57, -54.2]] */ boundsToFit: Array>; /** @description The padding added in the top-left and bottom-right corners of a map container that shouldn't be accounted */ /** for when setting the view to fit bounds.*/ fitBoundsOffSet: [number, number]; /** @description Padding value applied around a fitBounds to fully show the area targeted. */ fitBoundsPadding: number; /** @description The maximum zoom level so that the bounds fit the map view. */ fitBoundsMaxZoom: number; /** --- DATA LOADING STRATEGIES */ /** @description Margin applied to the map extent. Data will be fetched in all this extent. */ margePanForLoad: number; /** * @description Margin applied to the map extent. Before loading data, * the components checks first if there are features already loaded in this extent. */ margePanForTest: number; /** @description A callback run before the Map makes a request for an external URL/ */ transformRequest: unknown /** TransformRequestFunction or RequestTransformRequest */; /** --- MAP INTERACTION */ /** @description List of features to select. */ featuresToSelect: Array; /** --- SOURCES */ /** @description List of sources to add to the map. */ mapSources: Array>; /** @description Subject to which the component subscribes to redraw on the map the `data` of the given `source`. */ redrawSource: Observable<{ source: string; data: Feature[]; }>; /** @description List of data sources names that should be added to the map. Sources should be of type `geojson`. */ dataSources: Set; /** --- DRAW */ /** @description Options object for draw tools : https://github.com/mapbox/mapbox-gl-draw/blob/master/docs/API.md#options */ drawOption: any; /** @description Features drawn at component start */ drawData: FeatureCollection; /** @description Whether the draw tools are activated. */ drawButtonEnabled: boolean; /** @description Maximum number of vertices allowed for a polygon. */ drawPolygonVerticesLimit?: number; /** @description Whether the drawing buffer is activated */ /** If true, the map's canvas can be exported to a PNG using map.getCanvas().toDataURL(). Default: false */ preserveDrawingBuffer: boolean; /** @description Theme for the drawn polygons */ drawTheme: i0.InputSignal; /** --- ATTRIBUTION */ /** @description Position of the map attribution. */ mapAttributionPosition: ControlPosition; /** --- MAP ICONS */ /** @description List of icons to add to the map and that can be used in layers. */ icons: IconConfig[]; /** --- LEGEND AND VISUALISATIONS */ /** @description Subject of [collection, [field, legendData]] map. The map subscribes to it to keep */ /** the legend updated with the data displayed on the map. */ legendUpdater: Subject>>; /** @description Subject of [layerId, boolean] map. The map subscribes to it to keep */ /** the legend updated with the visibility of the layer.*/ visibilityUpdater: Observable>; /** @description List of visualisation sets. A Visualisation set is an entity where layers are grouped together. */ /** If a visualisation set is enabled, all the layers in it can be displayed on the map, otherwise the layers are removed from the map. */ visualisationSetsConfig: VisualisationSetConfig[]; /** --- GLOBE */ /** @description Whether to allow to switch to globe mode */ enableGlobe: boolean; /** --- LEGEND HIGHLIGHTS */ /** @description Whether to highlight the keywords or color of hovered features */ highlightLegend: boolean; /** --- Terrain */ /** @description Configuration for the display of the terrain */ terrain: i0.InputSignal>; /** @description Whether the map currently has a terrain */ readonly hasTerrain: i0.WritableSignal; /** @description Sources added to the map for the terrain */ private terrainSources; /** ANGULAR OUTPUTS */ /** @description Emits true after the map is loaded and all sources & layers are added. */ onMapLoaded: Subject; /** @description Emits the map extent when the browser tab is closed/refreshed. */ onMapClosed: EventEmitter; /** * @deprecated * @description Emits the event of moving the map. */ onMove: EventEmitter; /** @description Emits the visible visualisation sets' names */ visualisations: EventEmitter>; /** @description Emits the features that were clicked on. */ onFeatureClick: EventEmitter; /** @description Emits the features that were hovered. */ onFeatureHover: EventEmitter; /** @description Emits the geojson of all aois added to the map. */ onAoiChanged: EventEmitter>; /** @description Emits the the dimensions of the polygon/bbox that is being drawn. */ onAoiEdit: EventEmitter; /** @description Emits an event when the basemap has been changed by the user. */ onBasemapChanged: Subject; /** @description Emits which layers are displayed on the map. */ legendVisibiltyStatus: Subject>; /** @description Notifies that the user wants to download the selected layer */ downloadSourceEmitter: Subject; protected ICONS_BASE_PATH: string; private readonly mapFrameworkService; private readonly destroyRef; constructor(drawService: MapboxAoiDrawService, basemapService: BasemapService, translate: TranslateService, mapService: AbstractArlasMapService, legendService: LegendService); ngAfterViewInit(): void; ngOnChanges(changes: SimpleChanges): void; /** * Tries to get the initialised map. If not ready yet, throws an error */ private getMap; /** If transformRequest' @Input was not set, set a default value : a function that maintains the same url */ initTransformRequest(): void; /** Zooms on clicked feature from map mouse event e. * @param mouseEvent Map mouse event provided by the map instance. */ zoomOnClick(mouseEvent: MapMouseEvent): void; /** * Queries all rendered features on the position that was clicked on, on a layer; and emits those features. * @param mapLayerMouseEvent Map mouse event provided by a layer instance. */ protected queryRender(mapLayerMouseEvent: MapLayerMouseEvent): void; /** @description Adds the custom icons given in the component's input */ addIcons(): void; /** * @description Creates the map instance and adds the basemap, arlas data * and starts listening to arlas data changes and layers visibility updates. * It also starts emiting map moveend event. */ declareMap(): void; /** * @description Listens to events on mapLayers input (configured layers). */ listenToLayersEvents(): void; /** * Aggregates hovered features from all layers and emits a single event. * Emits an empty object if no features are currently hovered. * * @param lngLat - The current cursor position. Optional since mouseleave does not always provide it. */ private emitAggregatedHover; /** Sets the layers order according to the current order of `visualisationSetsConfig` list*/ reorderLayers(): void; /** @description Display the basemapswitcher */ showBasemapSwitcher(): void; /** @description Emits event notifiying that the basemap has been changed */ onChangeBasemapStyle(): void; /** * Updates the visibility status of the layer and emits that update. * @param visualisation visualisation set name * @param l layer id * @param visible whether the layer is enabled and visible in the visualisation set */ emitLegendVisibility(visualisation: string, l: string, visible: boolean): void; /** * @description Emits the visible visualisation set * @param visualisationName Name of the visualisation. */ emitVisualisations(visualisationName: string): void; downloadLayerSource(downaload: { layer: ArlasDataLayer; downloadType: string; }): void; /** puts the visualisation set list in the new order after dropping */ drop(event: CdkDragDrop): void; /** puts the layers list in the new order after dropping */ dropLayer(event: CdkDragDrop, visuName: string): void; hideBasemapSwitcher(): void; /** * Fit to given bounds. Options are for padding. * @param bounds Bounds of the map to fit to. */ fitToPaddedBounds(bounds: ArlasLngLatBounds): void; /** * Centers the map to the given latitude/longitude coordinates. * @param lngLat Latitude/longitude coordinates. */ moveToCoordinates(lngLat: [number, number]): void; /** Selects, in all data sources,the feature(s) having the given elementIdentifier */ private selectFeatures; /** Selects, in all data sources, all the features having the given elementIdentifiers and under the given collection. * @param features list of features identifiers. * @param collection data collection (metadata of the data source). */ selectFeaturesByCollection(features: Array, collection: string): void; static getMapJsonSchema(): Object; /** Destroys all the components subscriptions. */ ngOnDestroy(): void; /** @description Enables bbox drawing mode.*/ addGeoBox(): void; /** * @description Removes all the aois if none of them is selected. Otherwise it removes the selected one only */ removeAois(): void; /** @description Deletes the selected drawn geometry. If no drawn geometry is selected, all geometries are deteleted */ deleteSelectedItem(): void; /** * @description Switches to a drawing mode of a DRAW_POLYGON, DRAW_CIRCLE or DRAW_RADIUS_CIRCLE. * @param mode Draw mode (DRAW_POLYGON, DRAW_CIRCLE or DRAW_RADIUS_CIRCLE). Default to DRAW_POLYGON * @param option Mapboxdraw option. */ switchToDrawMode(mode?: string, option?: any): void; /** * @description Switches to direct_select mode. * @param option Mapboxdraw option. */ switchToDirectSelectMode(option?: { featureIds: Array; allowCircleResize: boolean; } | { featureId: string; allowCircleResize: boolean; }): void; /** * @description Switches to simple_select mode. * @param option Mapboxdraw option. */ switchToEditMode(): void; /** * @description Returns all the drawn polygons as wkt or geojson. * @param mode 'wkt' | 'geojson' * @returns Wkt string or Geojson object. */ getAllPolygon(mode: 'wkt' | 'geojson'): string | Object | undefined; /** * @description returns the selected polygon geometry in WKT or GeoJson given the mode * @param mode : 'wkt' | 'geojson' * @returns Wkt string or Geojson object. */ getSelectedPolygon(mode: 'wkt' | 'geojson'): string | Object | undefined; /** * @description Displays/Removes the terrain from the map */ toggleTerrain(): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "arlas-map", never, { "id": { "alias": "id"; "required": false; }; "offset": { "alias": "offset"; "required": false; }; "mapLayers": { "alias": "mapLayers"; "required": true; "isSignal": true; }; "displayScale": { "alias": "displayScale"; "required": false; }; "maxWidthScale": { "alias": "maxWidthScale"; "required": false; }; "unitScale": { "alias": "unitScale"; "required": false; }; "displayCurrentCoordinates": { "alias": "displayCurrentCoordinates"; "required": false; "isSignal": true; }; "wrapLatLng": { "alias": "wrapLatLng"; "required": false; }; "defaultBasemapStyle": { "alias": "defaultBasemapStyle"; "required": false; }; "basemapStyles": { "alias": "basemapStyles"; "required": false; }; "initZoom": { "alias": "initZoom"; "required": false; }; "maxZoom": { "alias": "maxZoom"; "required": false; }; "minZoom": { "alias": "minZoom"; "required": false; }; "initCenter": { "alias": "initCenter"; "required": false; }; "maxPitch": { "alias": "maxPitch"; "required": false; }; "boundsToFit": { "alias": "boundsToFit"; "required": false; }; "fitBoundsOffSet": { "alias": "fitBoundsOffSet"; "required": false; }; "fitBoundsPadding": { "alias": "fitBoundsPadding"; "required": false; }; "fitBoundsMaxZoom": { "alias": "fitBoundsMaxZoom"; "required": false; }; "margePanForLoad": { "alias": "margePanForLoad"; "required": false; }; "margePanForTest": { "alias": "margePanForTest"; "required": false; }; "transformRequest": { "alias": "transformRequest"; "required": false; }; "featuresToSelect": { "alias": "featuresToSelect"; "required": false; }; "mapSources": { "alias": "mapSources"; "required": false; }; "redrawSource": { "alias": "redrawSource"; "required": false; }; "dataSources": { "alias": "dataSources"; "required": false; }; "drawOption": { "alias": "drawOption"; "required": false; }; "drawData": { "alias": "drawData"; "required": false; }; "drawButtonEnabled": { "alias": "drawButtonEnabled"; "required": false; }; "drawPolygonVerticesLimit": { "alias": "drawPolygonVerticesLimit"; "required": false; }; "preserveDrawingBuffer": { "alias": "preserveDrawingBuffer"; "required": false; }; "drawTheme": { "alias": "drawTheme"; "required": false; "isSignal": true; }; "mapAttributionPosition": { "alias": "mapAttributionPosition"; "required": false; }; "icons": { "alias": "icons"; "required": false; }; "legendUpdater": { "alias": "legendUpdater"; "required": false; }; "visibilityUpdater": { "alias": "visibilityUpdater"; "required": false; }; "visualisationSetsConfig": { "alias": "visualisationSetsConfig"; "required": false; }; "enableGlobe": { "alias": "enableGlobe"; "required": false; }; "highlightLegend": { "alias": "highlightLegend"; "required": false; }; "terrain": { "alias": "terrain"; "required": false; "isSignal": true; }; }, { "onMapLoaded": "onMapLoaded"; "onMapClosed": "onMapClosed"; "onMove": "onMove"; "visualisations": "visualisations"; "onFeatureClick": "onFeatureClick"; "onFeatureHover": "onFeatureHover"; "onAoiChanged": "onAoiChanged"; "onAoiEdit": "onAoiEdit"; "onBasemapChanged": "onBasemapChanged"; "legendVisibiltyStatus": "legendVisibiltyStatus"; "downloadSourceEmitter": "downloadSourceEmitter"; }, never, never, true, never>; } declare class BasemapComponent implements OnInit, OnDestroy { private readonly _onDestroy$; map?: AbstractArlasMapGL; mapSources: ArlasMapSource[]; basemapChanged: EventEmitter; blur: Subject$1; showList: boolean; basemaps?: ArlasBasemaps; private readonly basemapService; constructor(); ngOnInit(): void; protected initBasemaps(): void; /** Removes the old basemap and set the new one that is given as a parameter * @param newBasemap: Basemap selected by the user */ onChangeBasemap(newBasemap: BasemapStyle): void; setBaseMapStyle(newBasemap: BasemapStyle): void; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "arlas-basemap", never, { "map": { "alias": "map"; "required": false; }; "mapSources": { "alias": "mapSources"; "required": false; }; }, { "basemapChanged": "basemapChanged"; "blur": "blur"; }, never, never, true, never>; } declare class BboxFormErrorPipe implements PipeTransform { transform(formControl: FormControl | FormGroup): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵpipe: i0.ɵɵPipeDeclaration; } declare class PointFormGroup extends FormGroup { latitude: FormControl; longitude: FormControl; constructor(initLat: number | string, initLng: number | string); } declare class Coordinate { /** Parses a coordinate in decimal or sexagesimal degrees and returns the decimal degrees */ static parse(value: string): number; /** DegreeMinutesSeconds to Decimal degree */ static dmsToDd(degrees: number, minutes: number, seconds: number): number; } declare class BboxFormGroup extends FormGroup { private firstCornerLatitude?; private secondCornerLatitude?; firstCorner: PointFormGroup; secondCorner: PointFormGroup; latitudeErrors: boolean; subscriptions: Subscription[]; constructor(corner: Corner); getFirstCorner(): Corner; getSecondCorner(): Corner; } declare class BboxGeneratorComponent implements AfterViewInit, OnDestroy { private readonly drawService; private readonly cdr; private readonly dialogRef; /** * @constant */ DESCRIPTION: "Enter coordinates in decimal or sexagesimal degrees"; bboxForm: BboxFormGroup; /** * @constant */ placeHolder: "Decimal: 1.1 or Sexagesimal 1°6'3\" coordinate"; private readonly data; constructor(drawService: MapboxAoiDrawService, cdr: ChangeDetectorRef, dialogRef: MatDialogRef); ngAfterViewInit(): void; ngOnDestroy(): void; close(): void; generateBbox(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class CoordinatesComponent { currentLat: string; currentLng: string; /** * @constant */ placeHolder: "1.1 or 1°6'3\""; moveToCoordinates$: EventEmitter<[number, number]>; coordinatesForm: PointFormGroup; editionMode: boolean; constructor(); switchToEditionMode(): void; moveToCoordinates(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class CoordinatesErrorPipe implements PipeTransform { transform(formControl: FormControl | FormGroup): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵpipe: i0.ɵɵPipeDeclaration; } declare const circleMode: { map: unknown; onClick?(this: DrawCustomModeThis, state: any, e: MapboxDraw.MapMouseEvent): void; clickAnywhere?(this: DrawCustomModeThis, state: any, e: MapboxDraw.MapMouseEvent): void; onTap?(this: DrawCustomModeThis, state: any, e: MapboxDraw.MapMouseEvent): void; onTouchStart?(this: DrawCustomModeThis, state: any, e: MapboxDraw.MapMouseEvent): any; onTouchEnd?(this: DrawCustomModeThis, state: any): any; clickOnVertex?(this: DrawCustomModeThis, state: any): any; onMouseMove(this: DrawCustomModeThis, state: any, e: MapboxDraw.MapMouseEvent): void; onMouseDown?(this: DrawCustomModeThis, state: any, e: MapboxDraw.MapMouseEvent): any; onMouseUp?(this: DrawCustomModeThis, state: any): any; onMouseOut?(this: DrawCustomModeThis, state: any): any; startDragging?(this: DrawCustomModeThis, state: any, e: MapboxDraw.MapMouseEvent): any; stopDragging?(this: DrawCustomModeThis, state: any): any; onDrag?(this: DrawCustomModeThis, state: any, e: MapboxDraw.MapMouseEvent): any; dragMove?(this: DrawCustomModeThis, state: any, e: MapboxDraw.MapMouseEvent): any; dragRotatePoint?(this: DrawCustomModeThis, state: any, e: MapboxDraw.MapMouseEvent, delta: MapboxDraw.LngLat): any; dragResizePoint?(this: DrawCustomModeThis, state: any, e: MapboxDraw.MapMouseEvent, delta: number): any; dragFeature?(this: DrawCustomModeThis, state: any, e: MapboxDraw.MapMouseEvent, delta: MapboxDraw.LngLat): any; dragVertex?(this: DrawCustomModeThis, state: any, e: MapboxDraw.MapMouseEvent, delta: MapboxDraw.LngLat): any; toDisplayFeatures?(this: DrawCustomModeThis, state: any, geojson: MapboxDraw.DisplayedFeature, display: (geojson: MapboxDraw.DisplayedFeature) => void): void; fireMessage?(this: DrawCustomModeThis, message: sring): void; fireOnStop?(this: DrawCustomModeThis): void; fireOnClick?(this: DrawCustomModeThis): void; fireUpdate(this: DrawCustomModeThis): void; fireInvalidGeom?(this: DrawCustomModeThis, feature: GeoJSON.Feature): any; fireInitialFeature?(this: DrawCustomModeThis, feature: GeoJSON.Feature): any; onSetup(this: DrawCustomModeThis, opts: any): any; onTrash?(this: DrawCustomModeThis, state: any): void; onStop?(this: DrawCustomModeThis, state: any): void; onActivatePoint?(this: DrawCustomModeThis, state: any, e: MapboxDraw.MapMouseEvent): any; onFeature?(this: DrawCustomModeThis, state: any, e: MapboxDraw.MapMouseEvent): any; newFeature?(this: DrawCustomModeThis, feature: { type: string; properties: Record; geometry: GeoJSON.Geometry; }): any; pathsToCoordinates?(this: DrawCustomModeThis, featureId: string, paths: string[]): any; createActionPointHelper?(this: DrawCustomModeThis, actionWidgets: GeoJSON.Feature[], featureId: string, v1: GeoJSON.Feature, v2: GeoJSON.Feature, rotCenter: MapboxDraw.Coord, radiusScale: number, type: string): void; createActionPoints?(this: DrawCustomModeThis, state: any, geojson: GeoJSON.Feature, suppPoints: GeoJSON.Feature[]): any; computeAxes?(this: DrawCustomModeThis, state: any, polygon: GeoJSON.Feature): any; coordinateIndex?(this: DrawCustomModeThis, coordPaths: string[]): any; }; declare const radiusCircleMode: { map: unknown; onClick?(this: DrawCustomModeThis, state: any, e: MapboxDraw.MapMouseEvent): void; clickAnywhere?(this: DrawCustomModeThis, state: any, e: MapboxDraw.MapMouseEvent): void; onTap?(this: DrawCustomModeThis, state: any, e: MapboxDraw.MapMouseEvent): void; onTouchStart?(this: DrawCustomModeThis, state: any, e: MapboxDraw.MapMouseEvent): any; onTouchEnd?(this: DrawCustomModeThis, state: any): any; clickOnVertex?(this: DrawCustomModeThis, state: any): any; onMouseMove(this: DrawCustomModeThis, state: any, e: MapboxDraw.MapMouseEvent): void; onMouseDown?(this: DrawCustomModeThis, state: any, e: MapboxDraw.MapMouseEvent): any; onMouseUp?(this: DrawCustomModeThis, state: any): any; onMouseOut?(this: DrawCustomModeThis, state: any): any; startDragging?(this: DrawCustomModeThis, state: any, e: MapboxDraw.MapMouseEvent): any; stopDragging?(this: DrawCustomModeThis, state: any): any; onDrag?(this: DrawCustomModeThis, state: any, e: MapboxDraw.MapMouseEvent): any; dragMove?(this: DrawCustomModeThis, state: any, e: MapboxDraw.MapMouseEvent): any; dragRotatePoint?(this: DrawCustomModeThis, state: any, e: MapboxDraw.MapMouseEvent, delta: MapboxDraw.LngLat): any; dragResizePoint?(this: DrawCustomModeThis, state: any, e: MapboxDraw.MapMouseEvent, delta: number): any; dragFeature?(this: DrawCustomModeThis, state: any, e: MapboxDraw.MapMouseEvent, delta: MapboxDraw.LngLat): any; dragVertex?(this: DrawCustomModeThis, state: any, e: MapboxDraw.MapMouseEvent, delta: MapboxDraw.LngLat): any; toDisplayFeatures?(this: DrawCustomModeThis, state: any, geojson: MapboxDraw.DisplayedFeature, display: (geojson: MapboxDraw.DisplayedFeature) => void): void; fireMessage?(this: DrawCustomModeThis, message: sring): void; fireOnStop?(this: DrawCustomModeThis): void; fireOnClick?(this: DrawCustomModeThis): void; fireUpdate(this: DrawCustomModeThis): void; fireInvalidGeom?(this: DrawCustomModeThis, feature: GeoJSON.Feature): any; fireInitialFeature?(this: DrawCustomModeThis, feature: GeoJSON.Feature): any; onSetup(this: DrawCustomModeThis, opts: any): any; onTrash?(this: DrawCustomModeThis, state: any): void; onStop?(this: DrawCustomModeThis, state: any): void; onActivatePoint?(this: DrawCustomModeThis, state: any, e: MapboxDraw.MapMouseEvent): any; onFeature?(this: DrawCustomModeThis, state: any, e: MapboxDraw.MapMouseEvent): any; newFeature?(this: DrawCustomModeThis, feature: { type: string; properties: Record; geometry: GeoJSON.Geometry; }): any; pathsToCoordinates?(this: DrawCustomModeThis, featureId: string, paths: string[]): any; createActionPointHelper?(this: DrawCustomModeThis, actionWidgets: GeoJSON.Feature[], featureId: string, v1: GeoJSON.Feature, v2: GeoJSON.Feature, rotCenter: MapboxDraw.Coord, radiusScale: number, type: string): void; createActionPoints?(this: DrawCustomModeThis, state: any, geojson: GeoJSON.Feature, suppPoints: GeoJSON.Feature[]): any; computeAxes?(this: DrawCustomModeThis, state: any, polygon: GeoJSON.Feature): any; coordinateIndex?(this: DrawCustomModeThis, coordPaths: string[]): any; }; declare function createSupplementaryPointsForCircle(geojson: GeoJSON.Feature): any[]; declare const dragPan: { enable(ctx: any): void; disable(ctx: any): void; }; declare const directModeOverride: MapboxDraw.DrawCustomMode; declare const limitVertexDirectSelectMode: MapboxDraw.DrawCustomMode; declare const rectangleMode: MapboxDraw.DrawCustomMode; declare const simpleSelectModeOverride: MapboxDraw.DrawCustomMode; declare const stripDirectSelectMode: MapboxDraw.DrawCustomMode; declare const stripMode: { map: unknown; onClick?(this: DrawCustomModeThis, state: any, e: MapboxDraw.MapMouseEvent): void; clickAnywhere?(this: DrawCustomModeThis, state: any, e: MapboxDraw.MapMouseEvent): void; onTap?(this: DrawCustomModeThis, state: any, e: MapboxDraw.MapMouseEvent): void; onTouchStart?(this: DrawCustomModeThis, state: any, e: MapboxDraw.MapMouseEvent): any; onTouchEnd?(this: DrawCustomModeThis, state: any): any; clickOnVertex?(this: DrawCustomModeThis, state: any): any; onMouseMove(this: DrawCustomModeThis, state: any, e: MapboxDraw.MapMouseEvent): void; onMouseDown?(this: DrawCustomModeThis, state: any, e: MapboxDraw.MapMouseEvent): any; onMouseUp?(this: DrawCustomModeThis, state: any): any; onMouseOut?(this: DrawCustomModeThis, state: any): any; startDragging?(this: DrawCustomModeThis, state: any, e: MapboxDraw.MapMouseEvent): any; stopDragging?(this: DrawCustomModeThis, state: any): any; onDrag?(this: DrawCustomModeThis, state: any, e: MapboxDraw.MapMouseEvent): any; dragMove?(this: DrawCustomModeThis, state: any, e: MapboxDraw.MapMouseEvent): any; dragRotatePoint?(this: DrawCustomModeThis, state: any, e: MapboxDraw.MapMouseEvent, delta: MapboxDraw.LngLat): any; dragResizePoint?(this: DrawCustomModeThis, state: any, e: MapboxDraw.MapMouseEvent, delta: number): any; dragFeature?(this: DrawCustomModeThis, state: any, e: MapboxDraw.MapMouseEvent, delta: MapboxDraw.LngLat): any; dragVertex?(this: DrawCustomModeThis, state: any, e: MapboxDraw.MapMouseEvent, delta: MapboxDraw.LngLat): any; toDisplayFeatures?(this: DrawCustomModeThis, state: any, geojson: MapboxDraw.DisplayedFeature, display: (geojson: MapboxDraw.DisplayedFeature) => void): void; fireMessage?(this: DrawCustomModeThis, message: sring): void; fireOnStop?(this: DrawCustomModeThis): void; fireOnClick?(this: DrawCustomModeThis): void; fireUpdate(this: DrawCustomModeThis): void; fireInvalidGeom?(this: DrawCustomModeThis, feature: GeoJSON.Feature): any; fireInitialFeature?(this: DrawCustomModeThis, feature: GeoJSON.Feature): any; onSetup(this: DrawCustomModeThis, opts: any): any; onTrash?(this: DrawCustomModeThis, state: any): void; onStop?(this: DrawCustomModeThis, state: any): void; onActivatePoint?(this: DrawCustomModeThis, state: any, e: MapboxDraw.MapMouseEvent): any; onFeature?(this: DrawCustomModeThis, state: any, e: MapboxDraw.MapMouseEvent): any; newFeature?(this: DrawCustomModeThis, feature: { type: string; properties: Record; geometry: GeoJSON.Geometry; }): any; pathsToCoordinates?(this: DrawCustomModeThis, featureId: string, paths: string[]): any; createActionPointHelper?(this: DrawCustomModeThis, actionWidgets: GeoJSON.Feature[], featureId: string, v1: GeoJSON.Feature, v2: GeoJSON.Feature, rotCenter: MapboxDraw.Coord, radiusScale: number, type: string): void; createActionPoints?(this: DrawCustomModeThis, state: any, geojson: GeoJSON.Feature, suppPoints: GeoJSON.Feature[]): any; computeAxes?(this: DrawCustomModeThis, state: any, polygon: GeoJSON.Feature): any; coordinateIndex?(this: DrawCustomModeThis, coordPaths: string[]): any; }; declare const validGeomDrawPolygonMode: MapboxDraw.DrawCustomMode; interface LegendParamsResult { translateKey: string; field?: string; normalized?: string; normalizedKey?: string; metric?: string; format: ParamsResultType; } /** * full : * return all interpolated values to construct a title legend * ex: Average of boats (normalized) * metricField : * return metric and field interpolated values. * ex: Average of boats * metricNormalised : * return metric and normalized interpolated values. * ex: count (normalized) * noMetric : * return field and normalized interpolated values. * ex: Boat visibility (normalized) * original * return the original key to be translated. This case appear only if we fail * to parse of if we have an error. */ type ParamsResultType = 'full' | 'metricField' | 'metricNormalised' | 'noMetric' | 'original'; declare class FormatLegendPipe implements PipeTransform { private readonly collectionService; constructor(collectionService: CollectionService); private readonly metrics; transform(field: string | undefined): LegendParamsResult | null; buildInterpolatedParams(params: LegendParamsResult, metric: string | undefined, field: string, normalized: string, normalizedKey: string): LegendParamsResult; getMetric(valueSplit: string[]): string | undefined; getField(valueSplit: string[]): string; isMetrics(metrics: string): boolean; containsMetrics(value: string): true | undefined; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵpipe: i0.ɵɵPipeDeclaration; } declare class LayerIdToName implements PipeTransform { /** FROM V15.0.0 layer ids look like 'arlas_id:NAME:timestamp * This pipe extracts the 'NAME' in that id */ transform(id: string): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵpipe: i0.ɵɵPipeDeclaration; } declare class LayerIconComponent implements OnChanges, AfterViewInit { layer: i0.InputSignal; colorLegend: Legend; strokeColorLegend: Legend; widthLegend: Legend; radiusLegend: Legend; lineDasharray: Array; layerIconElement?: ElementRef; ngOnChanges(changes: SimpleChanges): void; ngAfterViewInit(): void; private drawIcons; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class LegendItemComponent implements OnInit { private readonly legendService; private readonly destroyRef; private readonly translate; legend: i0.InputSignal; title: i0.InputSignal; layer: i0.InputSignal; colorPalette?: string; /** Whether to display highlights of the legend on hover of the map features */ highlightLegend: boolean; interpolatedElement?: ElementRef; protected PROPERTY_SELECTOR_SOURCE: typeof PROPERTY_SELECTOR_SOURCE; protected readonly NUMBER_FORMAT_CHAR = "NUMBER_FORMAT_CHAR"; /** List of cursors to display around the interpolated legend */ cursors: { position: number; value: string | undefined; }[]; hasHighlightedKeywords: i0.WritableSignal; constructor(legendService: LegendService, destroyRef: DestroyRef, translate: TranslateService); ngOnInit(): void; /** * Change the 'highlight' state of the keywords in the legend to make them pop more * @param highlight The features'values to highlight */ private highlightKeywords; /** * For every different value to highlight, add a cursor on the legend. * Only the topmost feature's value will be displayed. * @param highlight The features'values to highlight */ private displayCursors; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class LegendComponent implements OnInit, AfterViewInit, OnChanges, OnDestroy { private readonly legendService; /** * @Input : Angular * @description Layer object */ layer: i0.InputSignal; /** * @Input : Angular * @description Collection of the layer */ collection: i0.InputSignal; /** * @Input : Angular * @description Current zoom level of the map */ zoom: i0.InputSignal; /** * @Input : Angular * @description Whether the layer is enabled. */ enabled: i0.InputSignal; /** * @Input : Angular * @description Subject of [collection, [field, legendData]] map. The map subscribes to it to keep * the legend updated with the data displayed on the map. */ legendUpdater: Subject>>; /** * @Input : Angular * @description Subject of [field, boolean] map. The map subscribes to it to keep * the legend updated with the visibility of the layer. */ visibilityUpdater: Observable>; /** * @Input : Angular * @description Whether to highlight the keywords or color of hovered features */ highlightLegend: boolean; /** * @Output : Angular * @description Notifies the parent component that this layer is visible or not */ visibilityStatus: Subject; /** * @Output : Angular * @description Notifies the parent component that the user wants to download the layer */ downloadSourceEmitter: Subject<{ layer: ArlasDataLayer; downloadType: string; }>; lineWidthLegend?: LegendItemComponent; circleRadiusLegend?: LegendItemComponent; lineDasharray: number[]; colorLegend: WritableSignal; hasColorLegend: i0.Signal; strokeColorLegend: WritableSignal; hasStrokeLegend: i0.Signal; widthLegend: WritableSignal; hasWidthLegend: i0.Signal; radiusLegend: WritableSignal; hasRadiusLegend: i0.Signal; displayLegendDetailToggle: i0.Signal; detail: boolean; visibleMode: boolean; private legendData; colorPalette: string; strokeColorPalette: string; private readonly MAX_CIRLE_RADIUS; private readonly LEGEND_WIDTH; private readonly _onDestroy$; constructor(legendService: LegendService); ngOnInit(): void; ngAfterViewInit(): void; ngOnChanges(changes: SimpleChanges): void; ngOnDestroy(): void; downloadLayerSource(layer: ArlasDataLayer, downloadType: string): void; showDetail(event: Event): void; /** Parses the `paint` attribute of a layer and draws the legend elements such as * - color palette * - line width evolution * - circle radius evolution */ private drawLegends; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare function getMax(data: Array): number; declare const MAX_CIRLE_RADIUS = 7; declare const MAX_LINE_WIDTH = 10; type SimpleGeometry = Point | LineString | Polygon; type ComplexGeometry = MultiPoint | MultiLineString | MultiPolygon; declare class MapImportDialogComponent { private dialogRef; private data; displayError: boolean; isRunning: boolean; fitResult: boolean; errorMessage?: string; errorThreshold?: string; currentFile: File | null; importType: string; allowedFileExtension?: string; allowedImportType: string[]; wktContent: string; SHP: string; KML: string; WKT: string; GEOJSON: string; file: Subject; importRun: Subject<{ type: string; fitResult: boolean; wktContent: string; }>; fileInput?: ElementRef; constructor(dialogRef: MatDialogRef, data: { allowedImportType: Array; defaultFitResult?: boolean; }); onFileChange(files: FileList | null): void; import(): void; onTextChange(): void; changeType(): void; onCancel(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } type AllowedImportGeometry = 'Polygon' | 'Point'; declare class MapImportComponent { private readonly dialog; SHP: string; KML: string; WKT: string; GEOJSON: string; SELF_INTERSECT: "Geometry is not valid due to self-intersection"; PARSING_ISSUE: "Problem parsing input file"; FILE_TOO_LARGE: "File is too large"; GEOMETRY_INVALID: "Geometry is not valid"; TOO_MANY_VERTICES: "Too many vertices in a polygon"; TOO_MANY_FEATURES: "Too many features"; TIMEOUT: "Timeout"; currentFile: File | null; dialogRef?: MatDialogRef; reader?: FileReader; private tooManyVertex; private fitResult; private jszip; private readonly SOURCE_NAME_POLYGON_LABEL; private emptyData; private featureIndex; mapComponent: i0.InputSignal>; maxVertexByPolygon: number; maxFeatures?: number; maxFileSize?: number; maxLoadingTime: number; allowedImportType: string[]; allowedGeometryObjectType: Array; imported: Subject[]>; error: Subject; private _currentAllowedGeom; private readonly mapService; constructor(dialog: MatDialog); promiseTimeout(ms: number, promise: Promise): Promise; private buildAllowedGeometryForImportType; private getAllowedGeom; openDialog(defaultFitResult?: boolean): void; import(importType: string, content?: string): void; buildFeature(geom: any, feature: Feature | any, geometryType?: string, bbox?: boolean): Feature; handleSimpleGeometry(feature: Feature, centroids: Feature[], importedGeojson: FeatureCollection): void; handleMultiGeometry(feature: Feature, centroids: Feature[], importedGeojson: FeatureCollection): void; handleGeometryCollection(feature: Feature, centroids: Feature[], importedGeojson: FeatureCollection): void; handleFeatureCollection(feature: FeatureCollection, centroids: Feature[], importedGeojson: FeatureCollection): void; /** *************/ /** *** KML *****/ /** *************/ readKmlFile(): Promise; private resolveFileFromGzip; processAllKml(): Promise; /** *************/ /** * GEOJSON ***/ /** *************/ readJsonFile(): Promise; processJson(): Promise; /** *************/ /** ** SHAPE ****/ /** *************/ readZipFile(): Promise; private areFilesInvalid; processAllShape(): Promise; /** *************/ /** ** WKT ****/ /** *************/ processWKT(wkt: string): Promise; /** *************/ /** ** TOOLS ****/ /** *************/ clearPolygons(): void; addFeature(feature: any, centroides: Feature[], importedGeojson: FeatureCollection, index: number): void; setImportedData(importedResult: { geojson: FeatureCollection; centroides: any; }): void; calcCentroid(feature: any): Feature; private throwError; private formatBytes; private computeGeojson; private handleGeom; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "arlas-map-import", never, { "mapComponent": { "alias": "mapComponent"; "required": true; "isSignal": true; }; "maxVertexByPolygon": { "alias": "maxVertexByPolygon"; "required": false; }; "maxFeatures": { "alias": "maxFeatures"; "required": false; }; "maxFileSize": { "alias": "maxFileSize"; "required": false; }; "maxLoadingTime": { "alias": "maxLoadingTime"; "required": false; }; "allowedImportType": { "alias": "allowedImportType"; "required": false; }; "allowedGeometryObjectType": { "alias": "allowedGeometryObjectType"; "required": false; }; }, { "imported": "imported"; "error": "error"; }, never, never, true, never>; } interface GeometrySelectModel { path: string; selected?: boolean; } interface OperationSelectModel { operation: GeoQueryOperator; selected?: boolean; } interface GeoQuery { operation: string; geometry_path: string; } declare enum GeoQueryOperator { WITHIN = "within", NOT_WITHIN = "notwithin", INTERSECTS = "intersects", NOT_INTERSECTS = "notintersects" } declare class SelectFormControl extends UntypedFormControl { filteredOptions: Array; syncOptions: Array; constructor(formState: any, label: string, options: Array); setSyncOptions(newOptions: Array): void; } interface MapSettingsService { getGeoQueries(): Map, Array, string]>; } declare class MapSettingsDialogComponent { private readonly dialogRef; private readonly colorGeneratorLoader; /** * @Output : Angular * Emits the geo-query to apply. A geo-query is defined by * - the operation ("within", "intersects", "notwithin", "notintersects") * - the geometry field to query */ geoQueryEmitter: Subject>; emittedGeoQueries: Map; /** Constants */ GEO_QUERIES_DESCRIPTION: "Draw a bbox or a polygon that"; geoQueriesFormGroups: FormGroup<{ a_operation: SelectFormControl; b_geometryPath: SelectFormControl; c_collection: UntypedFormControl; d_displayCollectionName: UntypedFormControl; }>[]; collectionsColors: string[]; selectionsSnapshot: Map; private readonly _onDestroy$; constructor(dialogRef: MatDialogRef, colorGeneratorLoader: ArlasColorService); ngOnDestroy(): void; /** Emits the geo-query to apply */ emitGeoFilter(): void; /** Closes the dialog */ onClose(): void; createGeoQueryForm(collectionName: string, displayCollectionName: string, filterGeometries: Array, operationsSelectModel: Array): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class MapSettingsComponent { private readonly dialog; /** * @Output : Angular * Emits the geo-query to apply. A geo-query is defined by * - the operation ("within", "intersects", "notwithin", "notintersects") * - the geometry field to query */ geoQueryEmitter: Subject>; dialogRef?: MatDialogRef; constructor(dialog: MatDialog); openDialog(mapSettingsService: MapSettingsService): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare const GET = "get"; declare const MATCH = "match"; declare const INTERPOLATE = "interpolate"; declare const OTHER: "other_color"; declare const IN = "in"; declare const NOT_IN = "!"; declare const HEATMAP_DENSITY = "Heatmap-density"; declare function latLngToWKT(features: GeoJSON.Feature[]): string; declare function getAdditionalFillLayers(id: string): string[]; export { ARLAS_ID, ARLAS_RASTER_SOURCE_PREFIX, ARLAS_VSET, AbstractArlasMapGL, AbstractArlasMapService, AbstractDraw, ArlasBasemaps, ArlasLngLat, ArlasLngLatBounds, ArlasMapComponent, ArlasMapFrameworkService, BasemapComponent, BasemapService, BboxFormErrorPipe, BboxFormGroup, BboxGeneratorComponent, CROSS_LAYER_PREFIX, ControlButton, Coordinate, CoordinatesComponent, CoordinatesErrorPipe, EXTRUSION_LAYER_PREFIX, ExternalEvent, FILLSTROKE_LAYER_PREFIX, FormatLegendPipe, GEOJSON_SOURCE_TYPE, GET, GeoQueryOperator, HEATMAP_DENSITY, HILLSHADE_SOURCE, HOVER_LAYER_PREFIX, IN, INTERPOLATE, LAYER_SWITCHER_TOOLTIP, LayerIconComponent, LayerIdToName, LegendComponent, LegendItemComponent, LegendService, MATCH, MAX_CIRLE_RADIUS, MAX_LINE_WIDTH, MapImportComponent, MapImportDialogComponent, MapSettingsComponent, MapSettingsDialogComponent, MapboxAoiDrawService, NOT_IN, OPACITY_SUFFIX, OTHER, PROPERTY_SELECTOR_SOURCE, QUICKLOOK_ON_MAP_LAYER_PREFIX, RESET_BEARING, SCROLLABLE_ARLAS_ID, SELECT_LAYER_PREFIX, TERRAIN_SOURCE, VectorStyle, VectorStyleEnum, ZOOM_IN, ZOOM_OUT, buildDrawStyle, circleMode, createSupplementaryPointsForCircle, directModeOverride, dragPan, getAdditionalFillLayers, getLayerName, getMax, latLngToWKT, limitVertexDirectSelectMode, radiusCircleMode, rectangleMode, simpleSelectModeOverride, stripDirectSelectMode, stripMode, validGeomDrawPolygonMode }; export type { AllowedImportGeometry, AoiEdition, ArlasDataLayer, ArlasMapOffset, ArlasMapOption, ArlasMapSource, ArlasPaint, BasemapStyle, CellShape, CircleLegend, ConfigControls, ControlPosition, ControlsOption, Corner, DrawConfigControl, DrawControlsOption, DrawTheme, ExpressionValue, ExternalEventLayer, FillExtrusion, FillLegend, FillStroke, GeoQuery, GeometrySelectModel, HeatmapLegend, IconConfig, InteractedFeature, InteractedFeatures, LabelLegend, LayerDownloadEvent, LayerEvents, LayerMetadata, Legend, LegendData, LineLegend, MapConfig, MapExtent, MapLayerMouseEvent, MapLayers, MapMouseEvent, MapSettingsService, MetadataHiddenProps, OnMoveResult, OperationSelectModel, PaintColor, PaintValue, TerrainConfiguration, VisualisationSetConfig };