HawkEye 鹰眼
演练场
引入
ts
import { HawkEye } from "@m-tech/gis-core";
new HawkEye({ id: "HawkEye" }).addToViewer(viewer);入参
| 参数名称 | 类型 | 必填 | 默认值 | 描述 |
|---|---|---|---|---|
| options | Object | 是 | - | 配置 |
| options.id | string | number | 否 | - | 唯一标识 |
| options.hawkEyeViewerOptions | ViewerOptions | 否 | - | 鹰眼视图配置 |
| options.customClass | string | 否 | "" | 自定义样式 |
示例
ts
import {
HawkEye,
Viewer,
ImageryProviderType,
ImageryType,
} from "@m-tech/gis-core";
const viewer = new Viewer("container");
// 加载鹰眼
const hawk = new HawkEye({
id: "HawkEye",
hawkEyeViewerOptions: {
// 高德地图
imageryProviderType: ImageryProviderType.AMap,
// 矢量标注图
imageryType: ImageryType.VEC,
},
}).addToViewer(viewer);
// 隐藏
hawk.hide();
// 移除
hawk.remove();