@antv/aimapui 0.3.1 → 0.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +31 -31
- package/dist/index.d.ts +101 -17
- package/dist/index.es.js +12891 -6962
- package/dist/index.iife.js +31 -31
- package/dist/style.css +1 -1
- package/package.json +16 -16
package/dist/index.d.ts
CHANGED
|
@@ -1080,6 +1080,8 @@ export declare interface BottomSheetProps {
|
|
|
1080
1080
|
|
|
1081
1081
|
export declare type BottomSheetSnap = 'collapsed' | 'half' | 'expanded';
|
|
1082
1082
|
|
|
1083
|
+
export declare const BUBBLE_SIZE_LEVELS: readonly [8, 16, 32, 48, 64];
|
|
1084
|
+
|
|
1083
1085
|
declare type BubbleAnchor = 'center' | 'top' | 'right' | 'bottom' | 'left' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
1084
1086
|
|
|
1085
1087
|
/**
|
|
@@ -1653,28 +1655,33 @@ export declare interface ExportConfig {
|
|
|
1653
1655
|
quality?: number;
|
|
1654
1656
|
}
|
|
1655
1657
|
|
|
1656
|
-
export declare
|
|
1658
|
+
export declare const ExportImageControl: default_2.ForwardRefExoticComponent<ExportImageControlProps & default_2.RefAttributes<ExportImageHandle>>;
|
|
1657
1659
|
|
|
1658
1660
|
/**
|
|
1659
1661
|
* ExportImage 导出图片控件
|
|
1660
1662
|
*
|
|
1661
|
-
*
|
|
1662
|
-
*
|
|
1663
|
-
*
|
|
1664
|
-
*
|
|
1665
|
-
*
|
|
1663
|
+
* 导图为底图(高德)和可视化图层(L7)的合并图。
|
|
1664
|
+
* 优先使用 L7 API(exportMap + exportPng),
|
|
1665
|
+
* 失败时回退到直接抓取 map 容器内的所有 canvas 合并。
|
|
1666
|
+
*
|
|
1667
|
+
* ```tsx
|
|
1668
|
+
* const ref = useRef<ExportImageHandle>(null);
|
|
1669
|
+
* <ExportImageControl ref={ref} />
|
|
1670
|
+
* const base64 = await ref.current?.exportImage();
|
|
1671
|
+
* ```
|
|
1666
1672
|
*/
|
|
1667
1673
|
export declare interface ExportImageControlProps {
|
|
1668
|
-
/** 控件位置,默认 topright */
|
|
1669
1674
|
position?: L7ControlPosition;
|
|
1670
|
-
/** 图片格式,默认 png */
|
|
1671
1675
|
format?: 'png' | 'jpg';
|
|
1672
1676
|
className?: string;
|
|
1673
1677
|
style?: default_2.CSSProperties;
|
|
1674
|
-
/** 导出回调 */
|
|
1675
1678
|
onExport?: (base64: string) => void;
|
|
1676
1679
|
}
|
|
1677
1680
|
|
|
1681
|
+
export declare interface ExportImageHandle {
|
|
1682
|
+
exportImage(format?: 'png' | 'jpg'): Promise<string | undefined>;
|
|
1683
|
+
}
|
|
1684
|
+
|
|
1678
1685
|
/** 导出选项(向后兼容) */
|
|
1679
1686
|
export declare interface ExportOptions {
|
|
1680
1687
|
maxWidth?: number;
|
|
@@ -1917,6 +1924,32 @@ export declare interface GlyphLayerProps extends Omit<LayerSchema, 'type' | 'sou
|
|
|
1917
1924
|
onMouseLeave?: (payload: LayerEventPayload) => void;
|
|
1918
1925
|
}
|
|
1919
1926
|
|
|
1927
|
+
export declare const H3_SEQUENTIAL_COLORS: readonly ["#dbeafe", "#93c5fd", "#60a5fa", "#3b82f6", "#2563eb"];
|
|
1928
|
+
|
|
1929
|
+
export declare interface H3DataItem {
|
|
1930
|
+
[key: string]: unknown;
|
|
1931
|
+
}
|
|
1932
|
+
|
|
1933
|
+
export declare function H3Layer({ source, h3Field, color, colorField, colorValues, opacity, showStroke, strokeColor, strokeWidth, hoverEffect, clickEffect, showLabel, labelField, labelColor, labelSize, active, select, style, onClick, onMouseMove, onMouseEnter, onMouseLeave, ...rest }: H3LayerProps): JSX_2.Element;
|
|
1934
|
+
|
|
1935
|
+
export declare interface H3LayerProps extends Omit<LayerSchema, 'type' | 'source' | 'sourceType' | 'sourceConfig' | 'shape' | 'shapeField' | 'shapeValues'> {
|
|
1936
|
+
source: H3DataItem[];
|
|
1937
|
+
h3Field?: string;
|
|
1938
|
+
showStroke?: boolean;
|
|
1939
|
+
strokeColor?: string;
|
|
1940
|
+
strokeWidth?: number;
|
|
1941
|
+
hoverEffect?: boolean;
|
|
1942
|
+
clickEffect?: boolean;
|
|
1943
|
+
showLabel?: boolean;
|
|
1944
|
+
labelField?: string;
|
|
1945
|
+
labelColor?: string;
|
|
1946
|
+
labelSize?: number;
|
|
1947
|
+
onClick?: (payload: LayerEventPayload) => void;
|
|
1948
|
+
onMouseMove?: (payload: LayerEventPayload) => void;
|
|
1949
|
+
onMouseEnter?: (payload: LayerEventPayload) => void;
|
|
1950
|
+
onMouseLeave?: (payload: LayerEventPayload) => void;
|
|
1951
|
+
}
|
|
1952
|
+
|
|
1920
1953
|
/**
|
|
1921
1954
|
* 热力图图层组件
|
|
1922
1955
|
*
|
|
@@ -2068,18 +2101,18 @@ export declare interface ImageCalibrationControlProps {
|
|
|
2068
2101
|
/** 额外 style */
|
|
2069
2102
|
style?: React.CSSProperties;
|
|
2070
2103
|
/** 角点变化回调 */
|
|
2071
|
-
onCornersChange?: (corners: GeoCorners) => void;
|
|
2104
|
+
onCornersChange?: (imageId: string, corners: GeoCorners) => void;
|
|
2072
2105
|
/** 确认配准回调 */
|
|
2073
|
-
onCalibrate?: (result: CalibrationResult) => void;
|
|
2106
|
+
onCalibrate?: (imageId: string, result: CalibrationResult) => void;
|
|
2074
2107
|
/** 导出完成回调 */
|
|
2075
|
-
onExport?: (result: ExportResult) => void;
|
|
2108
|
+
onExport?: (imageId: string, result: ExportResult) => void;
|
|
2076
2109
|
/** 图片加载完成回调 */
|
|
2077
|
-
onImageLoad?: (dimensions: {
|
|
2110
|
+
onImageLoad?: (imageId: string, dimensions: {
|
|
2078
2111
|
width: number;
|
|
2079
2112
|
height: number;
|
|
2080
2113
|
}) => void;
|
|
2081
2114
|
/** 裁剪预处理完成回调,返回裁剪后的尺寸和可选的初始坐标 */
|
|
2082
|
-
onPreprocess?: (result: {
|
|
2115
|
+
onPreprocess?: (imageId: string, result: {
|
|
2083
2116
|
croppedDimensions: {
|
|
2084
2117
|
width: number;
|
|
2085
2118
|
height: number;
|
|
@@ -2087,16 +2120,36 @@ export declare interface ImageCalibrationControlProps {
|
|
|
2087
2120
|
initialCorners: GeoCorners | null;
|
|
2088
2121
|
}) => void;
|
|
2089
2122
|
/** 清除回调 */
|
|
2090
|
-
onClear?: () => void;
|
|
2123
|
+
onClear?: (imageId: string) => void;
|
|
2124
|
+
/** 图片列表变化回调 */
|
|
2125
|
+
onImagesChange?: (images: RegisteredImage[]) => void;
|
|
2126
|
+
/** 切换图片回调 */
|
|
2127
|
+
onImageSwitch?: (imageId: string) => void;
|
|
2128
|
+
/** 图片重命名回调 */
|
|
2129
|
+
onImageRename?: (imageId: string, oldName: string, newName: string) => void;
|
|
2130
|
+
/** 图片列表拖拽排序回调 */
|
|
2131
|
+
onImagesReorder?: (images: RegisteredImage[]) => void;
|
|
2132
|
+
/** 上传新图片回调 */
|
|
2133
|
+
onImageAdd?: (image: RegisteredImage) => void;
|
|
2134
|
+
/** 删除图片回调 */
|
|
2135
|
+
onImageRemove?: (imageId: string) => void;
|
|
2091
2136
|
}
|
|
2092
2137
|
|
|
2093
2138
|
/** 命令式 Handle */
|
|
2094
2139
|
export declare interface ImageCalibrationHandle {
|
|
2095
2140
|
getCorners(): GeoCorners | null;
|
|
2096
2141
|
setCorners(corners: GeoCorners): void;
|
|
2097
|
-
setImage(source: ImageSource): void;
|
|
2142
|
+
setImage(source: ImageSource, initialCorners?: GeoCorners | null): void;
|
|
2098
2143
|
exportImage(config?: ExportConfig): Promise<ExportResult>;
|
|
2099
2144
|
clear(): void;
|
|
2145
|
+
/** 获取所有已注册的图片列表 */
|
|
2146
|
+
getImages(): RegisteredImage[];
|
|
2147
|
+
/** 切换激活图片 */
|
|
2148
|
+
switchImage(id: string): void;
|
|
2149
|
+
/** 删除指定图片 */
|
|
2150
|
+
deleteImage(id: string): void;
|
|
2151
|
+
/** 获取当前激活图片 ID */
|
|
2152
|
+
getActiveImageId(): string | null;
|
|
2100
2153
|
}
|
|
2101
2154
|
|
|
2102
2155
|
/**
|
|
@@ -3103,6 +3156,31 @@ export declare interface RasterLayerProps extends Omit<LayerSchema, 'type' | 'so
|
|
|
3103
3156
|
*/
|
|
3104
3157
|
export declare type RasterRenderMode = 'raster' | 'rgb' | 'ndi';
|
|
3105
3158
|
|
|
3159
|
+
/** 单张配准图片(多图管理) */
|
|
3160
|
+
declare interface RegisteredImage {
|
|
3161
|
+
id: string;
|
|
3162
|
+
name: string;
|
|
3163
|
+
/** 图片来源(File 或 URL),用于重新加载 */
|
|
3164
|
+
source: ImageSource;
|
|
3165
|
+
/** 缩略图 URL */
|
|
3166
|
+
thumbnailUrl: string;
|
|
3167
|
+
/** 图片尺寸 */
|
|
3168
|
+
dimensions: {
|
|
3169
|
+
width: number;
|
|
3170
|
+
height: number;
|
|
3171
|
+
} | null;
|
|
3172
|
+
/** 当前阶段 */
|
|
3173
|
+
phase: CalibrationPhase;
|
|
3174
|
+
/** 当前角点 */
|
|
3175
|
+
corners: GeoCorners | null;
|
|
3176
|
+
/** 透明度 0-1 */
|
|
3177
|
+
opacity: number;
|
|
3178
|
+
/** 需要释放的 ObjectURL */
|
|
3179
|
+
revokeUrl: (() => void) | null;
|
|
3180
|
+
/** 裁剪产生的额外 URL 需要释放 */
|
|
3181
|
+
croppedRevokeUrl: (() => void) | null;
|
|
3182
|
+
}
|
|
3183
|
+
|
|
3106
3184
|
declare type ResolvedMapSchema = MapSchema & {
|
|
3107
3185
|
basemap: NonNullable<MapSchema['basemap']>;
|
|
3108
3186
|
center: NonNullable<MapSchema['center']>;
|
|
@@ -3152,7 +3230,7 @@ export declare interface ResponsiveSchema {
|
|
|
3152
3230
|
* />
|
|
3153
3231
|
* ```
|
|
3154
3232
|
*/
|
|
3155
|
-
export declare function RouteLayer({ path, segments, stops, routeType, onRouteQuery, onRouteResult, color, lineWidth, opacity, glow, animate, animateSpeed, stopSize, stopColor, endColor, showStopIndex, stopRenderer, stopMarkerVariant, stopIconMap, stopIconField, stopIconSize, stopIconAnchor, showStopPopup, activeColor, onPathClick, onStopClick, }: RouteLayerProps): JSX_2.Element | null;
|
|
3233
|
+
export declare function RouteLayer({ path, segments, stops, routeType, onRouteQuery, onRouteResult, color, lineWidth, opacity, glow, animate, animateSpeed, stopSize, stopColor, endColor, showStopIndex, showStopName, stopNameColor, stopNameSize, stopRenderer, stopMarkerVariant, stopIconMap, stopIconField, stopIconSize, stopIconAnchor, showStopPopup, activeColor, onPathClick, onStopClick, }: RouteLayerProps): JSX_2.Element | null;
|
|
3156
3234
|
|
|
3157
3235
|
export declare interface RouteLayerProps {
|
|
3158
3236
|
/** 路径坐标 — 完整线坐标或分段 */
|
|
@@ -3187,6 +3265,12 @@ export declare interface RouteLayerProps {
|
|
|
3187
3265
|
endColor?: string;
|
|
3188
3266
|
/** 是否显示途经点序号,默认 true */
|
|
3189
3267
|
showStopIndex?: boolean;
|
|
3268
|
+
/** 是否显示途经点名称,默认 true */
|
|
3269
|
+
showStopName?: boolean;
|
|
3270
|
+
/** 名称文字颜色,默认 '#334155' */
|
|
3271
|
+
stopNameColor?: string;
|
|
3272
|
+
/** 名称文字大小,默认 11 */
|
|
3273
|
+
stopNameSize?: number;
|
|
3190
3274
|
/** 停留点渲染模式,默认 'point' */
|
|
3191
3275
|
stopRenderer?: 'point' | 'marker' | 'icon';
|
|
3192
3276
|
/** marker 模式下的默认变体,默认 'circle' */
|