import { IDatasource, MessageBusService } from '@csnext/cs-core'; import { CsMap, IMapLayer, GeojsonLayer, PropertyDetails, IStartStopService, LayerSource, LayerStyle, FeatureEventDetails, LayerSources } from '../.'; import { FeatureCollection, Feature } from 'geojson'; import { LngLat } from 'mapbox-gl'; import { GeojsonPlusLayer } from '../layers/geojson-plus-layer'; import { FeatureTypes, DataSources, DataCollection, DataSource, DataSet } from '@csnext/cs-data'; import { ILayerExtensionType } from '../classes/ilayer-extension'; export declare const SidebarKeys: { FEATURE_DETAILS: string; SOURCE_DETAILS: string; FEATURE_LIST: string; LAYERS_SELECTION: string; }; export declare class MapDatasource extends DataSources { layers?: IMapLayer[] | undefined; services?: IStartStopService[] | undefined; _sources?: LayerSources; id: string; private pointPickerHandler?; private featurePickerHandler?; events: MessageBusService; activeDrawLayer?: IMapLayer; private map?; private readonly FEATURE_SIDEBAR_ID; private readonly LAYER_DETAILS_SIDEBAR_ID; get MapControl(): mapboxgl.Map | undefined; get MapWidget(): CsMap | undefined; set MapWidget(map: CsMap | undefined); constructor(layers?: IMapLayer[] | undefined, sources?: { [name: string]: DataSource; }, services?: IStartStopService[] | undefined); getLayer(id: string): IMapLayer | undefined; addGeojsonLayerFromSource(title: string, source: DataSource, style?: LayerStyle, args?: IMapLayer, extentions?: ILayerExtensionType[]): Promise; addGeojsonLayer(title: string, geojson?: string | DataSet, style?: LayerStyle, meta?: string | FeatureTypes, args?: IMapLayer, id?: string, extentions?: ILayerExtensionType[]): Promise; addLayer(ml: IMapLayer): Promise; clearLayers(): void; /** delete feature from a feature */ deleteLayerFeature(ml: IMapLayer | string, id: string, updateSource?: boolean): void; editLayer(layer: IMapLayer | string): void; execute(datasources: { [id: string]: IDatasource; }): Promise; fromGeoJSON(geojson: FeatureCollection, title?: string): Promise; hideLayer(ml: string | IMapLayer): void; loadLayer(ml: IMapLayer): Promise; moveLayer(layer: IMapLayer, beforeId?: string): void; selectFeature(feature: number | mapboxgl.MapboxGeoJSONFeature | undefined, layer: IMapLayer, open: boolean): void; openFeature(feature?: Feature, layer?: IMapLayer): void; openLayer(layer: IMapLayer | string): void; refreshLayer(layer: IMapLayer): void; startFeaturePicker(title?: string): Promise; refreshLayerSource(ml: IMapLayer): Promise; refreshLayers(): void; removeLayer(layerId: string): void; removeLegend(layer: IMapLayer, legend: PropertyDetails): void; showLayerById(id: string): Promise; showLayer(ml: IMapLayer): Promise; startDraw(mode?: string, title?: string): Promise<{ coordinates: number[][]; } | undefined>; startPointPicker(title?: string): Promise; toggleLayer(layer: IMapLayer): void; updateFeatureProperty(source: string, featureId: number, props: any): void; /** Replace/update a feature for a given layer */ updateLayerFeature(ml: IMapLayer | string, feature: Feature, updateSource?: boolean): void; /** Replace/update a collection of features for a given layer */ updateLayerFeatures(ml: IMapLayer | string, features: { [key: string]: Feature; }, updateSource?: boolean): void; updateLayerSource(ml: IMapLayer, geojson?: DataCollection | string, triggerEvent?: boolean): void; updateDataSet(sourceId: string, data: DataSet): DataSource; updateSource(source: LayerSource): DataSource; zoomFeature(feature: Feature | mapboxgl.MapboxGeoJSONFeature, zoomLevel?: number): void; zoomFeatureId(layer: IMapLayer, featureId: string): void; zoomLayer(layer: IMapLayer, padding?: number): void; /** Create a IMapLayer instance based on layer type, optionally provide maplayer config */ private getLayerInstance; private getServiceInstance; /** create an instance and initialize all layers */ private initLayers; /** create an instance and initialize all services */ private initServices; }