my-openlayer 2.4.10 → 2.5.1

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.
Files changed (119) hide show
  1. package/CHANGELOG.md +167 -265
  2. package/MyOl.d.ts +9 -9
  3. package/MyOl.js +17 -16
  4. package/README.md +217 -156
  5. package/core/line/Line.d.ts +40 -0
  6. package/core/line/Line.js +144 -0
  7. package/core/line/LineFeatureFactory.d.ts +17 -0
  8. package/core/line/LineFeatureFactory.js +75 -0
  9. package/core/line/LineFlowAnimator.d.ts +53 -0
  10. package/core/line/LineFlowAnimator.js +297 -0
  11. package/core/line/LineStyleFactory.d.ts +43 -0
  12. package/core/line/LineStyleFactory.js +135 -0
  13. package/core/{RiverLayerManager.d.ts → line/RiverLayerManager.d.ts} +2 -2
  14. package/core/{RiverLayerManager.js → line/RiverLayerManager.js} +3 -5
  15. package/core/line/index.d.ts +6 -0
  16. package/core/line/index.js +5 -0
  17. package/core/{ConfigManager.d.ts → map/ConfigManager.d.ts} +25 -1
  18. package/core/{ConfigManager.js → map/ConfigManager.js} +22 -1
  19. package/core/{EventManager.d.ts → map/EventManager.d.ts} +1 -1
  20. package/core/{EventManager.js → map/EventManager.js} +2 -2
  21. package/core/{MapBaseLayers.d.ts → map/MapBaseLayers.d.ts} +1 -1
  22. package/core/{MapBaseLayers.js → map/MapBaseLayers.js} +10 -12
  23. package/core/{MapTools.d.ts → map/MapTools.d.ts} +5 -2
  24. package/core/{MapTools.js → map/MapTools.js} +11 -5
  25. package/core/{MeasureHandler.d.ts → map/MeasureHandler.d.ts} +1 -1
  26. package/core/{MeasureHandler.js → map/MeasureHandler.js} +41 -41
  27. package/core/map/index.d.ts +5 -0
  28. package/core/map/index.js +5 -0
  29. package/core/{Point.d.ts → point/Point.d.ts} +13 -4
  30. package/core/{Point.js → point/Point.js} +24 -112
  31. package/core/point/PointClusterLayer.d.ts +10 -0
  32. package/core/point/PointClusterLayer.js +52 -0
  33. package/core/point/PointOverlay.d.ts +13 -0
  34. package/core/point/PointOverlay.js +57 -0
  35. package/core/point/PointPulseLayer.d.ts +13 -0
  36. package/core/point/PointPulseLayer.js +207 -0
  37. package/core/point/index.d.ts +4 -0
  38. package/core/point/index.js +4 -0
  39. package/core/{Polygon.d.ts → polygon/Polygon.d.ts} +4 -50
  40. package/core/polygon/Polygon.js +248 -0
  41. package/core/polygon/PolygonHeatmapLayer.d.ts +11 -0
  42. package/core/polygon/PolygonHeatmapLayer.js +40 -0
  43. package/core/polygon/PolygonImageLayer.d.ts +9 -0
  44. package/core/polygon/PolygonImageLayer.js +61 -0
  45. package/core/polygon/PolygonMaskLayer.d.ts +20 -0
  46. package/core/polygon/PolygonMaskLayer.js +107 -0
  47. package/core/polygon/PolygonStyleFactory.d.ts +12 -0
  48. package/core/polygon/PolygonStyleFactory.js +100 -0
  49. package/core/polygon/index.d.ts +5 -0
  50. package/core/polygon/index.js +5 -0
  51. package/core/{SelectHandler.d.ts → select/SelectHandler.d.ts} +2 -3
  52. package/core/{SelectHandler.js → select/SelectHandler.js} +4 -4
  53. package/core/select/index.d.ts +1 -0
  54. package/core/select/index.js +1 -0
  55. package/core/{VueTemplatePoint.d.ts → vue-template-point/VueTemplatePoint.d.ts} +1 -1
  56. package/core/{VueTemplatePoint.js → vue-template-point/VueTemplatePoint.js} +4 -4
  57. package/core/vue-template-point/index.d.ts +1 -0
  58. package/core/vue-template-point/index.js +1 -0
  59. package/docs/.vitepress/config.mts +57 -57
  60. package/docs/ConfigManager.md +71 -71
  61. package/docs/ErrorHandler.md +106 -106
  62. package/docs/EventManager.md +142 -142
  63. package/docs/Line.md +215 -187
  64. package/docs/MapBaseLayers.md +198 -198
  65. package/docs/MapTools.md +172 -172
  66. package/docs/MeasureHandler.md +87 -87
  67. package/docs/MyOl.md +247 -247
  68. package/docs/Point.md +233 -165
  69. package/docs/Polygon.md +241 -241
  70. package/docs/RiverLayerManager.md +187 -187
  71. package/docs/SelectHandler.md +147 -147
  72. package/docs/ValidationUtils.md +83 -83
  73. package/docs/VueTemplatePoint.md +214 -214
  74. package/docs/index.md +79 -78
  75. package/index.d.ts +11 -16
  76. package/index.js +7 -13
  77. package/package.json +11 -1
  78. package/types/base.d.ts +47 -0
  79. package/types/base.js +1 -0
  80. package/types/common.d.ts +59 -0
  81. package/types/common.js +1 -0
  82. package/types/index.d.ts +9 -0
  83. package/types/index.js +1 -0
  84. package/types/line.d.ts +41 -0
  85. package/types/line.js +1 -0
  86. package/types/map.d.ts +77 -0
  87. package/types/map.js +1 -0
  88. package/types/point.d.ts +54 -0
  89. package/types/point.js +1 -0
  90. package/types/polygon.d.ts +8 -0
  91. package/types/polygon.js +1 -0
  92. package/types/select.d.ts +25 -0
  93. package/types/select.js +1 -0
  94. package/types/vue-template-point.d.ts +54 -0
  95. package/{types.js → types/vue-template-point.js} +0 -3
  96. package/utils/ProjectionUtils.d.ts +28 -0
  97. package/utils/ProjectionUtils.js +34 -0
  98. package/utils/ValidationUtils.d.ts +33 -86
  99. package/utils/ValidationUtils.js +60 -165
  100. package/core/DomPoint.d.ts +0 -21
  101. package/core/DomPoint.js +0 -36
  102. package/core/Line.d.ts +0 -49
  103. package/core/Line.js +0 -114
  104. package/core/Polygon.js +0 -646
  105. package/docs/.vitepress/cache/deps/@theme_index.js +0 -275
  106. package/docs/.vitepress/cache/deps/@theme_index.js.map +0 -7
  107. package/docs/.vitepress/cache/deps/_metadata.json +0 -40
  108. package/docs/.vitepress/cache/deps/chunk-LW4I4DCF.js +0 -12542
  109. package/docs/.vitepress/cache/deps/chunk-LW4I4DCF.js.map +0 -7
  110. package/docs/.vitepress/cache/deps/chunk-Z5QSWKN2.js +0 -9719
  111. package/docs/.vitepress/cache/deps/chunk-Z5QSWKN2.js.map +0 -7
  112. package/docs/.vitepress/cache/deps/package.json +0 -3
  113. package/docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js +0 -4505
  114. package/docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js.map +0 -7
  115. package/docs/.vitepress/cache/deps/vitepress___@vueuse_core.js +0 -583
  116. package/docs/.vitepress/cache/deps/vitepress___@vueuse_core.js.map +0 -7
  117. package/docs/.vitepress/cache/deps/vue.js +0 -343
  118. package/docs/.vitepress/cache/deps/vue.js.map +0 -7
  119. package/types.d.ts +0 -372
package/CHANGELOG.md CHANGED
@@ -1,10 +1,21 @@
1
1
  # Changelog
2
2
 
3
- ## [2.4.10] - 2026-03-31
3
+ ## [2.4.12] - 2026-04-21
4
+
5
+ ### Features
6
+
7
+ - **Point:** 新增 `addPulsePointLayer`,使用 `VectorLayer` 和单个 `requestAnimationFrame` 支持大量高性能闪烁点。
8
+ - **Point:** 高性能闪烁点参数对齐 `addPoint`,支持 `img`、`scale`、`iconColor`、`textKey`、`textVisible` 等常用配置。
9
+ - **examples:** 新增高性能闪烁点示例和村庄点位 SVG 图标。
10
+
11
+ ### Documentation
12
+
13
+ - 更新 README、VitePress docs 和 Codex skill 文档,补充 `addPulsePointLayer` 用法。
14
+
15
+ ## [2.4.8] - 2026-01-30
4
16
 
5
17
  ### ✨ Features
6
18
 
7
- - **TwinkleItem:** 支持自定义闪烁点DOM元素
8
19
  - **SelectHandler:** 重构选择交互以支持独立样式渲染和多选隔离
9
20
  - 重构Polygon样式处理并添加示例组件
10
21
  - **core:** 添加基于GeoJSON数据的地图定位功能
@@ -48,17 +59,64 @@
48
59
 
49
60
  ### 📝 Documentation
50
61
 
51
- - 更新技能文档的名称与描述
52
- - 添加技能文档系统并更新项目文档结构
53
62
  - add vitepress documentation and github actions workflow
54
63
  - 添加详细模块文档并更新发布配置
55
64
  - update README with branch strategy and add migration guide
56
65
 
57
- ## [2.4.9] - 2026-03-05
66
+ ## [2.4.7] - 2026-01-30
67
+
68
+ ### ✨ Features
69
+
70
+ - **SelectHandler:** 重构选择交互以支持独立样式渲染和多选隔离
71
+ - 重构Polygon样式处理并添加示例组件
72
+ - **core:** 添加基于GeoJSON数据的地图定位功能
73
+ - **core:** 添加地图定位功能并重构点位相关方法
74
+ - **Point:** 添加闪烁点功能及示例
75
+ - **core:** 为Polygon添加layerName选项并调整图层添加逻辑
76
+ - **Point:** 添加setOneVisibleByProp方法控制点显示
77
+ - **Polygon:** 优化遮罩功能支持多几何图形处理
78
+ - **测量工具:** 添加测量距离和面积功能及工具栏样式
79
+ - **地图:** 添加自定义投影配置支持
80
+ - **日志管理:** 实现统一日志开关与级别控制
81
+ - **SelectHandler:** 新增要素选择处理器模块
82
+ - upgrade OpenLayers to v10.6.1 and update project to v2.0.0
83
+ - update MapBaseLayers to handle optional token and improve annotation layer management
84
+ - 重新添加已清理的App.vue文件,移除了所有敏感token信息
85
+ - 重构Vue模板点位功能并优化事件管理
86
+ - **Polygon:** 改进图像图层处理逻辑并添加更新功能
87
+ - 添加验证工具类并重构现有验证逻辑
88
+ - **地图工具:** 重构地图工具类并增强错误处理
89
+ - 重构类型系统并增强核心功能
90
+
91
+ ### 🐛 Bug Fixes
92
+
93
+ - **core:** 改进Vue依赖检测逻辑并更新版本号
94
+ - **VueTemplatePoint:** 修复Vue3环境下pointData的类型定义
95
+ - **core:** 修正Line类中layerName属性设置错误
96
+ - resolve TypeScript build error in MapBaseLayers.ts
97
+
98
+ ### ⚡ Performance
99
+
100
+ - **Polygon:** 优化GeoJSON解析性能,直接注入layerName
101
+
102
+ ### ♻️ Refactor
103
+
104
+ - **MapBaseLayers:** 重构图层管理逻辑,优化代码结构和可维护性
105
+ - **ConfigManager:** 集中管理默认配置并移除无用接口
106
+ - **样式处理:** 统一处理自定义样式逻辑并修复代码格式
107
+ - 将nameKey重命名为textKey以提高语义清晰度
108
+ - 更新依赖项并优化类型导出结构
109
+ - **core:** 重构DomPoint和MapBaseLayers类,优化代码结构和功能
110
+
111
+ ### 📝 Documentation
112
+
113
+ - 添加详细模块文档并更新发布配置
114
+ - update README with branch strategy and add migration guide
115
+
116
+ ## [2.4.6] - 2026-01-30
58
117
 
59
118
  ### ✨ Features
60
119
 
61
- - **TwinkleItem:** 支持自定义闪烁点DOM元素
62
120
  - **SelectHandler:** 重构选择交互以支持独立样式渲染和多选隔离
63
121
  - 重构Polygon样式处理并添加示例组件
64
122
  - **core:** 添加基于GeoJSON数据的地图定位功能
@@ -102,265 +160,109 @@
102
160
 
103
161
  ### 📝 Documentation
104
162
 
105
- - 更新技能文档的名称与描述
106
- - 添加技能文档系统并更新项目文档结构
107
- - add vitepress documentation and github actions workflow
108
163
  - 添加详细模块文档并更新发布配置
109
164
  - update README with branch strategy and add migration guide
110
165
 
111
- # Changelog
112
-
113
- ## [2.4.8] - 2026-01-30
114
-
115
- ### Features
116
-
117
- - **SelectHandler:** 重构选择交互以支持独立样式渲染和多选隔离
118
- - 重构Polygon样式处理并添加示例组件
119
- - **core:** 添加基于GeoJSON数据的地图定位功能
120
- - **core:** 添加地图定位功能并重构点位相关方法
121
- - **Point:** 添加闪烁点功能及示例
122
- - **core:** 为Polygon添加layerName选项并调整图层添加逻辑
123
- - **Point:** 添加setOneVisibleByProp方法控制点显示
124
- - **Polygon:** 优化遮罩功能支持多几何图形处理
125
- - **测量工具:** 添加测量距离和面积功能及工具栏样式
126
- - **地图:** 添加自定义投影配置支持
127
- - **日志管理:** 实现统一日志开关与级别控制
128
- - **SelectHandler:** 新增要素选择处理器模块
129
- - upgrade OpenLayers to v10.6.1 and update project to v2.0.0
130
- - update MapBaseLayers to handle optional token and improve annotation layer management
131
- - 重新添加已清理的App.vue文件,移除了所有敏感token信息
132
- - 重构Vue模板点位功能并优化事件管理
133
- - **Polygon:** 改进图像图层处理逻辑并添加更新功能
134
- - 添加验证工具类并重构现有验证逻辑
135
- - **地图工具:** 重构地图工具类并增强错误处理
136
- - 重构类型系统并增强核心功能
137
-
138
- ### 🐛 Bug Fixes
139
-
140
- - **core:** 改进Vue依赖检测逻辑并更新版本号
141
- - **VueTemplatePoint:** 修复Vue3环境下pointData的类型定义
142
- - **core:** 修正Line类中layerName属性设置错误
143
- - resolve TypeScript build error in MapBaseLayers.ts
144
-
145
- ### Performance
146
-
147
- - **Polygon:** 优化GeoJSON解析性能,直接注入layerName
148
-
149
- ### ♻️ Refactor
150
-
151
- - **MapBaseLayers:** 重构图层管理逻辑,优化代码结构和可维护性
152
- - **ConfigManager:** 集中管理默认配置并移除无用接口
153
- - **样式处理:** 统一处理自定义样式逻辑并修复代码格式
154
- - 将nameKey重命名为textKey以提高语义清晰度
155
- - 更新依赖项并优化类型导出结构
156
- - **core:** 重构DomPoint和MapBaseLayers类,优化代码结构和功能
157
-
158
- ### 📝 Documentation
159
-
160
- - add vitepress documentation and github actions workflow
161
- - 添加详细模块文档并更新发布配置
162
- - update README with branch strategy and add migration guide
163
-
164
- ## [2.4.7] - 2026-01-30
165
-
166
- ### ✨ Features
167
-
168
- - **SelectHandler:** 重构选择交互以支持独立样式渲染和多选隔离
169
- - 重构Polygon样式处理并添加示例组件
170
- - **core:** 添加基于GeoJSON数据的地图定位功能
171
- - **core:** 添加地图定位功能并重构点位相关方法
172
- - **Point:** 添加闪烁点功能及示例
173
- - **core:** 为Polygon添加layerName选项并调整图层添加逻辑
174
- - **Point:** 添加setOneVisibleByProp方法控制点显示
175
- - **Polygon:** 优化遮罩功能支持多几何图形处理
176
- - **测量工具:** 添加测量距离和面积功能及工具栏样式
177
- - **地图:** 添加自定义投影配置支持
178
- - **日志管理:** 实现统一日志开关与级别控制
179
- - **SelectHandler:** 新增要素选择处理器模块
180
- - upgrade OpenLayers to v10.6.1 and update project to v2.0.0
181
- - update MapBaseLayers to handle optional token and improve annotation layer management
182
- - 重新添加已清理的App.vue文件,移除了所有敏感token信息
183
- - 重构Vue模板点位功能并优化事件管理
184
- - **Polygon:** 改进图像图层处理逻辑并添加更新功能
185
- - 添加验证工具类并重构现有验证逻辑
186
- - **地图工具:** 重构地图工具类并增强错误处理
187
- - 重构类型系统并增强核心功能
188
-
189
- ### 🐛 Bug Fixes
190
-
191
- - **core:** 改进Vue依赖检测逻辑并更新版本号
192
- - **VueTemplatePoint:** 修复Vue3环境下pointData的类型定义
193
- - **core:** 修正Line类中layerName属性设置错误
194
- - resolve TypeScript build error in MapBaseLayers.ts
195
-
196
- ### Performance
197
-
198
- - **Polygon:** 优化GeoJSON解析性能,直接注入layerName
199
-
200
- ### ♻️ Refactor
201
-
202
- - **MapBaseLayers:** 重构图层管理逻辑,优化代码结构和可维护性
203
- - **ConfigManager:** 集中管理默认配置并移除无用接口
204
- - **样式处理:** 统一处理自定义样式逻辑并修复代码格式
205
- - 将nameKey重命名为textKey以提高语义清晰度
206
- - 更新依赖项并优化类型导出结构
207
- - **core:** 重构DomPoint和MapBaseLayers类,优化代码结构和功能
208
-
209
- ### 📝 Documentation
210
-
211
- - 添加详细模块文档并更新发布配置
212
- - update README with branch strategy and add migration guide
213
-
214
- ## [2.4.6] - 2026-01-30
215
-
216
- ### ✨ Features
217
-
218
- - **SelectHandler:** 重构选择交互以支持独立样式渲染和多选隔离
219
- - 重构Polygon样式处理并添加示例组件
220
- - **core:** 添加基于GeoJSON数据的地图定位功能
221
- - **core:** 添加地图定位功能并重构点位相关方法
222
- - **Point:** 添加闪烁点功能及示例
223
- - **core:** 为Polygon添加layerName选项并调整图层添加逻辑
224
- - **Point:** 添加setOneVisibleByProp方法控制点显示
225
- - **Polygon:** 优化遮罩功能支持多几何图形处理
226
- - **测量工具:** 添加测量距离和面积功能及工具栏样式
227
- - **地图:** 添加自定义投影配置支持
228
- - **日志管理:** 实现统一日志开关与级别控制
229
- - **SelectHandler:** 新增要素选择处理器模块
230
- - upgrade OpenLayers to v10.6.1 and update project to v2.0.0
231
- - update MapBaseLayers to handle optional token and improve annotation layer management
232
- - 重新添加已清理的App.vue文件,移除了所有敏感token信息
233
- - 重构Vue模板点位功能并优化事件管理
234
- - **Polygon:** 改进图像图层处理逻辑并添加更新功能
235
- - 添加验证工具类并重构现有验证逻辑
236
- - **地图工具:** 重构地图工具类并增强错误处理
237
- - 重构类型系统并增强核心功能
238
-
239
- ### 🐛 Bug Fixes
240
-
241
- - **core:** 改进Vue依赖检测逻辑并更新版本号
242
- - **VueTemplatePoint:** 修复Vue3环境下pointData的类型定义
243
- - **core:** 修正Line类中layerName属性设置错误
244
- - resolve TypeScript build error in MapBaseLayers.ts
245
-
246
- ### ⚡ Performance
247
-
248
- - **Polygon:** 优化GeoJSON解析性能,直接注入layerName
249
-
250
- ### ♻️ Refactor
251
-
252
- - **MapBaseLayers:** 重构图层管理逻辑,优化代码结构和可维护性
253
- - **ConfigManager:** 集中管理默认配置并移除无用接口
254
- - **样式处理:** 统一处理自定义样式逻辑并修复代码格式
255
- - 将nameKey重命名为textKey以提高语义清晰度
256
- - 更新依赖项并优化类型导出结构
257
- - **core:** 重构DomPoint和MapBaseLayers类,优化代码结构和功能
258
-
259
- ### 📝 Documentation
260
-
261
- - 添加详细模块文档并更新发布配置
262
- - update README with branch strategy and add migration guide
263
-
264
- ## [2.4.5] - 2026-01-30
265
-
266
- ### ✨ Features
267
-
268
- - **SelectHandler:** 重构选择交互以支持独立样式渲染和多选隔离
269
- - 重构Polygon样式处理并添加示例组件
270
- - **core:** 添加基于GeoJSON数据的地图定位功能
271
- - **core:** 添加地图定位功能并重构点位相关方法
272
- - **Point:** 添加闪烁点功能及示例
273
- - **core:** 为Polygon添加layerName选项并调整图层添加逻辑
274
- - **Point:** 添加setOneVisibleByProp方法控制点显示
275
- - **Polygon:** 优化遮罩功能支持多几何图形处理
276
- - **测量工具:** 添加测量距离和面积功能及工具栏样式
277
- - **地图:** 添加自定义投影配置支持
278
- - **日志管理:** 实现统一日志开关与级别控制
279
- - **SelectHandler:** 新增要素选择处理器模块
280
- - upgrade OpenLayers to v10.6.1 and update project to v2.0.0
281
- - update MapBaseLayers to handle optional token and improve annotation layer management
282
- - 重新添加已清理的App.vue文件,移除了所有敏感token信息
283
- - 重构Vue模板点位功能并优化事件管理
284
- - **Polygon:** 改进图像图层处理逻辑并添加更新功能
285
- - 添加验证工具类并重构现有验证逻辑
286
- - **地图工具:** 重构地图工具类并增强错误处理
287
- - 重构类型系统并增强核心功能
288
-
289
- ### 🐛 Bug Fixes
290
-
291
- - **core:** 改进Vue依赖检测逻辑并更新版本号
292
- - **VueTemplatePoint:** 修复Vue3环境下pointData的类型定义
293
- - **core:** 修正Line类中layerName属性设置错误
294
- - resolve TypeScript build error in MapBaseLayers.ts
295
-
296
- ### ⚡ Performance
297
-
298
- - **Polygon:** 优化GeoJSON解析性能,直接注入layerName
299
-
300
- ### ♻️ Refactor
301
-
302
- - **MapBaseLayers:** 重构图层管理逻辑,优化代码结构和可维护性
303
- - **ConfigManager:** 集中管理默认配置并移除无用接口
304
- - **样式处理:** 统一处理自定义样式逻辑并修复代码格式
305
- - 将nameKey重命名为textKey以提高语义清晰度
306
- - 更新依赖项并优化类型导出结构
307
- - **core:** 重构DomPoint和MapBaseLayers类,优化代码结构和功能
308
-
309
- ### 📝 Documentation
310
-
311
- - 添加详细模块文档并更新发布配置
312
- - update README with branch strategy and add migration guide
313
-
314
- # Changelog
315
-
316
- ## [2.4.3] - 2026-01-27
317
-
318
- ### ✨ Features
319
-
320
- - 重构Polygon样式处理并添加示例组件
321
- - **core:** 添加基于GeoJSON数据的地图定位功能
322
- - **core:** 添加地图定位功能并重构点位相关方法
323
- - **Point:** 添加闪烁点功能及示例
324
- - **core:** 为Polygon添加layerName选项并调整图层添加逻辑
325
- - **Point:** 添加setOneVisibleByProp方法控制点显示
326
- - **Polygon:** 优化遮罩功能支持多几何图形处理
327
- - **测量工具:** 添加测量距离和面积功能及工具栏样式
328
- - **地图:** 添加自定义投影配置支持
329
- - **日志管理:** 实现统一日志开关与级别控制
330
- - **SelectHandler:** 新增要素选择处理器模块
331
- - upgrade OpenLayers to v10.6.1 and update project to v2.0.0
332
- - update MapBaseLayers to handle optional token and improve annotation layer management
333
- - 重新添加已清理的App.vue文件,移除了所有敏感token信息
334
- - 重构Vue模板点位功能并优化事件管理
335
- - **Polygon:** 改进图像图层处理逻辑并添加更新功能
336
- - 添加验证工具类并重构现有验证逻辑
337
- - **地图工具:** 重构地图工具类并增强错误处理
338
- - 重构类型系统并增强核心功能
339
-
340
- ### 🐛 Bug Fixes
341
-
342
- - **core:** 改进Vue依赖检测逻辑并更新版本号
343
- - **VueTemplatePoint:** 修复Vue3环境下pointData的类型定义
344
- - **core:** 修正Line类中layerName属性设置错误
345
- - resolve TypeScript build error in MapBaseLayers.ts
346
-
347
- ### ⚡ Performance
348
-
349
- - **Polygon:** 优化GeoJSON解析性能,直接注入layerName
350
-
351
- ### ♻️ Refactor
352
-
353
- - **MapBaseLayers:** 重构图层管理逻辑,优化代码结构和可维护性
354
- - **ConfigManager:** 集中管理默认配置并移除无用接口
355
- - **样式处理:** 统一处理自定义样式逻辑并修复代码格式
356
- - 将nameKey重命名为textKey以提高语义清晰度
357
- - 更新依赖项并优化类型导出结构
358
- - **core:** 重构DomPoint和MapBaseLayers类,优化代码结构和功能
359
-
360
- ### 📝 Documentation
361
-
362
- - 添加详细模块文档并更新发布配置
363
- - update README with branch strategy and add migration guide
364
-
365
- All notable changes to this project will be documented in this file.
366
-
166
+ ## [2.4.5] - 2026-01-30
167
+
168
+ ### Features
169
+
170
+ - **SelectHandler:** 重构选择交互以支持独立样式渲染和多选隔离
171
+ - 重构Polygon样式处理并添加示例组件
172
+ - **core:** 添加基于GeoJSON数据的地图定位功能
173
+ - **core:** 添加地图定位功能并重构点位相关方法
174
+ - **Point:** 添加闪烁点功能及示例
175
+ - **core:** 为Polygon添加layerName选项并调整图层添加逻辑
176
+ - **Point:** 添加setOneVisibleByProp方法控制点显示
177
+ - **Polygon:** 优化遮罩功能支持多几何图形处理
178
+ - **测量工具:** 添加测量距离和面积功能及工具栏样式
179
+ - **地图:** 添加自定义投影配置支持
180
+ - **日志管理:** 实现统一日志开关与级别控制
181
+ - **SelectHandler:** 新增要素选择处理器模块
182
+ - upgrade OpenLayers to v10.6.1 and update project to v2.0.0
183
+ - update MapBaseLayers to handle optional token and improve annotation layer management
184
+ - 重新添加已清理的App.vue文件,移除了所有敏感token信息
185
+ - 重构Vue模板点位功能并优化事件管理
186
+ - **Polygon:** 改进图像图层处理逻辑并添加更新功能
187
+ - 添加验证工具类并重构现有验证逻辑
188
+ - **地图工具:** 重构地图工具类并增强错误处理
189
+ - 重构类型系统并增强核心功能
190
+
191
+ ### 🐛 Bug Fixes
192
+
193
+ - **core:** 改进Vue依赖检测逻辑并更新版本号
194
+ - **VueTemplatePoint:** 修复Vue3环境下pointData的类型定义
195
+ - **core:** 修正Line类中layerName属性设置错误
196
+ - resolve TypeScript build error in MapBaseLayers.ts
197
+
198
+ ### Performance
199
+
200
+ - **Polygon:** 优化GeoJSON解析性能,直接注入layerName
201
+
202
+ ### ♻️ Refactor
203
+
204
+ - **MapBaseLayers:** 重构图层管理逻辑,优化代码结构和可维护性
205
+ - **ConfigManager:** 集中管理默认配置并移除无用接口
206
+ - **样式处理:** 统一处理自定义样式逻辑并修复代码格式
207
+ - 将nameKey重命名为textKey以提高语义清晰度
208
+ - 更新依赖项并优化类型导出结构
209
+ - **core:** 重构DomPoint和MapBaseLayers类,优化代码结构和功能
210
+
211
+ ### 📝 Documentation
212
+
213
+ - 添加详细模块文档并更新发布配置
214
+ - update README with branch strategy and add migration guide
215
+
216
+ # Changelog
217
+
218
+ ## [2.4.3] - 2026-01-27
219
+
220
+ ### ✨ Features
221
+
222
+ - 重构Polygon样式处理并添加示例组件
223
+ - **core:** 添加基于GeoJSON数据的地图定位功能
224
+ - **core:** 添加地图定位功能并重构点位相关方法
225
+ - **Point:** 添加闪烁点功能及示例
226
+ - **core:** 为Polygon添加layerName选项并调整图层添加逻辑
227
+ - **Point:** 添加setOneVisibleByProp方法控制点显示
228
+ - **Polygon:** 优化遮罩功能支持多几何图形处理
229
+ - **测量工具:** 添加测量距离和面积功能及工具栏样式
230
+ - **地图:** 添加自定义投影配置支持
231
+ - **日志管理:** 实现统一日志开关与级别控制
232
+ - **SelectHandler:** 新增要素选择处理器模块
233
+ - upgrade OpenLayers to v10.6.1 and update project to v2.0.0
234
+ - update MapBaseLayers to handle optional token and improve annotation layer management
235
+ - 重新添加已清理的App.vue文件,移除了所有敏感token信息
236
+ - 重构Vue模板点位功能并优化事件管理
237
+ - **Polygon:** 改进图像图层处理逻辑并添加更新功能
238
+ - 添加验证工具类并重构现有验证逻辑
239
+ - **地图工具:** 重构地图工具类并增强错误处理
240
+ - 重构类型系统并增强核心功能
241
+
242
+ ### 🐛 Bug Fixes
243
+
244
+ - **core:** 改进Vue依赖检测逻辑并更新版本号
245
+ - **VueTemplatePoint:** 修复Vue3环境下pointData的类型定义
246
+ - **core:** 修正Line类中layerName属性设置错误
247
+ - resolve TypeScript build error in MapBaseLayers.ts
248
+
249
+ ### Performance
250
+
251
+ - **Polygon:** 优化GeoJSON解析性能,直接注入layerName
252
+
253
+ ### ♻️ Refactor
254
+
255
+ - **MapBaseLayers:** 重构图层管理逻辑,优化代码结构和可维护性
256
+ - **ConfigManager:** 集中管理默认配置并移除无用接口
257
+ - **样式处理:** 统一处理自定义样式逻辑并修复代码格式
258
+ - 将nameKey重命名为textKey以提高语义清晰度
259
+ - 更新依赖项并优化类型导出结构
260
+ - **core:** 重构DomPoint和MapBaseLayers类,优化代码结构和功能
261
+
262
+ ### 📝 Documentation
263
+
264
+ - 添加详细模块文档并更新发布配置
265
+ - update README with branch strategy and add migration guide
266
+
267
+ All notable changes to this project will be documented in this file.
268
+
package/MyOl.d.ts CHANGED
@@ -1,14 +1,11 @@
1
1
  import View from "ol/View";
2
2
  import Map from "ol/Map";
3
- import Polygon from "./core/Polygon";
4
- import Point from "./core/Point";
5
- import Line from "./core/Line";
6
- import MapBaseLayers from "./core/MapBaseLayers";
7
- import MapTools from "./core/MapTools";
8
- import SelectHandler from "./core/SelectHandler";
3
+ import { Polygon } from "./core/polygon";
4
+ import { Point } from "./core/point";
5
+ import { Line } from "./core/line";
6
+ import { MapBaseLayers, MapTools, EventManager, ConfigManager } from "./core/map";
7
+ import { SelectHandler } from "./core/select";
9
8
  import { ErrorHandler } from './utils/ErrorHandler';
10
- import { EventManager } from './core/EventManager';
11
- import { ConfigManager } from './core/ConfigManager';
12
9
  import { MapInitType } from './types';
13
10
  /**
14
11
  * MyOl 地图核心类
@@ -107,7 +104,10 @@ export default class MyOl {
107
104
  * @param zoom 缩放级别
108
105
  * @param duration 动画持续时间(毫秒)
109
106
  */
110
- locationAction(longitude: number, latitude: number, zoom?: number, duration?: number): void;
107
+ locationAction(longitude: number, latitude: number, zoom?: number, duration?: number, projection?: {
108
+ dataProjection?: string;
109
+ featureProjection?: string;
110
+ }): void;
111
111
  /**
112
112
  * 获取错误处理器实例
113
113
  * @returns ErrorHandler 错误处理器
package/MyOl.js CHANGED
@@ -7,15 +7,12 @@ import Map from "ol/Map";
7
7
  import { defaults as defaultControls } from 'ol/control';
8
8
  import proj4 from "proj4";
9
9
  // 内部模块导入
10
- import Polygon from "./core/Polygon";
11
- import Point from "./core/Point";
12
- import Line from "./core/Line";
13
- import MapBaseLayers from "./core/MapBaseLayers";
14
- import MapTools from "./core/MapTools";
15
- import SelectHandler from "./core/SelectHandler";
10
+ import { Polygon } from "./core/polygon";
11
+ import { Point } from "./core/point";
12
+ import { Line } from "./core/line";
13
+ import { MapBaseLayers, MapTools, EventManager, ConfigManager } from "./core/map";
14
+ import { SelectHandler } from "./core/select";
16
15
  import { ErrorHandler, MyOpenLayersError, ErrorType } from './utils/ErrorHandler';
17
- import { EventManager } from './core/EventManager';
18
- import { ConfigManager } from './core/ConfigManager';
19
16
  /**
20
17
  * MyOl 地图核心类
21
18
  * 提供完整的地图操作功能,包括点、线、面要素管理,底图切换,工具操作等
@@ -149,8 +146,6 @@ class MyOl {
149
146
  */
150
147
  static createView(options = MyOl.DefaultOptions) {
151
148
  try {
152
- // 确保坐标系已注册(支持独立调用 createView 而不先实例化 MyOl)
153
- MyOl.initializeProjections(options);
154
149
  const code = options.projection?.code ?? MyOl.PROJECTIONS.CGCS2000;
155
150
  const projection = new olProjProjection({
156
151
  code,
@@ -323,19 +318,25 @@ class MyOl {
323
318
  * @param zoom 缩放级别
324
319
  * @param duration 动画持续时间(毫秒)
325
320
  */
326
- locationAction(longitude, latitude, zoom = 20, duration = 3000) {
321
+ locationAction(longitude, latitude, zoom = 20, duration = 3000, projection) {
327
322
  try {
328
323
  // 参数验证
329
324
  if (typeof longitude !== 'number' || typeof latitude !== 'number') {
330
325
  throw new Error('经纬度必须是数字类型');
331
326
  }
332
- if (longitude < -180 || longitude > 180) {
333
- throw new Error('经度值必须在 -180 180 之间');
327
+ const hasProjection = !!projection?.dataProjection || !!projection?.featureProjection;
328
+ if (!Number.isFinite(longitude) || !Number.isFinite(latitude)) {
329
+ throw new Error('经纬度必须是有效数字');
334
330
  }
335
- if (latitude < -90 || latitude > 90) {
336
- throw new Error('纬度值必须在 -90 90 之间');
331
+ if (!hasProjection) {
332
+ if (longitude < -180 || longitude > 180) {
333
+ throw new Error('经度值必须在 -180 到 180 之间');
334
+ }
335
+ if (latitude < -90 || latitude > 90) {
336
+ throw new Error('纬度值必须在 -90 到 90 之间');
337
+ }
337
338
  }
338
- this.getTools().locationAction(longitude, latitude, zoom, duration);
339
+ this.getTools().locationAction(longitude, latitude, zoom, duration, projection);
339
340
  // 记录定位操作
340
341
  this.errorHandler.debug('地图定位完成', {
341
342
  longitude,