import { IDatasource } from '@csnext/cs-core';
import { CsMap, IMapLayer, GeojsonLayer, IStartStopService, LayerSource, LayerStyle, FeatureEventDetails, LayerSources, PropertyDetails } 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?;
    featureTypes?: FeatureTypes;
    activeDrawLayer?: IMapLayer;
    detailsComponent?: any;
    private map?;
    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<GeojsonPlusLayer | undefined>;
    addGeojsonLayer(title: string, geojson?: string | DataSet, style?: LayerStyle, meta?: string | FeatureTypes, args?: IMapLayer, id?: string, extentions?: ILayerExtensionType[], promoteId?: string): Promise<GeojsonPlusLayer>;
    addLayer(ml: IMapLayer): Promise<IMapLayer>;
    clearLayers(): void;
    deleteLayerFeature(ml: IMapLayer | string, id: string, updateSource?: boolean): void;
    editLayer(layer: IMapLayer | string): void;
    execute(datasources: {
        [id: string]: IDatasource;
    }): Promise<any>;
    fromGeoJSON(geojson: FeatureCollection, title?: string): Promise<GeojsonLayer>;
    hideLayer(ml: string | IMapLayer): void;
    loadLayer(ml: IMapLayer): Promise<IMapLayer>;
    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<FeatureEventDetails | undefined>;
    refreshLayerSource(ml: IMapLayer): Promise<IMapLayer>;
    refreshLayers(): void;
    removeLayer(layerId: string): void;
    removeLegend(layer: IMapLayer, legend: PropertyDetails): void;
    showLayerById(id: string): Promise<IMapLayer>;
    showLayer(ml: IMapLayer): Promise<IMapLayer>;
    stopEdit(): void;
    startEdit(feature: Feature): Promise<Feature | undefined>;
    startDraw(mode?: string, title?: string): Promise<{
        coordinates: number[][];
    } | undefined>;
    startPointPicker(title?: string): Promise<LngLat | undefined>;
    toggleLayer(layer: IMapLayer): void;
    updateFeatureProperty(source: string, featureId: number, props: any): void;
    updateLayerFeature(ml: IMapLayer | string, feature: Feature, updateSource?: boolean): void;
    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;
    private getLayerInstance;
    private getServiceInstance;
    private initLayers;
    private initServices;
}
