import { Map as OLMap } from 'ol';
import { default as Layer } from 'ol/layer/Layer';
import { ColorLike } from 'ol/colorlike';
import { FeatureLike } from 'ol/Feature';
import { PopupManagerConfig, PopupConfig } from '../components/OlMapPopup/types';
import { MapEvents, EventManagerConfig } from '../core/EventManager';

export type FeatureInput = FeatureLike | {
    properties: any;
    [key: string]: any;
};
export type LayerInput = Layer | {
    layerId?: string;
    layerName?: string;
    values_?: any;
    get?: (key: string) => any;
    [key: string]: any;
};
export declare enum FilterType {
    ATTRIBUTE = "attribute",
    SPATIAL = "spatial",
    CQL = "cql",
    CUSTOM = "custom"
}
export declare enum FilterOperator {
    EQUAL = "equal",
    NOT_EQUAL = "not_equal",
    GREATER_THAN = "greater_than",
    LESS_THAN = "less_than",
    GREATER_EQUAL = "greater_equal",
    LESS_EQUAL = "less_equal",
    LIKE = "like",
    IN = "in",
    NOT_IN = "not_in",
    BETWEEN = "between",
    IS_NULL = "is_null",
    IS_NOT_NULL = "is_not_null"
}
export declare enum SpatialFilterType {
    INTERSECTS = "intersects",
    CONTAINS = "contains",
    WITHIN = "within",
    TOUCHES = "touches",
    CROSSES = "crosses",
    OVERLAPS = "overlaps",
    DISJOINT = "disjoint"
}
export interface LayerFilter {
    id: string;
    type: FilterType;
    enabled: boolean;
    name?: string;
    description?: string;
}
export interface AttributeFilterConfig extends LayerFilter {
    type: FilterType.ATTRIBUTE;
    property: string;
    operator: FilterOperator;
    value: any;
    caseSensitive?: boolean;
}
export interface SpatialFilterConfig extends LayerFilter {
    type: FilterType.SPATIAL;
    spatialType: SpatialFilterType;
    geometry: any;
    srid?: string;
}
export interface CQLFilterConfig extends LayerFilter {
    type: FilterType.CQL;
    cqlExpression: string;
}
export interface CustomFilterConfig extends LayerFilter {
    type: FilterType.CUSTOM;
    filterFunction: (feature: any) => boolean;
}
export type FilterConfig = AttributeFilterConfig | SpatialFilterConfig | CQLFilterConfig | CustomFilterConfig;
export type WFSRequestFilter = {
    type: "equalTo" | "like";
    property: string;
    value: any;
};
export type GeoJSONRequestMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
export interface GeoJSONRequestContext {
    config: LayerConfig;
    params: Record<string, any>;
    body?: Record<string, any> | string;
    map?: OLMap;
}
export interface GeoJSONRequestConfig {
    url?: string;
    method?: GeoJSONRequestMethod;
    headers?: Record<string, string>;
    params?: Record<string, any>;
    body?: Record<string, any> | string;
    dataPath?: string;
    managementUnit?: string;
    managementUnitParamName?: string;
    landType?: string;
    landTypeParamName?: string;
    requestInterceptor?: (request: {
        url: string;
        method: GeoJSONRequestMethod;
        headers: Record<string, string>;
        params: Record<string, any>;
        body?: Record<string, any> | string;
    }, context: GeoJSONRequestContext) => {
        url?: string;
        method?: GeoJSONRequestMethod;
        headers?: Record<string, string>;
        params?: Record<string, any>;
        body?: Record<string, any> | string;
    } | Promise<{
        url?: string;
        method?: GeoJSONRequestMethod;
        headers?: Record<string, string>;
        params?: Record<string, any>;
        body?: Record<string, any> | string;
    }>;
    responseInterceptor?: (response: any, context: GeoJSONRequestContext) => any | Promise<any>;
    responseParser?: (response: any, context: GeoJSONRequestContext) => any | Promise<any>;
}
export interface GeoJSONRefreshConfig {
    enabled?: boolean;
    interval?: number;
    onMoveEnd?: boolean;
    onZoomEnd?: boolean;
    debounce?: number;
    useExtent?: boolean;
    extentParamName?: string;
    extentTarget?: "params" | "body";
    extentProjection?: string;
}
export interface GeoJSONLayerSourceConfig {
    data?: object | string;
    request?: GeoJSONRequestConfig;
    dataPath?: string;
    refresh?: GeoJSONRefreshConfig;
    clearOnError?: boolean;
}
export interface FilterManager {
    addFilter(filter: FilterConfig): void;
    removeFilter(filterId: string): void;
    updateFilter(filterId: string, updates: Partial<FilterConfig>): void;
    getFilter(filterId: string): FilterConfig | undefined;
    getAllFilters(): FilterConfig[];
    getEnabledFilters(): FilterConfig[];
    clearAllFilters(): void;
    toggleFilter(filterId: string): void;
    applyFilters(): void;
}
export type FilterLogic = "AND" | "OR";
export type LayerType = string;
export interface LegendItem {
    label: string;
    value?: string | number;
    color?: string;
    symbol?: "circle" | "square" | "line" | "polygon" | "triangle";
    image?: string;
    shape?: "circle" | "square" | "triangle";
    size?: number;
    borderColor?: string;
    pattern?: string;
}
export interface LegendConfig {
    type?: "simple" | "gradient" | "category" | "color" | "symbol" | "icon" | "custom";
    items: LegendItem[];
    title?: string;
    position?: "top-left" | "top-right" | "bottom-left" | "bottom-right";
    colors?: string[];
    min?: string | number;
    max?: string | number;
    unit?: string;
    content?: string;
    description?: string;
    visible?: boolean;
    layerId?: string;
}
export interface ViewBookmark {
    id: string;
    name: string;
    category: string;
    description: string;
    center: [number, number];
    zoom: number;
    rotation: number;
    createTime: string | Date;
    creator?: string;
    thumbnail?: string;
    layerStates?: {
        id: string;
        visible: boolean;
        opacity: number;
        title?: string;
    }[];
}
export type BookmarkAction = {
    action: "add" | "update" | "delete" | "apply" | "clear";
    bookmark?: ViewBookmark;
};
export interface LayerLocationAnimationConfig {
    enabled?: boolean;
    duration?: number;
    easing?: "linear" | "ease" | "ease-in" | "ease-out" | "ease-in-out";
    maxZoom?: number;
    padding?: [number, number, number, number];
}
export interface LayerHighlightConfig {
    enabled?: boolean;
    style?: {
        fill?: {
            color?: ColorLike;
            opacity?: number;
        };
        stroke?: {
            color?: ColorLike;
            width?: number;
            lineDash?: number[];
        };
        fillColor?: ColorLike;
        strokeColor?: ColorLike;
        strokeWidth?: number;
        lineDash?: number[];
        circle?: {
            radius?: number;
            fill?: {
                color?: ColorLike;
                opacity?: number;
            };
            stroke?: {
                color?: ColorLike;
                width?: number;
            };
        };
        text?: {
            font?: string;
            fill?: {
                color?: ColorLike;
            };
            stroke?: {
                color?: ColorLike;
                width?: number;
            };
            offsetX?: number;
            offsetY?: number;
            scale?: number;
        };
    };
    duration?: number;
    fadeOut?: boolean;
    clearOthersOnHighlight?: boolean;
}
export interface LayerSpecificConfig {
    wms?: {
        layers: string;
        format?: string;
        transparent?: boolean;
        version?: string;
        srs?: string;
        styles?: string;
        cql_filter?: string;
        viewparams?: string;
    };
    wmts?: {
        layer: string;
        matrixSet: string;
        format?: string;
        style?: string;
    };
    vector?: {
        format?: "GeoJSON" | "KML" | "GPX" | "WKT" | "GML";
        style?: any;
        cluster?: boolean;
        clusterDistance?: number;
        geojson?: GeoJSONLayerSourceConfig;
        declutter?: boolean;
    };
    heatmap?: {
        blur?: number;
        radius?: number;
        weight?: string | ((feature: any) => number);
        gradient?: string[];
    };
    bing?: {
        key: string;
        imagerySet: "Aerial" | "AerialWithLabels" | "Road" | "OrdnanceSurvey" | "CollinsBart";
    };
    google?: {
        mapType: "roadmap" | "satellite" | "hybrid" | "terrain";
    };
    arcgis?: {
        params?: Record<string, any>;
        ratio?: number;
    };
    mapbox?: {
        accessToken: string;
        styleId: string;
        username?: string;
    };
    xyz?: {
        minZoom?: number;
        maxZoom?: number;
        tileSize?: number;
        crossOrigin?: string;
    };
    webgl?: {
        vertexShader?: string;
        fragmentShader?: string;
        uniforms?: Record<string, any>;
    };
    canvas?: {
        canvasFunction?: (extent: number[], resolution: number, pixelRatio: number, size: number[], projection: any) => HTMLCanvasElement;
        ratio?: number;
    };
    graticule?: {
        strokeStyle?: any;
        maxLines?: number;
        targetSize?: number;
        showLabels?: boolean;
        lonLabelFormatter?: (lon: number) => string;
        latLabelFormatter?: (lat: number) => string;
    };
    wfs?: {
        version?: string;
        featureNS?: string;
        featureType?: string;
        featurePrefix?: string;
        gmlFormat?: any;
        className?: string;
        strategy?: "bbox" | "all";
        usePostMethod?: boolean;
        outputFormat?: string;
        srsName?: string;
        customParams?: Record<string, any>;
        geometryName?: string;
        filters?: WFSRequestFilter[];
    };
    geojson?: GeoJSONLayerSourceConfig;
}
export interface LayerConfig {
    id: string;
    name: string;
    type: LayerType;
    url?: string;
    method?: GeoJSONRequestMethod;
    headers?: Record<string, string>;
    body?: Record<string, any> | string;
    dataPath?: string;
    visible: boolean;
    opacity: number;
    zIndex: number;
    extent?: [number, number, number, number];
    canvasConfig?: any;
    source?: any;
    layer?: unknown;
    legend?: LegendConfig;
    metadata?: Record<string, any>;
    group?: string;
    children?: LayerConfig[];
    layers?: LayerConfig[];
    transparent?: boolean;
    cacheEnabled?: boolean;
    autoFetchMetadata?: boolean;
    projection?: string;
    projectionDefinition?: string;
    geojsonConfig?: GeoJSONLayerSourceConfig;
    managementUnit?: string;
    geojsonLandType?: string;
    config?: LayerSpecificConfig;
    filterLogic?: FilterLogic;
    wmsLayers?: string;
    wmsFormat?: string;
    wmsVersion?: string;
    params?: Record<string, any>;
    layerName?: string;
    serviceStyle?: string;
    format?: string;
    matrixSet?: string;
    resolutions?: number[];
    matrixIds?: string[];
    origin?: [number, number];
    wmtsConfig?: {
        url?: string;
        layer?: string;
        matrixSet?: string;
        style?: string;
        format?: string;
        version?: string;
        projection?: string;
        projectionDefinition?: string;
        origin?: [number, number];
        resolutions?: number[];
        matrixIds?: string[];
        tileSize?: number | [number, number];
    };
    bingKey?: string;
    bingImagerySet?: string;
    vectorFormat?: string;
    vectorColor?: string;
    data?: any;
    gmlConfig?: {
        version?: string;
        srsName?: string;
        className?: string;
    };
    wktConfig?: {
        wktString?: string;
        splitCollection?: boolean;
    };
    wfsConfig?: {
        version?: string;
        featureNS?: string;
        featureType?: string;
        featurePrefix?: string;
        gmlFormat?: any;
        className?: string;
        strategy?: "bbox" | "all";
        usePostMethod?: boolean;
        outputFormat?: string;
        srsName?: string;
        customParams?: Record<string, any>;
        geometryName?: string;
        filters?: WFSRequestFilter[];
    };
    supermapConfig?: {
        queryMethod?: "point" | "buffer";
        bufferDistance?: number;
        datasetNames?: string[];
        featureServiceUrl?: string;
    };
    clusterDistance?: number;
    minDistance?: number;
    heatmapBlur?: number;
    heatmapRadius?: number;
    xyzMinZoom?: number;
    xyzMaxZoom?: number;
    center?: [number, number];
    locationAnimation?: LayerLocationAnimationConfig;
    style?: {
        "fill-color"?: ColorLike;
        "stroke-color"?: ColorLike;
        "stroke-width"?: number;
        "text-color"?: ColorLike;
        "text-size"?: number;
        "text-font"?: string;
        mixBlendMode?: GlobalCompositeOperation;
        filter?: string;
        fill?: {
            color?: ColorLike;
            opacity?: number;
        };
        stroke?: {
            color?: ColorLike;
            width?: number;
            lineDash?: number[];
        };
        circle?: {
            radius?: number;
            fill?: {
                color?: ColorLike;
                opacity?: number;
            };
            stroke?: {
                color?: ColorLike;
                width?: number;
            };
        };
        text?: {
            text?: string;
            field?: string;
            template?: string;
            fill?: {
                color?: ColorLike;
            };
            stroke?: {
                color?: ColorLike;
                width?: number;
            };
            font?: string;
            fontSize?: number;
            fontFamily?: string;
            fontWeight?: string;
            offsetX?: number;
            offsetY?: number;
            scale?: number;
            textAlign?: CanvasTextAlign;
            textBaseline?: CanvasTextBaseline;
            rotation?: number;
            backgroundFill?: {
                color?: ColorLike;
            };
            backgroundStroke?: {
                color?: ColorLike;
                width?: number;
            };
            padding?: [number, number, number, number];
            overflow?: boolean;
        };
    };
    styleFunction?: (feature: any, resolution: number) => any;
    cssClass?: string;
    className?: string;
    fitToExtent?: boolean;
    highlight?: LayerHighlightConfig;
    popup?: (PopupConfig & PopupManagerConfig) | Record<string, string>;
    isBasemap?: boolean;
    isCompare?: boolean;
    filters?: FilterConfig[];
    reuseId?: string;
    customCss?: string;
    baseImgUrl?: string;
    attribution?: string;
    minZoom?: number;
    maxZoom?: number;
}
export type SearchPosition = "top-left" | "top-right" | "bottom-left" | "bottom-right";
export type SearchProvider = "baidu" | "amap" | "google" | "tianditu" | "custom" | "layer";
export interface FieldMapping {
    id?: string;
    name?: string;
    address?: string;
    location?: string | [string, string];
    type?: string;
    district?: string;
    city?: string;
    province?: string;
    adcode?: string;
    bounds?: string | [string, string, string, string];
    confidence?: string;
}
export interface CustomApiConfig {
    url: string;
    method?: "GET" | "POST";
    headers?: Record<string, string>;
    params?: Record<string, any>;
    queryParam?: string;
    fieldMapping?: FieldMapping;
    dataPath?: string;
    responseParser?: (response: any) => SearchResult[];
    requestInterceptor?: (config: any) => any;
    responseInterceptor?: (response: any) => any;
}
export interface LayerSearchConfig {
    layers?: string[];
    attributeKeys?: string[];
    onlyVisible?: boolean;
    maxPerLayer?: number;
}
export type SearchMessageResolver<TContext> = string | ((context: TContext) => string);
export type SearchErrorCode = "config_error" | "http_error" | "api_error" | "network_error" | "unknown_error";
export interface SearchFailureMessageContext {
    query: string;
    provider?: SearchProvider;
    error: unknown;
    code: SearchErrorCode;
}
export interface SearchNoResultsMessageContext {
    query: string;
    provider?: SearchProvider;
}
export interface SearchResultsTitleContext {
    query: string;
    count: number;
}
export interface MapSearchMessages {
    historyTitle?: SearchMessageResolver<Record<string, never>>;
    clearHistory?: SearchMessageResolver<Record<string, never>>;
    resultsTitle?: SearchMessageResolver<SearchResultsTitleContext>;
    noResults?: SearchMessageResolver<SearchNoResultsMessageContext>;
    searchFailed?: SearchMessageResolver<SearchFailureMessageContext>;
}
export interface MapSearchConfig {
    enabled?: boolean;
    position?: SearchPosition;
    placeholder?: string;
    provider?: SearchProvider;
    apiKey?: string;
    customApi?: CustomApiConfig;
    level?: number;
    mapBound?: string;
    queryType?: number;
    specify?: string;
    dataTypes?: string;
    show?: string;
    type?: string;
    city?: string;
    [key: string]: any;
    layerSearch?: LayerSearchConfig;
    maxResults?: number;
    showHistory?: boolean;
    enableStorage?: boolean;
    searchDelay?: number;
    minSearchLength?: number;
    messages?: MapSearchMessages;
    resultStyle?: {
        markerColor?: string;
        markerSize?: number;
        highlightColor?: string;
        zoomLevel?: number;
    };
    onSearch?: (query: string) => Promise<SearchResult[]>;
    onSelect?: (result: SearchResult) => void;
    customSearchFn?: (query: string, config: MapSearchConfig) => Promise<SearchResult[]>;
}
export interface SearchResult {
    id: string;
    name: string;
    title?: string;
    address: string;
    location: [number, number];
    type?: string;
    district?: string;
    city?: string;
    province?: string;
    adcode?: string;
    bounds?: [number, number, number, number];
    category?: string;
    distance?: number | string;
    confidence?: number;
    provider?: SearchProvider;
    raw?: any;
}
export type MapControlDrawingTool = "point" | "line" | "polygon" | "circle" | "rectangle";
export interface MapControlDrawingResult {
    id: string;
    type: string;
    name: string;
    coordinates: unknown;
    properties?: Record<string, unknown>;
    style?: Record<string, unknown>;
    config?: Record<string, unknown>;
    geojson?: Record<string, unknown> | null;
    drawing?: unknown;
    feature?: unknown;
    source: "controls";
}
export interface MapControlDrawingConfig {
    /** 是否启用快捷绘制控件 */
    enabled?: boolean;
    /** 触发方式 */
    trigger?: "click" | "hover";
    /** 默认是否开启连续绘制 */
    continuous?: boolean;
    /** 是否显示连续绘制开关 */
    showContinuousToggle?: boolean;
    /** 绘制工具列表 */
    tools?: MapControlDrawingTool[];
    /** 外部接收绘制结果的回调 */
    onDrawEnd?: (result: MapControlDrawingResult) => void;
}
export interface MapControlsConfig {
    /** 是否显示缩放控件 */
    zoom?: boolean;
    /** 是否显示旋转控件 */
    rotate?: boolean;
    /** 是否显示版权/归属控件 */
    attribution?: boolean;
    /** 自定义版权信息 */
    attributionText?: string;
    /** 版权信息是否可折叠 */
    attributionCollapsible?: boolean;
    /** 全屏控件 */
    fullScreen?: boolean;
    /** 比例尺控件 */
    scaleLine?: boolean;
    /** 鼠标位置控件 */
    mousePosition?: boolean;
    /** 概览图控件 */
    overviewMap?: boolean | {
        /** 是否启用概览图 */
        enabled?: boolean;
        /** 概览图位置 */
        position?: "top-left" | "top-right" | "bottom-left" | "bottom-right";
        /** 概览图大小 */
        size?: [number, number];
        /** 是否可折叠 */
        collapsible?: boolean;
        /** 默认是否折叠 */
        collapsed?: boolean;
        /** 概览图图层配置 */
        layers?: LayerConfig[];
        /** 概览图视图配置 */
        view?: {
            /** 缩放级别偏移（相对于主地图） */
            zoomOffset?: number;
            /** 最小缩放级别 */
            minZoom?: number;
            /** 最大缩放级别 */
            maxZoom?: number;
        };
        /** 概览图样式配置 */
        style?: {
            /** 边框颜色 */
            borderColor?: string;
            /** 边框宽度 */
            borderWidth?: number;
            /** 背景颜色 */
            backgroundColor?: string;
            /** 透明度 */
            opacity?: number;
        };
    };
    /** 缩放滑块控件 */
    zoomSlider?: boolean | {
        /** 是否启用缩放滑块 */
        enabled?: boolean;
        /** 滑块高度（垂直模式）或宽度（水平模式） */
        size?: string;
        /** 缩放步长 */
        step?: number;
        /** 是否显示缩放级别数字 */
        showValue?: boolean;
        /** 是否显示tooltip */
        showTooltip?: boolean;
        /** 滑块样式配置 */
        style?: {
            /** 滑块轨道颜色 */
            trackColor?: string;
            /** 滑块按钮颜色 */
            thumbColor?: string;
            /** 滑块激活颜色 */
            activeColor?: string;
        };
    };
    /** 缩放到指定范围控件 */
    zoomToExtent?: boolean;
    /** 缩放到指定范围的范围配置 */
    zoomToExtentOptions?: {
        extent?: [number, number, number, number];
        label?: string;
        tipLabel?: string;
    };
    /** 定位控件（回到初始位置） */
    location?: boolean;
    /** 视角书签控件 */
    viewBookmarks?: boolean;
    /** 快捷绘制控件 */
    drawing?: boolean | MapControlDrawingConfig;
    /** 清除所有绘制内容控件 */
    clearAll?: boolean;
    /** 搜索控件 */
    search?: MapSearchConfig;
    /** 控件位置 */
    position?: "top-left" | "top-right" | "bottom-left" | "bottom-right";
    /** 控件排列方向 */
    direction?: "horizontal" | "vertical";
    leftOffset?: string | number;
    rightOffset?: string | number;
    topOffset?: string | number;
    bottomOffset?: string | number;
    /** 是否使用自定义控件样式（替代OpenLayers默认控件） */
    useCustomStyle?: boolean;
    /** 图层面板控件 */
    layerPanel?: {
        /** 是否启用图层面板（控件存在） */
        enabled?: boolean;
        /** 面板位置（停靠位置） */
        position?: "left" | "right";
        /** 是否默认打开 */
        defaultOpen?: boolean;
        /** 面板标题 */
        title?: string;
        /** 面板宽度（像素或字符串） */
        width?: number | string;
        /** 面板高度（像素或字符串） */
        height?: number | string;
        top?: number | string;
        left?: number | string;
        right?: number | string;
        bottom?: number | string;
        /** 是否显示模态遮罩 */
        modal?: boolean;
        /** 是否可拖拽 */
        draggable?: boolean;
        /** 是否可调整大小 */
        resizable?: boolean;
        /** 是否显示关闭按钮 */
        showClose?: boolean;
        closeOnClickModal?: boolean;
        closeOnPressEscape?: boolean;
        fullscreen?: boolean;
        destroyOnClose?: boolean;
        lockScroll?: boolean;
        zIndex?: number;
        /** 状态缓存ID */
        cacheId?: string;
        /** 自定义CSS类名 */
        className?: string;
        customClass?: string;
        minWidth?: number;
        minHeight?: number;
        maxWidth?: number;
        maxHeight?: number;
        enableCache?: boolean;
        autoSaveCache?: boolean;
        cacheDebounceTime?: number;
        unit?: "px" | "rem" | "vw" | "vh" | "%";
        remBase?: number;
        beforeClose?: (...args: any[]) => any;
        /** 是否可折叠 */
        collapsible?: boolean;
        /** 是否默认全屏 */
        showFullscreen?: boolean;
        /** 是否默认传送到 body 元素 */
        toBody?: boolean;
        /** 是否显示整体样式调整标签 */
        showGlobalStyleTab?: boolean;
        /** 是否显示树形视图切换 */
        showTreeViewToggle?: boolean;
    };
    showToolbar?: boolean | {
        enabled?: boolean;
        position?: "top-left" | "top-right" | "bottom-left" | "bottom-right";
        leftOffset?: string | number;
        rightOffset?: string | number;
        topOffset?: string | number;
        bottomOffset?: string | number;
    };
    /** 工具控件分组 */
    tools?: {
        /** 是否显示缩放控件 */
        zoom?: boolean;
        /** 是否显示旋转控件 */
        rotate?: boolean;
        /** 是否显示版权/归属控件 */
        attribution?: boolean;
        /** 自定义版权信息 */
        attributionText?: string;
        /** 版权信息是否可折叠 */
        attributionCollapsible?: boolean;
        /** 全屏控件 */
        fullScreen?: boolean;
        /** 比例尺控件 */
        scaleLine?: boolean;
        /** 鼠标位置控件 */
        mousePosition?: boolean;
        /** 概览图控件 */
        overviewMap?: boolean | {
            /** 是否启用概览图 */
            enabled?: boolean;
            /** 概览图位置 */
            position?: "top-left" | "top-right" | "bottom-left" | "bottom-right";
            /** 概览图大小 */
            size?: [number, number];
            /** 是否可折叠 */
            collapsible?: boolean;
            /** 默认是否折叠 */
            collapsed?: boolean;
            /** 概览图图层配置 */
            layers?: LayerConfig[];
            /** 概览图视图配置 */
            view?: {
                /** 缩放级别偏移（相对于主地图） */
                zoomOffset?: number;
                /** 最小缩放级别 */
                minZoom?: number;
                /** 最大缩放级别 */
                maxZoom?: number;
            };
            /** 概览图样式配置 */
            style?: {
                /** 边框颜色 */
                borderColor?: string;
                /** 边框宽度 */
                borderWidth?: number;
                /** 背景颜色 */
                backgroundColor?: string;
                /** 透明度 */
                opacity?: number;
            };
        };
        /** 缩放滑块控件 */
        zoomSlider?: boolean | {
            /** 是否启用缩放滑块 */
            enabled?: boolean;
            /** 滑块高度（垂直模式）或宽度（水平模式） */
            size?: string;
            /** 缩放步长 */
            step?: number;
            /** 是否显示缩放级别数字 */
            showValue?: boolean;
            /** 是否显示tooltip */
            showTooltip?: boolean;
            /** 滑块样式配置 */
            style?: {
                /** 滑块轨道颜色 */
                trackColor?: string;
                /** 滑块按钮颜色 */
                thumbColor?: string;
                /** 滑块激活颜色 */
                activeColor?: string;
            };
        };
        /** 缩放到指定范围控件 */
        zoomToExtent?: boolean;
        /** 缩放到指定范围的范围配置 */
        zoomToExtentOptions?: {
            extent?: [number, number, number, number];
            label?: string;
            tipLabel?: string;
        };
        /** 定位控件（回到初始位置） */
        location?: boolean;
        /** 定位类型：'initial' 回到初始位置，'user' 定位到用户当前位置 */
        locationType?: "initial" | "user";
        /** 视角书签控件 */
        viewBookmarks?: boolean;
        /** 快捷绘制控件 */
        drawing?: boolean | MapControlDrawingConfig;
        /** 清除所有绘制内容控件 */
        clearAll?: boolean;
        /** 控件位置 */
        position?: "top-left" | "top-right" | "bottom-left" | "bottom-right";
        /** 控件排列方向 */
        direction?: "horizontal" | "vertical";
        /** 是否使用自定义控件样式（替代OpenLayers默认控件） */
        useCustomStyle?: boolean;
        showToolbar?: boolean;
    };
}
export interface MapInteractionsConfig {
    /** 是否启用双击缩放 */
    doubleClickZoom?: boolean;
    /** 是否启用拖拽平移 */
    dragPan?: boolean;
    /** 是否启用鼠标滚轮缩放 */
    mouseWheelZoom?: boolean;
    /** 是否启用Shift+拖拽缩放 */
    shiftDragZoom?: boolean;
    /** 是否启用键盘交互 */
    keyboard?: boolean;
    /** 其他交互配置 */
    [key: string]: boolean | undefined;
}
export interface MapViewConfig {
    /** 地图中心点 */
    center?: [number, number];
    /** 缩放级别 */
    zoom?: number;
    /** 最小缩放级别 */
    minZoom?: number;
    /** 最大缩放级别 */
    maxZoom?: number;
    /** 地图投影 */
    projection?: string;
    /** 是否启用旋转 */
    enableRotation?: boolean;
    /** 地图范围 */
    extent?: [number, number, number, number];
}
export interface MapConfig {
    /** 地图容器ID */
    target?: string;
    /** 地图中心点 */
    center?: [number, number];
    /** 缩放级别 */
    zoom?: number;
    /** 最小缩放级别 */
    minZoom?: number;
    /** 最大缩放级别 */
    maxZoom?: number;
    /** 地图投影 */
    projection?: string;
    projectionDefinition?: string;
    /** 是否启用旋转 */
    enableRotation?: boolean;
    /** 地图范围 */
    extent?: [number, number, number, number];
    /** 地图视图配置 - 支持将视图相关配置统一放在view对象中 */
    view?: MapViewConfig;
    /** 图层配置 */
    layers?: LayerConfig[];
    /** 底图配置 */
    baseLayers?: LayerConfig[];
    /** 叠加图层配置 */
    overlayLayers?: LayerConfig[];
    /** 矢量图层配置 */
    vectorLayers?: LayerConfig[];
    groups?: LayerConfig[];
    /** 地图控件配置 */
    controls?: MapControlsConfig;
    /** 地图交互配置 */
    interactions?: MapInteractionsConfig;
    /** tooltip配置 */
    tooltip?: TooltipConfig;
    /** 事件管理配置 */
    eventManager?: EventManagerConfig;
    /** popup配置 */
    popupConfig?: PopupManagerConfig;
    /** UI组件显示配置 */
    ui?: {
        /** 工具栏显示 */
        showToolbar?: boolean;
        /** 地图信息显示 */
        showMapInfo?: boolean;
        /** 图例显示 */
        showLegend?: boolean;
        /** 图例位置 */
        legendPosition?: "left" | "right";
        /** 图例宽度 */
        legendWidth?: number;
        /** 图例是否可折叠 */
        legendCollapsible?: boolean;
        /** 图例默认折叠状态 */
        legendDefaultCollapsed?: boolean;
        /** 是否只显示可见图层的图例 */
        legendShowOnlyVisible?: boolean;
    };
}
export type OpenLayersConfig = MapConfig;
export interface MeasurementResult {
    id: string;
    type: "length" | "area" | "angle" | "coordinate";
    value: number;
    unit: string;
    coordinates: number[][];
    timestamp: number;
    distance?: string;
    area?: string;
    angle?: string;
    longitude?: string;
    latitude?: string;
    elevation?: string;
}
export interface MapEventCallbacks {
    /** 地图点击事件 */
    onMapClick?: (event: MapClickEvent) => void;
    /** 地图双击事件 */
    onMapDblClick?: (event: MapClickEvent) => void;
    /** 地图右键点击事件 */
    onMapRightClick?: (event: MapClickEvent) => void;
    /** 地图移动事件 */
    onMapMove?: (center: [number, number], zoom: number) => void;
    /** 缩放变化事件 */
    onZoomChange?: (zoom: number) => void;
    /** tooltip显示事件 */
    onTooltipShow?: (data: any) => void;
    /** tooltip隐藏事件 */
    onTooltipHide?: () => void;
}
export interface MapClickEvent {
    coordinate: [number, number];
    pixel: [number, number];
    features?: any[];
    layerData?: any;
    originalEvent?: any;
}
export interface LayerControlConfig {
    position: "left" | "right";
    width: number;
    collapsible: boolean;
    defaultCollapsed: boolean;
}
export interface LegendPanelConfig {
    /** 是否显示图例面板 */
    visible: boolean;
    /** 面板位置 */
    position: "left" | "right" | "top" | "bottom";
    /** 面板宽度 */
    width?: number;
    /** 面板高度 */
    height?: number;
    /** 是否可折叠 */
    collapsible?: boolean;
    /** 默认是否折叠 */
    collapsed?: boolean;
}
export type { MapEvents, EventManagerConfig };
export type { DrawingConfig, DrawingStyleConfig, DrawingEvents, } from '../core/drawing/BaseDrawing';
export interface TooltipData {
    layerId: string;
    layerName: string;
    features: any[];
}
export type TooltipTemplate = string | object | ((...args: any[]) => string);
export interface TooltipEmits {
    (e: "tooltip-click", feature: any, layerData: any): void;
    (e: "feature-click", feature: any, layerData: any, coordinate: [number, number]): void;
    (e: "show", data: TooltipTemplateData): void;
    (e: "hide"): void;
    (e: "data-loaded", data: TooltipData[]): void;
}
export interface TooltipTemplateData {
    data: TooltipData[];
    coordinate: [number, number];
    pixel: [number, number];
}
export interface TooltipConfig {
    /** 是否启用tooltip */
    enabled: boolean;
    /** 触发方式 */
    trigger?: "click" | "hover";
    /** 延迟显示时间(ms) */
    delay?: number;
    /** 最大宽度 */
    maxWidth?: number;
    /** 最大高度 */
    maxHeight?: number;
    /** 是否显示关闭按钮 */
    showCloseButton?: boolean;
    /** 自定义样式类名 */
    className?: string;
    /** 位置偏移 */
    offset?: [number, number];
}
export interface GetFeaturesResult {
    /** 查询得到的要素数组，GeoJSON Feature 对象 */
    features: any[];
    /** 返回的要素数量 */
    featureCount: number;
    /** 可选：服务返回的资源信息 */
    resourceInfo?: any;
}
export interface ServiceResult<T = any> {
    result: T;
    succeed: boolean;
    error?: any;
}
//# sourceMappingURL=map.d.ts.map