import { Layer } from 'ol/layer'; import { Source } from 'ol/source'; import { CapabilitiesResponseWrapper, HsLayerDescriptor, HsWmsLayer, WmsDimension, Metadata } from 'hslayers-ng/types'; import * as i0 from '@angular/core'; import { WritableSignal } from '@angular/core'; import { HsEventBusService } from 'hslayers-ng/services/event-bus'; import { HsLogService } from 'hslayers-ng/services/log'; import { HsMapService } from 'hslayers-ng/services/map'; import { Subject } from 'rxjs'; import { HsDimensionDescriptor } from 'hslayers-ng/common/dimensions'; import { HsCommonLaymanService } from 'hslayers-ng/common/layman'; interface CapabilityCacheList { [key: string]: CapabilitiesResponseWrapper; } declare class HsCapabilityCacheService { cache: CapabilityCacheList; private pendingRequests; constructor(); set(url: string, wrap: CapabilitiesResponseWrapper): void; get(url: string): CapabilitiesResponseWrapper; /** * Get cached response or fetch with deduplication * Prevents duplicate concurrent requests for the same URL * * @param url - URL to fetch * @param fetcher - Function that performs the actual HTTP request * @param owrCache - Overwrites cache for the requested url * @returns Promise with the capabilities response */ getOrFetch(url: string, fetcher: () => Promise, owrCache?: boolean): Promise; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } interface IGetCapabilities { getPathFromUrl(str: string): string; params2String(obj: any): string; request(service_url: string, owrCache?: boolean): Promise; service2layers?(caps: any, path?: string): Layer[]; } declare class HsArcgisGetCapabilitiesService implements IGetCapabilities { private httpClient; hsEventBusService: HsEventBusService; hsMapService: HsMapService; hsLogService: HsLogService; hsCapabilityCacheService: HsCapabilityCacheService; private hsProxyService; /** * Get WMS service location without parameters from url string * * @param str - Url string to parse * @returns WMS service Url */ getPathFromUrl(str: string): string; /** * Create WMS parameter string from parameter object * TODO: Probably the same as utils.paramsToURL * * @param obj - Object with stored WMS service parameters * @returns Parameter string or empty string if no object given */ params2String(obj: any): string; /** * Parse added service url and sends GetCapabilities request to WMS service * * @param service_url - Raw Url localization of service * @param owrCache - Overwrites cache for the requested url * @returns Promise object - Response to GetCapabilities request */ request(service_url: string, owrCache?: boolean): Promise; /** * Load all layers of selected service to the map * * @param caps - XML response of GetCapabilities of selected service * @returns List of layers from service */ service2layers(caps: any): Layer[]; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class HsDimensionTimeService { hsLog: HsLogService; /** * To communicate changes between this service and HsDimensionService */ layerTimeChanges: Subject<{ layer: HsLayerDescriptor; time: string; }>; /** * Parse interval string to get interval as a number * @param interval - Interval time string * @returns - Number of milliseconds representing the interval */ parseInterval(interval: string): number; /** * Test if WMS layer has time support (WMS-T). WMS layer has to have dimension property * @param layer - Container object of layer (layerContainer.layer expected) * @returns True for WMS layer with time support */ layerIsWmsT(layer: HsLayerDescriptor | Layer): boolean; /** * Make initial setup for WM(T)S-t layers * @param currentLayer - Layer for which the time is being set up * @param serviceLayer - Description of that layer's capabilities in a service */ setupTimeLayer(currentLayer: HsLayerDescriptor, serviceLayer?: HsWmsLayer): void; /** * When PARAMS object on layer source is set directly from outside * we want to monitor it and set time dimension separately to * update the time selector. The actual dimension value will be * set in postProcessDimensionValue function of * get-capabilities/dimension class. */ private syncQueryParamToDimension; /** * Update layer TIME parameter * @param currentLayer - Selected layer * @param newTime - ISO8601 string of a date and time to set */ setLayerTime(currentLayer: HsLayerDescriptor, newTime: string): void; /** * Reads a time dimension definition and transforms it into a canonical form of an array of time points * @param values - Stringified time definition. Either defined by a list of values or by an ISO 8601 duration pattern * @returns Array of time points in ISO 8601 format */ parseTimePoints(values: string): Array; /** * Because of the way the HsDimension interface is set up, * we need to fill all parsed and currently undefined values * into the "dimensions" property of OL Layer as well. * Nevertheless we are duplicating some information. */ private polyfillLayerDimensionsValues; private timePointsFromInterval; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class HsDimensionService { $log: HsLogService; hsDimensionTimeService: HsDimensionTimeService; hsEventBusService: HsEventBusService; hsMapService: HsMapService; constructor(); getDimensionValues(dimension: WmsDimension): Array; paramsFromDimensions(layer: any): {}; /** * A recursive function with goes through layers * children and sets the possible dimension values used in dropdown. * * @param layer - Layer to fill the dimension values */ fillDimensionValues(layer: HsWmsLayer): void; dimensionChanged(dimension: HsDimensionDescriptor): void; /** * Test if layer has dimensions * @param layer - OL Layer * @returns true if layer has any dimensions */ isLayerWithDimensions(layer: Layer): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class HsWfsGetCapabilitiesService implements IGetCapabilities { private httpClient; private hsEventBusService; private hsCapabilityCacheService; private hsCommonLaymanService; private hsProxyService; service_url: WritableSignal; /** * Get WFS service location without parameters from url string * * @param str - Url string to parse * @returns WFS service Url without params */ getPathFromUrl(str: string): string; /** * Create WFS parameter string from parameter object * TODO: Probably the same as utils.paramsToURL * * @param obj - Object with stored WFS service parameters * @returns Parameter string or empty string if no object given */ params2String(obj: any): string; /** * Parse added service url and sends request GetCapabilities to WFS service * * @param service_url - Raw Url localization of service * @param owrCache - Overwrites cache for the requested url * @returns Promise object - Response to GetCapabilities request */ request(service_url: string, owrCache?: boolean): Promise; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class HsWmsGetCapabilitiesService implements IGetCapabilities { private httpClient; hsEventBusService: HsEventBusService; hsMapService: HsMapService; hsCommonLaymanService: HsCommonLaymanService; private hsCapabilityCacheService; private hsProxyService; /** * Get WMS service location without parameters from URL string * * @param str - URL string to parse * @returns WMS service URL */ getPathFromUrl(str: string): string; /** * Create WMS parameter string from parameter object * TODO: Probably the same as utils.paramsToURL * * @param obj - Object with stored WMS service parameters * @returns Parameter string or empty string if no object given */ params2String(obj: any): string; /** * Parse added service url and sends GetCapabilities request to WMS service * * @param service_url - Raw Url localization of service * @param owrCache - Overwrites cache for the requested url * @returns Promise object - Response to GetCapabilities request */ request(service_url: string, owrCache?: boolean): Promise; /** * Load all layers of selected service to the map * * @param capabilitiesXml - XML response of GetCapabilities of selected service * @returns List of layers from service */ service2layers(capabilitiesXml: any, path: string): Layer[]; getMetadataObjectWithUrls(layer: any): Metadata; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class HsWmtsGetCapabilitiesService implements IGetCapabilities { private httpClient; hsEventBusService: HsEventBusService; hsMapService: HsMapService; hsWmsGetCapabilitiesService: HsWmsGetCapabilitiesService; hsCapabilityCacheService: HsCapabilityCacheService; private hsProxyService; service_url: any; /** * Get WMTS service location without parameters from URL string * * @param str - URL string to parse * @returns WMTS service URL */ getPathFromUrl(str: string): string; /** * Create WMTS parameter string from parameter object * TODO: Probably the same as utils.paramsToURL * * @param obj - Object with stored WMS service parameters * @returns Parameter string or empty string if no object given */ params2String(obj: any): string; /** * Parse added service url and sends GetCapabilities request to WMTS service * * @param service_url - Raw Url localization of service * @param owrCache - Overwrites cache for the requested url * @returns Promise object - Response to GetCapabilities request */ request(service_url: string, owrCache?: boolean): Promise; /** * Load all layers of selected service to the map * * @param capabilities_xml - XML response of GetCapabilities of selected service * @returns List of layers from service */ service2layers(capabilities_xml: any): Layer[]; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class HsXyzGetCapabilitiesService implements IGetCapabilities { private httpClient; private hsEventBusService; private hsCapabilityCacheService; private hsProxyService; service_url: WritableSignal; /** * Get XYZ service location without parameters from url string */ getPathFromUrl(str: string): string; /** * Create XYZ parameter string from parameter object */ params2String(obj: any): string; /** * Validate XYZ URL template */ private validateXyzUrl; /** * Parse added service url and validate XYZ template */ request(service_url: string, owrCache?: boolean): Promise; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } export { HsArcgisGetCapabilitiesService, HsCapabilityCacheService, HsDimensionService, HsDimensionTimeService, HsWfsGetCapabilitiesService, HsWmsGetCapabilitiesService, HsWmtsGetCapabilitiesService, HsXyzGetCapabilitiesService }; export type { CapabilityCacheList, IGetCapabilities };