my-openlayer 2.4.9 → 2.4.12
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/CHANGELOG.md +9 -53
- package/LICENSE +21 -21
- package/README.md +43 -8
- package/core/MapBaseLayers.js +7 -9
- package/core/Point.d.ts +18 -1
- package/core/Point.js +201 -1
- package/docs/.vitepress/dist/404.html +22 -0
- package/docs/.vitepress/dist/ConfigManager.html +46 -0
- package/docs/.vitepress/dist/ErrorHandler.html +52 -0
- package/docs/.vitepress/dist/EventManager.html +58 -0
- package/docs/.vitepress/dist/Line.html +92 -0
- package/docs/.vitepress/dist/MapBaseLayers.html +52 -0
- package/docs/.vitepress/dist/MapTools.html +81 -0
- package/docs/.vitepress/dist/MeasureHandler.html +32 -0
- package/docs/.vitepress/dist/MyOl.html +62 -0
- package/docs/.vitepress/dist/Point.html +81 -0
- package/docs/.vitepress/dist/Polygon.html +102 -0
- package/docs/.vitepress/dist/RiverLayerManager.html +66 -0
- package/docs/.vitepress/dist/SelectHandler.html +46 -0
- package/docs/.vitepress/dist/ValidationUtils.html +47 -0
- package/docs/.vitepress/dist/VueTemplatePoint.html +112 -0
- package/docs/.vitepress/dist/assets/ConfigManager.md.BOMdGTaa.js +22 -0
- package/docs/.vitepress/dist/assets/ConfigManager.md.BOMdGTaa.lean.js +1 -0
- package/docs/.vitepress/dist/assets/ErrorHandler.md.yUiuJ9w9.js +28 -0
- package/docs/.vitepress/dist/assets/ErrorHandler.md.yUiuJ9w9.lean.js +1 -0
- package/docs/.vitepress/dist/assets/EventManager.md.BhCUVy1f.js +34 -0
- package/docs/.vitepress/dist/assets/EventManager.md.BhCUVy1f.lean.js +1 -0
- package/docs/.vitepress/dist/assets/Line.md.BAQOzmSt.js +68 -0
- package/docs/.vitepress/dist/assets/Line.md.BAQOzmSt.lean.js +1 -0
- package/docs/.vitepress/dist/assets/MapBaseLayers.md.Bw0L_m0b.js +28 -0
- package/docs/.vitepress/dist/assets/MapBaseLayers.md.Bw0L_m0b.lean.js +1 -0
- package/docs/.vitepress/dist/assets/MapTools.md.DaYgiDPe.js +57 -0
- package/docs/.vitepress/dist/assets/MapTools.md.DaYgiDPe.lean.js +1 -0
- package/docs/.vitepress/dist/assets/MeasureHandler.md.7Sf4ymRv.js +8 -0
- package/docs/.vitepress/dist/assets/MeasureHandler.md.7Sf4ymRv.lean.js +1 -0
- package/docs/.vitepress/dist/assets/MyOl.md.D-14Gzjy.js +38 -0
- package/docs/.vitepress/dist/assets/MyOl.md.D-14Gzjy.lean.js +1 -0
- package/docs/.vitepress/dist/assets/Point.md.Bi9juuuv.js +57 -0
- package/docs/.vitepress/dist/assets/Point.md.Bi9juuuv.lean.js +1 -0
- package/docs/.vitepress/dist/assets/Polygon.md.-JIqEvzD.js +78 -0
- package/docs/.vitepress/dist/assets/Polygon.md.-JIqEvzD.lean.js +1 -0
- package/docs/.vitepress/dist/assets/RiverLayerManager.md.CfUu2RxH.js +42 -0
- package/docs/.vitepress/dist/assets/RiverLayerManager.md.CfUu2RxH.lean.js +1 -0
- package/docs/.vitepress/dist/assets/SelectHandler.md.COR4ez_p.js +22 -0
- package/docs/.vitepress/dist/assets/SelectHandler.md.COR4ez_p.lean.js +1 -0
- package/docs/.vitepress/dist/assets/ValidationUtils.md.ReTVWa73.js +23 -0
- package/docs/.vitepress/dist/assets/ValidationUtils.md.ReTVWa73.lean.js +1 -0
- package/docs/.vitepress/dist/assets/VueTemplatePoint.md.CtxSb5Pm.js +88 -0
- package/docs/.vitepress/dist/assets/VueTemplatePoint.md.CtxSb5Pm.lean.js +1 -0
- package/docs/.vitepress/dist/assets/app.YvjVuxaB.js +1 -0
- package/docs/.vitepress/dist/assets/chunks/framework.C_W0ODpn.js +18 -0
- package/docs/.vitepress/dist/assets/chunks/theme.Bf87fILP.js +1 -0
- package/docs/.vitepress/dist/assets/index.md.BJz6tHSr.js +26 -0
- package/docs/.vitepress/dist/assets/index.md.BJz6tHSr.lean.js +1 -0
- package/docs/.vitepress/dist/assets/inter-italic-cyrillic-ext.r48I6akx.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-italic-cyrillic.By2_1cv3.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-italic-greek-ext.1u6EdAuj.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-italic-greek.DJ8dCoTZ.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-italic-latin-ext.CN1xVJS-.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-italic-latin.C2AdPX0b.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-italic-vietnamese.BSbpV94h.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-roman-cyrillic.C5lxZ8CY.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-roman-greek-ext.CqjqNYQ-.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-roman-greek.BBVDIX6e.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-roman-latin-ext.4ZJIpNVo.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-roman-latin.Di8DUHzh.woff2 +0 -0
- package/docs/.vitepress/dist/assets/inter-roman-vietnamese.BjW4sHH5.woff2 +0 -0
- package/docs/.vitepress/dist/assets/style.C2pAQzDq.css +1 -0
- package/docs/.vitepress/dist/hashmap.json +1 -0
- package/docs/.vitepress/dist/index.html +50 -0
- package/docs/.vitepress/dist/vp-icons.css +1 -0
- package/docs/Point.md +97 -29
- package/docs/index.md +6 -5
- package/index.d.ts +2 -2
- package/package.json +1 -1
- package/types.d.ts +59 -0
- package/core/DomPoint.d.ts +0 -21
- package/core/DomPoint.js +0 -36
- package/docs/.vitepress/cache/deps/@theme_index.js +0 -275
- package/docs/.vitepress/cache/deps/@theme_index.js.map +0 -7
- package/docs/.vitepress/cache/deps/_metadata.json +0 -40
- package/docs/.vitepress/cache/deps/chunk-LW4I4DCF.js +0 -12542
- package/docs/.vitepress/cache/deps/chunk-LW4I4DCF.js.map +0 -7
- package/docs/.vitepress/cache/deps/chunk-Z5QSWKN2.js +0 -9719
- package/docs/.vitepress/cache/deps/chunk-Z5QSWKN2.js.map +0 -7
- package/docs/.vitepress/cache/deps/package.json +0 -3
- package/docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js +0 -4505
- package/docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js.map +0 -7
- package/docs/.vitepress/cache/deps/vitepress___@vueuse_core.js +0 -583
- package/docs/.vitepress/cache/deps/vitepress___@vueuse_core.js.map +0 -7
- package/docs/.vitepress/cache/deps/vue.js +0 -343
- package/docs/.vitepress/cache/deps/vue.js.map +0 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,64 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## [2.4.
|
|
3
|
+
## [2.4.12] - 2026-04-21
|
|
4
4
|
|
|
5
|
-
###
|
|
6
|
-
|
|
7
|
-
- **TwinkleItem:** 支持自定义闪烁点DOM元素
|
|
8
|
-
- **SelectHandler:** 重构选择交互以支持独立样式渲染和多选隔离
|
|
9
|
-
- 重构Polygon样式处理并添加示例组件
|
|
10
|
-
- **core:** 添加基于GeoJSON数据的地图定位功能
|
|
11
|
-
- **core:** 添加地图定位功能并重构点位相关方法
|
|
12
|
-
- **Point:** 添加闪烁点功能及示例
|
|
13
|
-
- **core:** 为Polygon添加layerName选项并调整图层添加逻辑
|
|
14
|
-
- **Point:** 添加setOneVisibleByProp方法控制点显示
|
|
15
|
-
- **Polygon:** 优化遮罩功能支持多几何图形处理
|
|
16
|
-
- **测量工具:** 添加测量距离和面积功能及工具栏样式
|
|
17
|
-
- **地图:** 添加自定义投影配置支持
|
|
18
|
-
- **日志管理:** 实现统一日志开关与级别控制
|
|
19
|
-
- **SelectHandler:** 新增要素选择处理器模块
|
|
20
|
-
- upgrade OpenLayers to v10.6.1 and update project to v2.0.0
|
|
21
|
-
- update MapBaseLayers to handle optional token and improve annotation layer management
|
|
22
|
-
- 重新添加已清理的App.vue文件,移除了所有敏感token信息
|
|
23
|
-
- 重构Vue模板点位功能并优化事件管理
|
|
24
|
-
- **Polygon:** 改进图像图层处理逻辑并添加更新功能
|
|
25
|
-
- 添加验证工具类并重构现有验证逻辑
|
|
26
|
-
- **地图工具:** 重构地图工具类并增强错误处理
|
|
27
|
-
- 重构类型系统并增强核心功能
|
|
28
|
-
|
|
29
|
-
### 🐛 Bug Fixes
|
|
30
|
-
|
|
31
|
-
- **core:** 改进Vue依赖检测逻辑并更新版本号
|
|
32
|
-
- **VueTemplatePoint:** 修复Vue3环境下pointData的类型定义
|
|
33
|
-
- **core:** 修正Line类中layerName属性设置错误
|
|
34
|
-
- resolve TypeScript build error in MapBaseLayers.ts
|
|
35
|
-
|
|
36
|
-
### ⚡ Performance
|
|
37
|
-
|
|
38
|
-
- **Polygon:** 优化GeoJSON解析性能,直接注入layerName
|
|
5
|
+
### Features
|
|
39
6
|
|
|
40
|
-
|
|
7
|
+
- **Point:** 新增 `addPulsePointLayer`,使用 `VectorLayer` 和单个 `requestAnimationFrame` 支持大量高性能闪烁点。
|
|
8
|
+
- **Point:** 高性能闪烁点参数对齐 `addPoint`,支持 `img`、`scale`、`iconColor`、`textKey`、`textVisible` 等常用配置。
|
|
9
|
+
- **examples:** 新增高性能闪烁点示例和村庄点位 SVG 图标。
|
|
41
10
|
|
|
42
|
-
|
|
43
|
-
- **ConfigManager:** 集中管理默认配置并移除无用接口
|
|
44
|
-
- **样式处理:** 统一处理自定义样式逻辑并修复代码格式
|
|
45
|
-
- 将nameKey重命名为textKey以提高语义清晰度
|
|
46
|
-
- 更新依赖项并优化类型导出结构
|
|
47
|
-
- **core:** 重构DomPoint和MapBaseLayers类,优化代码结构和功能
|
|
11
|
+
### Documentation
|
|
48
12
|
|
|
49
|
-
|
|
13
|
+
- 更新 README、VitePress docs 和 Codex skill 文档,补充 `addPulsePointLayer` 用法。
|
|
50
14
|
|
|
51
|
-
-
|
|
52
|
-
- 添加技能文档系统并更新项目文档结构
|
|
53
|
-
- add vitepress documentation and github actions workflow
|
|
54
|
-
- 添加详细模块文档并更新发布配置
|
|
55
|
-
- update README with branch strategy and add migration guide
|
|
15
|
+
## [2.4.8] - 2026-01-30
|
|
56
16
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
## [2.4.8] - 2026-01-30
|
|
60
|
-
|
|
61
|
-
### ✨ Features
|
|
17
|
+
### ✨ Features
|
|
62
18
|
|
|
63
19
|
- **SelectHandler:** 重构选择交互以支持独立样式渲染和多选隔离
|
|
64
20
|
- 重构Polygon样式处理并添加示例组件
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 cuteyuchen
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 cuteyuchen
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -22,8 +22,8 @@ my-openlayer 是一个基于 [OpenLayers](https://openlayers.org/) 的现代地
|
|
|
22
22
|
- 地图裁剪与自定义范围显示
|
|
23
23
|
- 支持 GeoServer WMS 图层
|
|
24
24
|
|
|
25
|
-
- **📍 要素操作**
|
|
26
|
-
- **点位管理 (Point)
|
|
25
|
+
- **📍 要素操作**
|
|
26
|
+
- **点位管理 (Point)**:点位标注(自定义图标、聚合、DOM 闪烁、高性能矢量闪烁)
|
|
27
27
|
- **线要素绘制 (Line)**:线要素绘制(虚线、样式自定义)
|
|
28
28
|
- **面要素 (Polygon)**:面要素绘制、分区高亮、遮罩层
|
|
29
29
|
- **Vue组件支持 (VueTemplatePoint)**:支持将 Vue 组件作为地图点位渲染
|
|
@@ -84,11 +84,46 @@ const line = map.getLine();
|
|
|
84
84
|
const polygon = map.getPolygon();
|
|
85
85
|
|
|
86
86
|
// 添加点位
|
|
87
|
-
point.addPoint([{ lgtd: 119.81, lttd: 29.969, name: '示例点' }], {
|
|
88
|
-
layerName: 'example-point',
|
|
89
|
-
img: 'marker.png'
|
|
90
|
-
});
|
|
91
|
-
```
|
|
87
|
+
point.addPoint([{ lgtd: 119.81, lttd: 29.969, name: '示例点' }], {
|
|
88
|
+
layerName: 'example-point',
|
|
89
|
+
img: 'marker.png'
|
|
90
|
+
});
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### 3. 添加高性能闪烁点
|
|
94
|
+
|
|
95
|
+
当需要展示大量预警点位时,优先使用 `addPulsePointLayer`。它与 `addPoint` 保持一致的 `img`、`scale`、`textKey` 等参数习惯,通过单个 `requestAnimationFrame` 驱动整个 `VectorLayer`,避免为每个点创建 DOM 动画。
|
|
96
|
+
|
|
97
|
+
```typescript
|
|
98
|
+
const pulseLayer = point.addPulsePointLayer(
|
|
99
|
+
[
|
|
100
|
+
{ lgtd: 119.81, lttd: 29.969, lev: 0, stnm: '风险村' },
|
|
101
|
+
{ lgtd: 119.86, lttd: 29.992, lev: 3, stnm: '普通村' }
|
|
102
|
+
],
|
|
103
|
+
{
|
|
104
|
+
layerName: 'village-pulse',
|
|
105
|
+
levelKey: 'lev',
|
|
106
|
+
textKey: 'stnm',
|
|
107
|
+
img: '/icons/village.svg',
|
|
108
|
+
scale: 0.8,
|
|
109
|
+
textVisible: true,
|
|
110
|
+
pulse: {
|
|
111
|
+
duration: 2400,
|
|
112
|
+
radius: [8, 28],
|
|
113
|
+
colorMap: {
|
|
114
|
+
0: 'rgba(255, 48, 54, 0.48)',
|
|
115
|
+
1: 'rgba(255, 136, 0, 0.45)',
|
|
116
|
+
2: 'rgba(253, 216, 46, 0.4)',
|
|
117
|
+
3: 'rgba(6, 183, 253, 0.32)'
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
);
|
|
122
|
+
|
|
123
|
+
pulseLayer?.stop();
|
|
124
|
+
pulseLayer?.start();
|
|
125
|
+
pulseLayer?.remove();
|
|
126
|
+
```
|
|
92
127
|
|
|
93
128
|
## 文档索引
|
|
94
129
|
|
|
@@ -102,7 +137,7 @@ point.addPoint([{ lgtd: 119.81, lttd: 29.969, name: '示例点' }], {
|
|
|
102
137
|
- **[ErrorHandler](docs/ErrorHandler.md)**: 错误处理。
|
|
103
138
|
|
|
104
139
|
### 要素操作
|
|
105
|
-
- **[Point](docs/Point.md)**: 点要素(含聚合、DOM
|
|
140
|
+
- **[Point](docs/Point.md)**: 点要素(含聚合、DOM 点位、高性能闪烁点)。
|
|
106
141
|
- **[Line](docs/Line.md)**: 线要素。
|
|
107
142
|
- **[Polygon](docs/Polygon.md)**: 面要素(含热力图、图片层)。
|
|
108
143
|
- **[VueTemplatePoint](docs/VueTemplatePoint.md)**: Vue 组件点位。
|
package/core/MapBaseLayers.js
CHANGED
|
@@ -69,20 +69,18 @@ export default class MapBaseLayers {
|
|
|
69
69
|
*/
|
|
70
70
|
initializeLayers() {
|
|
71
71
|
const { layers, token, annotation } = this.options;
|
|
72
|
+
this.layers = {};
|
|
73
|
+
if (token) {
|
|
74
|
+
this.initTiandituLayers();
|
|
75
|
+
}
|
|
72
76
|
// 初始化底图配置
|
|
73
77
|
if (Array.isArray(layers)) {
|
|
74
|
-
this.layers
|
|
78
|
+
this.layers[CUSTOM_LAYER_KEY] = layers;
|
|
75
79
|
}
|
|
76
80
|
else if (layers && Object.keys(layers).length > 0) {
|
|
77
|
-
this.layers = layers;
|
|
78
|
-
}
|
|
79
|
-
else if (token) {
|
|
80
|
-
// 如果没有提供layers但提供了token,则初始化标准天地图
|
|
81
|
-
this.initTiandituLayers();
|
|
82
|
-
}
|
|
83
|
-
else {
|
|
84
|
-
this.layers = {};
|
|
81
|
+
this.layers = { ...this.layers, ...layers };
|
|
85
82
|
}
|
|
83
|
+
// 如果没有提供layers但提供了token,则初始化标准天地图
|
|
86
84
|
// 初始化注记配置
|
|
87
85
|
if (annotation) {
|
|
88
86
|
this.initAnnotationLayer();
|
package/core/Point.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import Map from "ol/Map";
|
|
|
2
2
|
import Overlay from 'ol/Overlay';
|
|
3
3
|
import VectorLayer from "ol/layer/Vector";
|
|
4
4
|
import VectorSource from "ol/source/Vector";
|
|
5
|
-
import { PointOptions, ClusterOptions, PointData, VueTemplatePointInstance, TwinkleItem } from '../types';
|
|
5
|
+
import { PointOptions, ClusterOptions, PointData, VueTemplatePointInstance, TwinkleItem, PulsePointOptions, PulsePointLayerHandle } from '../types';
|
|
6
6
|
export default class Point {
|
|
7
7
|
private map;
|
|
8
8
|
constructor(map: Map);
|
|
@@ -37,6 +37,16 @@ export default class Point {
|
|
|
37
37
|
* @returns 样式对象
|
|
38
38
|
*/
|
|
39
39
|
private createClusterStyle;
|
|
40
|
+
/**
|
|
41
|
+
* 将颜色透明度按动画进度衰减。
|
|
42
|
+
* @private
|
|
43
|
+
*/
|
|
44
|
+
private withOpacity;
|
|
45
|
+
/**
|
|
46
|
+
* 创建高性能闪烁点要素。
|
|
47
|
+
* @private
|
|
48
|
+
*/
|
|
49
|
+
private createPulsePointFeatures;
|
|
40
50
|
/**
|
|
41
51
|
* 配置图层属性
|
|
42
52
|
* @private
|
|
@@ -55,6 +65,13 @@ export default class Point {
|
|
|
55
65
|
*/
|
|
56
66
|
addPoint(pointData: PointData[], options: PointOptions): VectorLayer<VectorSource> | null;
|
|
57
67
|
addClusterPoint(pointData: PointData[], options: ClusterOptions): VectorLayer<VectorSource> | null;
|
|
68
|
+
/**
|
|
69
|
+
* 添加高性能闪烁点图层。
|
|
70
|
+
*
|
|
71
|
+
* 与 addDomPoint 不同,该方法使用 VectorLayer 批量渲染点位,并通过单个
|
|
72
|
+
* requestAnimationFrame 驱动闪烁圈,适合村庄预警等大量点位场景。
|
|
73
|
+
*/
|
|
74
|
+
addPulsePointLayer(pointData: PointData[], options: PulsePointOptions): PulsePointLayerHandle | null;
|
|
58
75
|
/**
|
|
59
76
|
* 添加闪烁点
|
|
60
77
|
* @param twinkleList 闪烁点数据
|
package/core/Point.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import Overlay from 'ol/Overlay';
|
|
3
3
|
import Feature from "ol/Feature";
|
|
4
4
|
import { Point as olPoint } from "ol/geom";
|
|
5
|
-
import { Text, Style, Fill, Stroke, Icon } from "ol/style";
|
|
5
|
+
import { Text, Style, Fill, Stroke, Icon, Circle as CircleStyle } from "ol/style";
|
|
6
6
|
import VectorLayer from "ol/layer/Vector";
|
|
7
7
|
import VectorSource from "ol/source/Vector";
|
|
8
8
|
import { Cluster } from 'ol/source';
|
|
@@ -86,6 +86,48 @@ export default class Point {
|
|
|
86
86
|
}
|
|
87
87
|
return new Style(style);
|
|
88
88
|
}
|
|
89
|
+
/**
|
|
90
|
+
* 将颜色透明度按动画进度衰减。
|
|
91
|
+
* @private
|
|
92
|
+
*/
|
|
93
|
+
withOpacity(color, opacity) {
|
|
94
|
+
const safeOpacity = Math.max(0, Math.min(1, opacity));
|
|
95
|
+
const rgbaMatch = color.match(/^rgba?\(([^)]+)\)$/i);
|
|
96
|
+
if (rgbaMatch) {
|
|
97
|
+
const parts = rgbaMatch[1].split(',').map(part => part.trim());
|
|
98
|
+
if (parts.length >= 3) {
|
|
99
|
+
const alpha = parts.length >= 4 ? Number(parts[3]) : 1;
|
|
100
|
+
const nextAlpha = Number.isFinite(alpha) ? alpha * safeOpacity : safeOpacity;
|
|
101
|
+
return `rgba(${parts[0]}, ${parts[1]}, ${parts[2]}, ${nextAlpha})`;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
if (/^#[0-9a-f]{6}$/i.test(color)) {
|
|
105
|
+
const red = parseInt(color.slice(1, 3), 16);
|
|
106
|
+
const green = parseInt(color.slice(3, 5), 16);
|
|
107
|
+
const blue = parseInt(color.slice(5, 7), 16);
|
|
108
|
+
return `rgba(${red}, ${green}, ${blue}, ${safeOpacity})`;
|
|
109
|
+
}
|
|
110
|
+
return color;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* 创建高性能闪烁点要素。
|
|
114
|
+
* @private
|
|
115
|
+
*/
|
|
116
|
+
createPulsePointFeatures(pointData, options) {
|
|
117
|
+
const pointFeatureList = [];
|
|
118
|
+
pointData.forEach(item => {
|
|
119
|
+
if (!ValidationUtils.validateCoordinates(item)) {
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
pointFeatureList.push(new Feature({
|
|
123
|
+
rawData: item,
|
|
124
|
+
type: options.layerName,
|
|
125
|
+
layerName: options.layerName,
|
|
126
|
+
geometry: new olPoint([item.lgtd, item.lttd])
|
|
127
|
+
}));
|
|
128
|
+
});
|
|
129
|
+
return pointFeatureList;
|
|
130
|
+
}
|
|
89
131
|
/**
|
|
90
132
|
* 配置图层属性
|
|
91
133
|
* @private
|
|
@@ -189,6 +231,164 @@ export default class Point {
|
|
|
189
231
|
this.configureLayer(clusterLayer, options);
|
|
190
232
|
return clusterLayer;
|
|
191
233
|
}
|
|
234
|
+
/**
|
|
235
|
+
* 添加高性能闪烁点图层。
|
|
236
|
+
*
|
|
237
|
+
* 与 addDomPoint 不同,该方法使用 VectorLayer 批量渲染点位,并通过单个
|
|
238
|
+
* requestAnimationFrame 驱动闪烁圈,适合村庄预警等大量点位场景。
|
|
239
|
+
*/
|
|
240
|
+
addPulsePointLayer(pointData, options) {
|
|
241
|
+
if (!ValidationUtils.validatePointData(pointData)) {
|
|
242
|
+
return null;
|
|
243
|
+
}
|
|
244
|
+
const pulseOptions = {
|
|
245
|
+
enabled: options.pulse?.enabled ?? true,
|
|
246
|
+
duration: options.pulse?.duration ?? 2400,
|
|
247
|
+
radius: options.pulse?.radius ?? [8, 26],
|
|
248
|
+
colorMap: options.pulse?.colorMap ?? {
|
|
249
|
+
0: 'rgba(255, 48, 54, 0.45)',
|
|
250
|
+
1: 'rgba(255, 136, 0, 0.45)',
|
|
251
|
+
2: 'rgba(253, 216, 46, 0.38)',
|
|
252
|
+
3: 'rgba(6, 183, 253, 0.3)'
|
|
253
|
+
},
|
|
254
|
+
strokeColorMap: options.pulse?.strokeColorMap,
|
|
255
|
+
strokeWidth: options.pulse?.strokeWidth ?? 0,
|
|
256
|
+
frameCount: Math.max(1, options.pulse?.frameCount ?? 24)
|
|
257
|
+
};
|
|
258
|
+
const levelKey = options.levelKey ?? 'lev';
|
|
259
|
+
const pulseStyleCache = new globalThis.Map();
|
|
260
|
+
const staticStyleCache = new globalThis.Map();
|
|
261
|
+
let frameIndex = 0;
|
|
262
|
+
let renderedFrameIndex = -1;
|
|
263
|
+
let rafId = null;
|
|
264
|
+
let running = false;
|
|
265
|
+
const source = new VectorSource({
|
|
266
|
+
features: this.createPulsePointFeatures(pointData, options)
|
|
267
|
+
});
|
|
268
|
+
const createStyles = (feature) => {
|
|
269
|
+
const rawData = feature.get('rawData');
|
|
270
|
+
const level = rawData?.[levelKey] ?? 'default';
|
|
271
|
+
const progress = frameIndex / Math.max(1, pulseOptions.frameCount - 1);
|
|
272
|
+
const [minRadius, maxRadius] = pulseOptions.radius;
|
|
273
|
+
const radius = minRadius + (maxRadius - minRadius) * progress;
|
|
274
|
+
const opacity = 1 - progress;
|
|
275
|
+
const fillColor = pulseOptions.colorMap[level] ?? pulseOptions.colorMap.default ?? 'rgba(6, 183, 253, 0.32)';
|
|
276
|
+
const strokeColor = pulseOptions.strokeColorMap?.[level] ?? pulseOptions.strokeColorMap?.default;
|
|
277
|
+
const styles = [];
|
|
278
|
+
if (pulseOptions.enabled) {
|
|
279
|
+
const pulseCacheKey = `${level}_${frameIndex}`;
|
|
280
|
+
let pulseStyle = pulseStyleCache.get(pulseCacheKey);
|
|
281
|
+
if (!pulseStyle) {
|
|
282
|
+
pulseStyle = new Style({
|
|
283
|
+
zIndex: 0,
|
|
284
|
+
image: new CircleStyle({
|
|
285
|
+
radius,
|
|
286
|
+
fill: new Fill({ color: this.withOpacity(fillColor, opacity) }),
|
|
287
|
+
stroke: strokeColor && pulseOptions.strokeWidth > 0
|
|
288
|
+
? new Stroke({ color: this.withOpacity(strokeColor, opacity), width: pulseOptions.strokeWidth })
|
|
289
|
+
: undefined
|
|
290
|
+
})
|
|
291
|
+
});
|
|
292
|
+
pulseStyleCache.set(pulseCacheKey, pulseStyle);
|
|
293
|
+
}
|
|
294
|
+
styles.push(pulseStyle);
|
|
295
|
+
}
|
|
296
|
+
const text = options.textVisible && options.textKey && rawData ? rawData[options.textKey] ?? '' : '';
|
|
297
|
+
const staticCacheKey = [
|
|
298
|
+
options.img ?? options.icon?.src ?? '',
|
|
299
|
+
options.scale ?? options.icon?.scale ?? ConfigManager.DEFAULT_POINT_ICON_SCALE,
|
|
300
|
+
options.iconColor ?? options.icon?.color ?? '',
|
|
301
|
+
text
|
|
302
|
+
].join('|');
|
|
303
|
+
let pointStyle = staticStyleCache.get(staticCacheKey);
|
|
304
|
+
if (pointStyle) {
|
|
305
|
+
styles.push(pointStyle);
|
|
306
|
+
return styles;
|
|
307
|
+
}
|
|
308
|
+
const pointStyleOptions = {};
|
|
309
|
+
const iconSrc = options.img ?? options.icon?.src;
|
|
310
|
+
if (iconSrc) {
|
|
311
|
+
pointStyleOptions.image = new Icon({
|
|
312
|
+
src: iconSrc,
|
|
313
|
+
scale: options.scale ?? options.icon?.scale ?? ConfigManager.DEFAULT_POINT_ICON_SCALE,
|
|
314
|
+
color: options.iconColor ?? options.icon?.color
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
else if (options.icon) {
|
|
318
|
+
pointStyleOptions.image = new CircleStyle({
|
|
319
|
+
radius: options.icon.radius ?? 5,
|
|
320
|
+
fill: new Fill({ color: options.icon.fillColor ?? '#06b7fd' }),
|
|
321
|
+
stroke: new Stroke({
|
|
322
|
+
color: options.icon.strokeColor ?? '#ffffff',
|
|
323
|
+
width: options.icon.strokeWidth ?? 2
|
|
324
|
+
})
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
if (text) {
|
|
328
|
+
pointStyleOptions.text = this.createTextStyle(options, text);
|
|
329
|
+
}
|
|
330
|
+
if (pointStyleOptions.image || pointStyleOptions.text) {
|
|
331
|
+
pointStyle = new Style(pointStyleOptions);
|
|
332
|
+
pointStyle.setZIndex(1);
|
|
333
|
+
staticStyleCache.set(staticCacheKey, pointStyle);
|
|
334
|
+
styles.push(pointStyle);
|
|
335
|
+
}
|
|
336
|
+
return styles;
|
|
337
|
+
};
|
|
338
|
+
const layer = new VectorLayer({
|
|
339
|
+
layerName: options.layerName,
|
|
340
|
+
source,
|
|
341
|
+
style: createStyles,
|
|
342
|
+
zIndex: options.zIndex || ConfigManager.DEFAULT_POINT_OPTIONS.zIndex,
|
|
343
|
+
});
|
|
344
|
+
layer.setVisible(options.visible === undefined ? true : options.visible);
|
|
345
|
+
this.map.addLayer(layer);
|
|
346
|
+
const tick = () => {
|
|
347
|
+
if (!running)
|
|
348
|
+
return;
|
|
349
|
+
const duration = Math.max(1, pulseOptions.duration);
|
|
350
|
+
const now = typeof performance !== 'undefined' ? performance.now() : Date.now();
|
|
351
|
+
const nextFrameIndex = Math.floor(((now % duration) / duration) * pulseOptions.frameCount);
|
|
352
|
+
if (nextFrameIndex !== renderedFrameIndex) {
|
|
353
|
+
frameIndex = nextFrameIndex;
|
|
354
|
+
renderedFrameIndex = nextFrameIndex;
|
|
355
|
+
layer.changed();
|
|
356
|
+
}
|
|
357
|
+
rafId = requestAnimationFrame(tick);
|
|
358
|
+
};
|
|
359
|
+
const stop = () => {
|
|
360
|
+
running = false;
|
|
361
|
+
if (rafId !== null) {
|
|
362
|
+
cancelAnimationFrame(rafId);
|
|
363
|
+
rafId = null;
|
|
364
|
+
}
|
|
365
|
+
};
|
|
366
|
+
const start = () => {
|
|
367
|
+
if (running || !pulseOptions.enabled)
|
|
368
|
+
return;
|
|
369
|
+
running = true;
|
|
370
|
+
tick();
|
|
371
|
+
};
|
|
372
|
+
start();
|
|
373
|
+
return {
|
|
374
|
+
layer,
|
|
375
|
+
source,
|
|
376
|
+
start,
|
|
377
|
+
stop,
|
|
378
|
+
setVisible: (visible) => {
|
|
379
|
+
layer.setVisible(visible);
|
|
380
|
+
},
|
|
381
|
+
updateData: (nextData) => {
|
|
382
|
+
source.clear();
|
|
383
|
+
source.addFeatures(this.createPulsePointFeatures(nextData, options));
|
|
384
|
+
},
|
|
385
|
+
remove: () => {
|
|
386
|
+
stop();
|
|
387
|
+
source.clear();
|
|
388
|
+
this.map.removeLayer(layer);
|
|
389
|
+
}
|
|
390
|
+
};
|
|
391
|
+
}
|
|
192
392
|
// // 在流域中心添加闪烁点位
|
|
193
393
|
// addTwinkleLayerFromPolygon(twinkleList: any[], className: string, key: string, json: MapJSONData, options?: PolygonOptions) {
|
|
194
394
|
// new MapTools(this.map).removeLayer('twinklePoint')
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="zh-CN" dir="ltr">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
6
|
+
<title>404 | MyOpenLayer</title>
|
|
7
|
+
<meta name="description" content="Not Found">
|
|
8
|
+
<meta name="generator" content="VitePress v1.6.4">
|
|
9
|
+
<link rel="preload stylesheet" href="/my-openlayer/assets/style.C2pAQzDq.css" as="style">
|
|
10
|
+
<link rel="preload stylesheet" href="/my-openlayer/vp-icons.css" as="style">
|
|
11
|
+
|
|
12
|
+
<script type="module" src="/my-openlayer/assets/app.YvjVuxaB.js"></script>
|
|
13
|
+
<link rel="preload" href="/my-openlayer/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
|
|
14
|
+
<script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
|
|
15
|
+
<script id="check-mac-os">document.documentElement.classList.toggle("mac",/Mac|iPhone|iPod|iPad/i.test(navigator.platform));</script>
|
|
16
|
+
</head>
|
|
17
|
+
<body>
|
|
18
|
+
<div id="app"></div>
|
|
19
|
+
<script>window.__VP_HASH_MAP__=JSON.parse("{\"configmanager.md\":\"BOMdGTaa\",\"errorhandler.md\":\"yUiuJ9w9\",\"eventmanager.md\":\"BhCUVy1f\",\"index.md\":\"BJz6tHSr\",\"line.md\":\"BAQOzmSt\",\"mapbaselayers.md\":\"Bw0L_m0b\",\"maptools.md\":\"DaYgiDPe\",\"measurehandler.md\":\"7Sf4ymRv\",\"myol.md\":\"D-14Gzjy\",\"point.md\":\"Bi9juuuv\",\"polygon.md\":\"-JIqEvzD\",\"riverlayermanager.md\":\"CfUu2RxH\",\"selecthandler.md\":\"COR4ez_p\",\"validationutils.md\":\"ReTVWa73\",\"vuetemplatepoint.md\":\"CtxSb5Pm\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"zh-CN\",\"dir\":\"ltr\",\"title\":\"MyOpenLayer\",\"description\":\"基于 OpenLayers 的现代地图组件库\",\"base\":\"/my-openlayer/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"nav\":[{\"text\":\"首页\",\"link\":\"/\"},{\"text\":\"指南\",\"link\":\"/MyOl\"},{\"text\":\"API\",\"link\":\"/MyOl\"},{\"text\":\"GitHub\",\"link\":\"https://github.com/cuteyuchen/my-openlayer\"}],\"sidebar\":[{\"text\":\"核心类库\",\"items\":[{\"text\":\"MyOl 地图入口\",\"link\":\"/MyOl\"},{\"text\":\"MapBaseLayers 底图管理\",\"link\":\"/MapBaseLayers\"},{\"text\":\"ConfigManager 配置管理\",\"link\":\"/ConfigManager\"},{\"text\":\"EventManager 事件管理\",\"link\":\"/EventManager\"},{\"text\":\"ErrorHandler 错误处理\",\"link\":\"/ErrorHandler\"}]},{\"text\":\"要素操作\",\"items\":[{\"text\":\"Point 点要素\",\"link\":\"/Point\"},{\"text\":\"Line 线要素\",\"link\":\"/Line\"},{\"text\":\"Polygon 面要素\",\"link\":\"/Polygon\"},{\"text\":\"VueTemplatePoint Vue点位\",\"link\":\"/VueTemplatePoint\"},{\"text\":\"RiverLayerManager 河流图层\",\"link\":\"/RiverLayerManager\"}]},{\"text\":\"交互与工具\",\"items\":[{\"text\":\"SelectHandler 要素选择\",\"link\":\"/SelectHandler\"},{\"text\":\"MeasureHandler 测量工具\",\"link\":\"/MeasureHandler\"},{\"text\":\"MapTools 地图工具\",\"link\":\"/MapTools\"},{\"text\":\"ValidationUtils 验证工具\",\"link\":\"/ValidationUtils\"}]}],\"socialLinks\":[{\"icon\":\"github\",\"link\":\"https://github.com/cuteyuchen/my-openlayer\"}],\"footer\":{\"message\":\"Released under the MIT License.\",\"copyright\":\"Copyright © 2024-present\"}},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
|
|
20
|
+
|
|
21
|
+
</body>
|
|
22
|
+
</html>
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="zh-CN" dir="ltr">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
6
|
+
<title>ConfigManager 配置管理 | MyOpenLayer</title>
|
|
7
|
+
<meta name="description" content="基于 OpenLayers 的现代地图组件库">
|
|
8
|
+
<meta name="generator" content="VitePress v1.6.4">
|
|
9
|
+
<link rel="preload stylesheet" href="/my-openlayer/assets/style.C2pAQzDq.css" as="style">
|
|
10
|
+
<link rel="preload stylesheet" href="/my-openlayer/vp-icons.css" as="style">
|
|
11
|
+
|
|
12
|
+
<script type="module" src="/my-openlayer/assets/app.YvjVuxaB.js"></script>
|
|
13
|
+
<link rel="preload" href="/my-openlayer/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
|
|
14
|
+
<link rel="modulepreload" href="/my-openlayer/assets/chunks/theme.Bf87fILP.js">
|
|
15
|
+
<link rel="modulepreload" href="/my-openlayer/assets/chunks/framework.C_W0ODpn.js">
|
|
16
|
+
<link rel="modulepreload" href="/my-openlayer/assets/ConfigManager.md.BOMdGTaa.lean.js">
|
|
17
|
+
<script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
|
|
18
|
+
<script id="check-mac-os">document.documentElement.classList.toggle("mac",/Mac|iPhone|iPod|iPad/i.test(navigator.platform));</script>
|
|
19
|
+
</head>
|
|
20
|
+
<body>
|
|
21
|
+
<div id="app"><div class="Layout" data-v-5d98c3a5><!--[--><!--]--><!--[--><span tabindex="-1" data-v-0b0ada53></span><a href="#VPContent" class="VPSkipLink visually-hidden" data-v-0b0ada53>Skip to content</a><!--]--><!----><header class="VPNav" data-v-5d98c3a5 data-v-ae24b3ad><div class="VPNavBar" data-v-ae24b3ad data-v-6aa21345><div class="wrapper" data-v-6aa21345><div class="container" data-v-6aa21345><div class="title" data-v-6aa21345><div class="VPNavBarTitle has-sidebar" data-v-6aa21345 data-v-1168a8e4><a class="title" href="/my-openlayer/" data-v-1168a8e4><!--[--><!--]--><!----><span data-v-1168a8e4>MyOpenLayer</span><!--[--><!--]--></a></div></div><div class="content" data-v-6aa21345><div class="content-body" data-v-6aa21345><!--[--><!--]--><div class="VPNavBarSearch search" data-v-6aa21345><!----></div><nav aria-labelledby="main-nav-aria-label" class="VPNavBarMenu menu" data-v-6aa21345 data-v-dc692963><span id="main-nav-aria-label" class="visually-hidden" data-v-dc692963> Main Navigation </span><!--[--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/my-openlayer/" tabindex="0" data-v-dc692963 data-v-e56f3d57><!--[--><span data-v-e56f3d57>首页</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/my-openlayer/MyOl.html" tabindex="0" data-v-dc692963 data-v-e56f3d57><!--[--><span data-v-e56f3d57>指南</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/my-openlayer/MyOl.html" tabindex="0" data-v-dc692963 data-v-e56f3d57><!--[--><span data-v-e56f3d57>API</span><!--]--></a><!--]--><!--[--><a class="VPLink link vp-external-link-icon VPNavBarMenuLink" href="https://github.com/cuteyuchen/my-openlayer" target="_blank" rel="noreferrer" tabindex="0" data-v-dc692963 data-v-e56f3d57><!--[--><span data-v-e56f3d57>GitHub</span><!--]--></a><!--]--><!--]--></nav><!----><div class="VPNavBarAppearance appearance" data-v-6aa21345 data-v-6c893767><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title aria-checked="false" data-v-6c893767 data-v-5337faa4 data-v-1d5665e3><span class="check" data-v-1d5665e3><span class="icon" data-v-1d5665e3><!--[--><span class="vpi-sun sun" data-v-5337faa4></span><span class="vpi-moon moon" data-v-5337faa4></span><!--]--></span></span></button></div><div class="VPSocialLinks VPNavBarSocialLinks social-links" data-v-6aa21345 data-v-0394ad82 data-v-7bc22406><!--[--><a class="VPSocialLink no-icon" href="https://github.com/cuteyuchen/my-openlayer" aria-label="github" target="_blank" rel="noopener" data-v-7bc22406 data-v-bd121fe5><span class="vpi-social-github"></span></a><!--]--></div><div class="VPFlyout VPNavBarExtra extra" data-v-6aa21345 data-v-bb2aa2f0 data-v-cf11d7a2><button type="button" class="button" aria-haspopup="true" aria-expanded="false" aria-label="extra navigation" data-v-cf11d7a2><span class="vpi-more-horizontal icon" data-v-cf11d7a2></span></button><div class="menu" data-v-cf11d7a2><div class="VPMenu" data-v-cf11d7a2 data-v-b98bc113><!----><!--[--><!--[--><!----><div class="group" data-v-bb2aa2f0><div class="item appearance" data-v-bb2aa2f0><p class="label" data-v-bb2aa2f0>Appearance</p><div class="appearance-action" data-v-bb2aa2f0><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title aria-checked="false" data-v-bb2aa2f0 data-v-5337faa4 data-v-1d5665e3><span class="check" data-v-1d5665e3><span class="icon" data-v-1d5665e3><!--[--><span class="vpi-sun sun" data-v-5337faa4></span><span class="vpi-moon moon" data-v-5337faa4></span><!--]--></span></span></button></div></div></div><div class="group" data-v-bb2aa2f0><div class="item social-links" data-v-bb2aa2f0><div class="VPSocialLinks social-links-list" data-v-bb2aa2f0 data-v-7bc22406><!--[--><a class="VPSocialLink no-icon" href="https://github.com/cuteyuchen/my-openlayer" aria-label="github" target="_blank" rel="noopener" data-v-7bc22406 data-v-bd121fe5><span class="vpi-social-github"></span></a><!--]--></div></div></div><!--]--><!--]--></div></div></div><!--[--><!--]--><button type="button" class="VPNavBarHamburger hamburger" aria-label="mobile navigation" aria-expanded="false" aria-controls="VPNavScreen" data-v-6aa21345 data-v-e5dd9c1c><span class="container" data-v-e5dd9c1c><span class="top" data-v-e5dd9c1c></span><span class="middle" data-v-e5dd9c1c></span><span class="bottom" data-v-e5dd9c1c></span></span></button></div></div></div></div><div class="divider" data-v-6aa21345><div class="divider-line" data-v-6aa21345></div></div></div><!----></header><div class="VPLocalNav has-sidebar empty" data-v-5d98c3a5 data-v-a6f0e41e><div class="container" data-v-a6f0e41e><button class="menu" aria-expanded="false" aria-controls="VPSidebarNav" data-v-a6f0e41e><span class="vpi-align-left menu-icon" data-v-a6f0e41e></span><span class="menu-text" data-v-a6f0e41e>Menu</span></button><div class="VPLocalNavOutlineDropdown" style="--vp-vh:0px;" data-v-a6f0e41e data-v-8a42e2b4><button data-v-8a42e2b4>Return to top</button><!----></div></div></div><aside class="VPSidebar" data-v-5d98c3a5 data-v-319d5ca6><div class="curtain" data-v-319d5ca6></div><nav class="nav" id="VPSidebarNav" aria-labelledby="sidebar-aria-label" tabindex="-1" data-v-319d5ca6><span class="visually-hidden" id="sidebar-aria-label" data-v-319d5ca6> Sidebar Navigation </span><!--[--><!--]--><!--[--><div class="no-transition group" data-v-c40bc020><section class="VPSidebarItem level-0 has-active" data-v-c40bc020 data-v-b3fd67f8><div class="item" role="button" tabindex="0" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><h2 class="text" data-v-b3fd67f8>核心类库</h2><!----></div><div class="items" data-v-b3fd67f8><!--[--><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/my-openlayer/MyOl.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>MyOl 地图入口</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/my-openlayer/MapBaseLayers.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>MapBaseLayers 底图管理</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/my-openlayer/ConfigManager.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>ConfigManager 配置管理</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/my-openlayer/EventManager.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>EventManager 事件管理</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/my-openlayer/ErrorHandler.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>ErrorHandler 错误处理</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="no-transition group" data-v-c40bc020><section class="VPSidebarItem level-0" data-v-c40bc020 data-v-b3fd67f8><div class="item" role="button" tabindex="0" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><h2 class="text" data-v-b3fd67f8>要素操作</h2><!----></div><div class="items" data-v-b3fd67f8><!--[--><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/my-openlayer/Point.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>Point 点要素</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/my-openlayer/Line.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>Line 线要素</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/my-openlayer/Polygon.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>Polygon 面要素</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/my-openlayer/VueTemplatePoint.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>VueTemplatePoint Vue点位</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/my-openlayer/RiverLayerManager.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>RiverLayerManager 河流图层</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="no-transition group" data-v-c40bc020><section class="VPSidebarItem level-0" data-v-c40bc020 data-v-b3fd67f8><div class="item" role="button" tabindex="0" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><h2 class="text" data-v-b3fd67f8>交互与工具</h2><!----></div><div class="items" data-v-b3fd67f8><!--[--><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/my-openlayer/SelectHandler.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>SelectHandler 要素选择</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/my-openlayer/MeasureHandler.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>MeasureHandler 测量工具</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/my-openlayer/MapTools.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>MapTools 地图工具</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/my-openlayer/ValidationUtils.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>ValidationUtils 验证工具</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><!--]--><!--[--><!--]--></nav></aside><div class="VPContent has-sidebar" id="VPContent" data-v-5d98c3a5 data-v-1428d186><div class="VPDoc has-sidebar has-aside" data-v-1428d186 data-v-39a288b8><!--[--><!--]--><div class="container" data-v-39a288b8><div class="aside" data-v-39a288b8><div class="aside-curtain" data-v-39a288b8></div><div class="aside-container" data-v-39a288b8><div class="aside-content" data-v-39a288b8><div class="VPDocAside" data-v-39a288b8 data-v-3f215769><!--[--><!--]--><!--[--><!--]--><nav aria-labelledby="doc-outline-aria-label" class="VPDocAsideOutline" data-v-3f215769 data-v-a5bbad30><div class="content" data-v-a5bbad30><div class="outline-marker" data-v-a5bbad30></div><div aria-level="2" class="outline-title" id="doc-outline-aria-label" role="heading" data-v-a5bbad30>On this page</div><ul class="VPDocOutlineItem root" data-v-a5bbad30 data-v-b933a997><!--[--><!--]--></ul></div></nav><!--[--><!--]--><div class="spacer" data-v-3f215769></div><!--[--><!--]--><!----><!--[--><!--]--><!--[--><!--]--></div></div></div></div><div class="content" data-v-39a288b8><div class="content-container" data-v-39a288b8><!--[--><!--]--><main class="main" data-v-39a288b8><div style="position:relative;" class="vp-doc _my-openlayer_ConfigManager" data-v-39a288b8><div><h1 id="configmanager-配置管理" tabindex="-1">ConfigManager 配置管理 <a class="header-anchor" href="#configmanager-配置管理" aria-label="Permalink to "ConfigManager 配置管理""></a></h1><p><code>ConfigManager</code> 类用于统一管理地图组件的默认配置和常量。它提供了一系列静态只读属性,确保整个应用中使用一致的配置默认值。</p><h2 id="导入" tabindex="-1">导入 <a class="header-anchor" href="#导入" aria-label="Permalink to "导入""></a></h2><div class="language-typescript vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">typescript</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { ConfigManager } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 'my-openlayer'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span></code></pre></div><h2 id="静态属性" tabindex="-1">静态属性 <a class="header-anchor" href="#静态属性" aria-label="Permalink to "静态属性""></a></h2><p><code>ConfigManager</code> 包含以下类别的默认配置:</p><h3 id="点位配置-point-options" tabindex="-1">点位配置 (Point Options) <a class="header-anchor" href="#点位配置-point-options" aria-label="Permalink to "点位配置 (Point Options)""></a></h3><table tabindex="0"><thead><tr><th style="text-align:left;">属性名</th><th style="text-align:left;">类型</th><th style="text-align:left;">描述</th><th style="text-align:left;">默认值</th></tr></thead><tbody><tr><td style="text-align:left;"><code>DEFAULT_POINT_OPTIONS</code></td><td style="text-align:left;"><code>object</code></td><td style="text-align:left;">默认点位基础配置</td><td style="text-align:left;"><code>{ visible: true, zIndex: 21 }</code></td></tr><tr><td style="text-align:left;"><code>DEFAULT_POINT_TEXT_OPTIONS</code></td><td style="text-align:left;"><code>object</code></td><td style="text-align:left;">默认点位文本配置</td><td style="text-align:left;"><code>{ textFont: '12px Calibri,sans-serif', textFillColor: '#FFF', textStrokeColor: '#000', textStrokeWidth: 3, textOffsetY: 20 }</code></td></tr><tr><td style="text-align:left;"><code>DEFAULT_POINT_ICON_SCALE</code></td><td style="text-align:left;"><code>number</code></td><td style="text-align:left;">默认图标缩放比例</td><td style="text-align:left;"><code>1</code></td></tr><tr><td style="text-align:left;"><code>DEFAULT_CLUSTER_OPTIONS</code></td><td style="text-align:left;"><code>object</code></td><td style="text-align:left;">默认聚合配置</td><td style="text-align:left;"><code>{ distance: 40, minDistance: 0, zIndex: 21 }</code></td></tr><tr><td style="text-align:left;"><code>DEFAULT_DOM_POINT_OVERLAY_OPTIONS</code></td><td style="text-align:left;"><code>object</code></td><td style="text-align:left;">默认 DOM 点覆盖物配置</td><td style="text-align:left;"><code>{ positioning: 'center-center', stopEvent: false }</code></td></tr></tbody></table><h3 id="线配置-line-options" tabindex="-1">线配置 (Line Options) <a class="header-anchor" href="#线配置-line-options" aria-label="Permalink to "线配置 (Line Options)""></a></h3><table tabindex="0"><thead><tr><th style="text-align:left;">属性名</th><th style="text-align:left;">类型</th><th style="text-align:left;">描述</th><th style="text-align:left;">默认值</th></tr></thead><tbody><tr><td style="text-align:left;"><code>DEFAULT_LINE_OPTIONS</code></td><td style="text-align:left;"><code>object</code></td><td style="text-align:left;">默认线样式配置</td><td style="text-align:left;"><code>{ type: 'line', strokeColor: 'rgba(3, 122, 255, 1)', strokeWidth: 2, visible: true, layerName: 'lineLayer', zIndex: 15 }</code></td></tr></tbody></table><h3 id="面配置-polygon-options" tabindex="-1">面配置 (Polygon Options) <a class="header-anchor" href="#面配置-polygon-options" aria-label="Permalink to "面配置 (Polygon Options)""></a></h3><table tabindex="0"><thead><tr><th style="text-align:left;">属性名</th><th style="text-align:left;">类型</th><th style="text-align:left;">描述</th><th style="text-align:left;">默认值</th></tr></thead><tbody><tr><td style="text-align:left;"><code>DEFAULT_POLYGON_OPTIONS</code></td><td style="text-align:left;"><code>object</code></td><td style="text-align:left;">默认面样式配置</td><td style="text-align:left;"><code>{ zIndex: 11, visible: true, textFont: '14px Calibri,sans-serif', textFillColor: '#FFF', textStrokeColor: '#409EFF', textStrokeWidth: 2 }</code></td></tr><tr><td style="text-align:left;"><code>DEFAULT_POLYGON_COLOR_MAP</code></td><td style="text-align:left;"><code>object</code></td><td style="text-align:left;">默认面颜色映射 (用于分级渲染)</td><td style="text-align:left;"><code>{ '0': 'rgba(255, 0, 0, 0.6)', '1': 'rgba(245, 154, 35, 0.6)', ... }</code></td></tr></tbody></table><h2 id="使用示例" tabindex="-1">使用示例 <a class="header-anchor" href="#使用示例" aria-label="Permalink to "使用示例""></a></h2><h3 id="获取默认配置" tabindex="-1">获取默认配置 <a class="header-anchor" href="#获取默认配置" aria-label="Permalink to "获取默认配置""></a></h3><div class="language-typescript vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">typescript</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { ConfigManager } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 'my-openlayer'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
|
22
|
+
<span class="line"></span>
|
|
23
|
+
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// 获取默认点位配置</span></span>
|
|
24
|
+
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> pointOptions</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
|
|
25
|
+
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> ...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">ConfigManager.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">DEFAULT_POINT_OPTIONS</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
26
|
+
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> ...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">ConfigManager.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">DEFAULT_POINT_TEXT_OPTIONS</span></span>
|
|
27
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">};</span></span>
|
|
28
|
+
<span class="line"></span>
|
|
29
|
+
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">// 获取默认线配置</span></span>
|
|
30
|
+
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> lineOptions</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> ConfigManager.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">DEFAULT_LINE_OPTIONS</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span></code></pre></div><h3 id="在自定义组件中使用" tabindex="-1">在自定义组件中使用 <a class="header-anchor" href="#在自定义组件中使用" aria-label="Permalink to "在自定义组件中使用""></a></h3><div class="language-typescript vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">typescript</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { ConfigManager } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> 'my-openlayer'</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
|
31
|
+
<span class="line"></span>
|
|
32
|
+
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">class</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> MyComponent</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
|
|
33
|
+
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> private</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;"> options</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> any</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">;</span></span>
|
|
34
|
+
<span class="line"></span>
|
|
35
|
+
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> constructor</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">options</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> any</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) {</span></span>
|
|
36
|
+
<span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // 合并用户配置和默认配置</span></span>
|
|
37
|
+
<span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> this</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.options </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
|
|
38
|
+
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> ...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">ConfigManager.</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">DEFAULT_POINT_OPTIONS</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
|
|
39
|
+
<span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> ...</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">options</span></span>
|
|
40
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> };</span></span>
|
|
41
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
|
|
42
|
+
<span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div></div></div></main><footer class="VPDocFooter" data-v-39a288b8 data-v-e257564d><!--[--><!--]--><!----><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-e257564d><span class="visually-hidden" id="doc-footer-aria-label" data-v-e257564d>Pager</span><div class="pager" data-v-e257564d><a class="VPLink link pager-link prev" href="/my-openlayer/MapBaseLayers.html" data-v-e257564d><!--[--><span class="desc" data-v-e257564d>Previous page</span><span class="title" data-v-e257564d>MapBaseLayers 底图管理</span><!--]--></a></div><div class="pager" data-v-e257564d><a class="VPLink link pager-link next" href="/my-openlayer/EventManager.html" data-v-e257564d><!--[--><span class="desc" data-v-e257564d>Next page</span><span class="title" data-v-e257564d>EventManager 事件管理</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><footer class="VPFooter has-sidebar" data-v-5d98c3a5 data-v-e315a0ad><div class="container" data-v-e315a0ad><p class="message" data-v-e315a0ad>Released under the MIT License.</p><p class="copyright" data-v-e315a0ad>Copyright © 2024-present</p></div></footer><!--[--><!--]--></div></div>
|
|
43
|
+
<script>window.__VP_HASH_MAP__=JSON.parse("{\"configmanager.md\":\"BOMdGTaa\",\"errorhandler.md\":\"yUiuJ9w9\",\"eventmanager.md\":\"BhCUVy1f\",\"index.md\":\"BJz6tHSr\",\"line.md\":\"BAQOzmSt\",\"mapbaselayers.md\":\"Bw0L_m0b\",\"maptools.md\":\"DaYgiDPe\",\"measurehandler.md\":\"7Sf4ymRv\",\"myol.md\":\"D-14Gzjy\",\"point.md\":\"Bi9juuuv\",\"polygon.md\":\"-JIqEvzD\",\"riverlayermanager.md\":\"CfUu2RxH\",\"selecthandler.md\":\"COR4ez_p\",\"validationutils.md\":\"ReTVWa73\",\"vuetemplatepoint.md\":\"CtxSb5Pm\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"zh-CN\",\"dir\":\"ltr\",\"title\":\"MyOpenLayer\",\"description\":\"基于 OpenLayers 的现代地图组件库\",\"base\":\"/my-openlayer/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"nav\":[{\"text\":\"首页\",\"link\":\"/\"},{\"text\":\"指南\",\"link\":\"/MyOl\"},{\"text\":\"API\",\"link\":\"/MyOl\"},{\"text\":\"GitHub\",\"link\":\"https://github.com/cuteyuchen/my-openlayer\"}],\"sidebar\":[{\"text\":\"核心类库\",\"items\":[{\"text\":\"MyOl 地图入口\",\"link\":\"/MyOl\"},{\"text\":\"MapBaseLayers 底图管理\",\"link\":\"/MapBaseLayers\"},{\"text\":\"ConfigManager 配置管理\",\"link\":\"/ConfigManager\"},{\"text\":\"EventManager 事件管理\",\"link\":\"/EventManager\"},{\"text\":\"ErrorHandler 错误处理\",\"link\":\"/ErrorHandler\"}]},{\"text\":\"要素操作\",\"items\":[{\"text\":\"Point 点要素\",\"link\":\"/Point\"},{\"text\":\"Line 线要素\",\"link\":\"/Line\"},{\"text\":\"Polygon 面要素\",\"link\":\"/Polygon\"},{\"text\":\"VueTemplatePoint Vue点位\",\"link\":\"/VueTemplatePoint\"},{\"text\":\"RiverLayerManager 河流图层\",\"link\":\"/RiverLayerManager\"}]},{\"text\":\"交互与工具\",\"items\":[{\"text\":\"SelectHandler 要素选择\",\"link\":\"/SelectHandler\"},{\"text\":\"MeasureHandler 测量工具\",\"link\":\"/MeasureHandler\"},{\"text\":\"MapTools 地图工具\",\"link\":\"/MapTools\"},{\"text\":\"ValidationUtils 验证工具\",\"link\":\"/ValidationUtils\"}]}],\"socialLinks\":[{\"icon\":\"github\",\"link\":\"https://github.com/cuteyuchen/my-openlayer\"}],\"footer\":{\"message\":\"Released under the MIT License.\",\"copyright\":\"Copyright © 2024-present\"}},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
|
|
44
|
+
|
|
45
|
+
</body>
|
|
46
|
+
</html>
|