import { LayerType, FieldDefinition, RampLayerConfig } from '../../../geo/api'; import { APIScope, InstanceAPI } from '../../../api/internal'; export interface LayerInfo { config: RampLayerConfig; configOptions: Array; fields?: Array; latLonFields?: { lat: Array; lon: Array; }; layers?: Array; layersRaw?: []; } export interface SublayerInfo { id: number | string; label: string; children: Array | undefined; } export declare class LayerSource extends APIScope { layerCount: number; sublayerCount: number; constructor($iApi: InstanceAPI); /** * Get layer info from a file url or data * * @param {string} url a service url to load, name of file if file data is provided * @param {string} fileType format of the file (layer type) * @param {ArrayBuffer} [fileData] raw file data buffer * @returns {Promise} LayerInfo object */ fetchFileInfo(url: string, fileType: LayerType, fileData?: ArrayBuffer): Promise; getGeojsonInfo(url: string, fileData: ArrayBuffer | object): Promise; getCsvInfo(url: string, fileData: ArrayBuffer | string): Promise; getShapfileInfo(url: string, fileData: ArrayBuffer): Promise; /** * Get layer info from a service url * * @param {string} url a service url to load * @param {string} serviceType type of layer * @param {boolean} nested whether sublayers should be organized hierarchically * @param {AbortSignal} [signal] abort signal to cancel the request * @returns {Promise} LayerInfo object */ fetchServiceInfo(url: string, serviceType: string, nested: boolean, signal?: AbortSignal): Promise; getFeatureInfo(url: string): Promise; /** * Gets MIL data from source, formats it as a tree, and returns a promise of the data with configuration * * @param {string} url * @param {boolean} nested * @returns {Promise} data configuration */ getMapImageInfo(url: string, nested: boolean): Promise; createLayerHierarchy(layers: any[], nested: boolean): SublayerInfo[]; getTileInfo(url: string): Promise; getImageryInfo(url: string): Promise; getWfsInfo(url: string, signal?: AbortSignal): Promise; /** * Gets WMS data from source, formats it, and returns a promise of the data with configuration * * @param {string} url * @param {boolean} nested * @returns {Promise} data configuration */ getWmsInfo(url: string, nested: boolean): Promise; mapWmsLayerList(layers: any, nested: boolean): any; /** * Guesses type of file or service given a URL * * @param {string} url * @returns {string} file or layer type */ guessFormatFromURL(url: string): string; }