my-openlayer 2.4.12 → 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 (171) hide show
  1. package/CHANGELOG.md +251 -251
  2. package/LICENSE +21 -21
  3. package/MyOl.d.ts +9 -9
  4. package/MyOl.js +17 -14
  5. package/README.md +174 -148
  6. package/core/line/Line.d.ts +40 -0
  7. package/core/line/Line.js +144 -0
  8. package/core/line/LineFeatureFactory.d.ts +17 -0
  9. package/core/line/LineFeatureFactory.js +75 -0
  10. package/core/line/LineFlowAnimator.d.ts +53 -0
  11. package/core/line/LineFlowAnimator.js +297 -0
  12. package/core/line/LineStyleFactory.d.ts +43 -0
  13. package/core/line/LineStyleFactory.js +135 -0
  14. package/core/{RiverLayerManager.d.ts → line/RiverLayerManager.d.ts} +2 -2
  15. package/core/{RiverLayerManager.js → line/RiverLayerManager.js} +3 -5
  16. package/core/line/index.d.ts +6 -0
  17. package/core/line/index.js +5 -0
  18. package/core/{ConfigManager.d.ts → map/ConfigManager.d.ts} +25 -1
  19. package/core/{ConfigManager.js → map/ConfigManager.js} +22 -1
  20. package/core/{EventManager.d.ts → map/EventManager.d.ts} +1 -1
  21. package/core/{EventManager.js → map/EventManager.js} +2 -2
  22. package/core/{MapBaseLayers.d.ts → map/MapBaseLayers.d.ts} +1 -1
  23. package/core/{MapBaseLayers.js → map/MapBaseLayers.js} +3 -3
  24. package/core/{MapTools.d.ts → map/MapTools.d.ts} +5 -2
  25. package/core/{MapTools.js → map/MapTools.js} +11 -5
  26. package/core/{MeasureHandler.d.ts → map/MeasureHandler.d.ts} +1 -1
  27. package/core/{MeasureHandler.js → map/MeasureHandler.js} +41 -41
  28. package/core/map/index.d.ts +5 -0
  29. package/core/map/index.js +5 -0
  30. package/core/{Point.d.ts → point/Point.d.ts} +6 -14
  31. package/core/point/Point.js +272 -0
  32. package/core/point/PointClusterLayer.d.ts +10 -0
  33. package/core/point/PointClusterLayer.js +52 -0
  34. package/core/point/PointOverlay.d.ts +13 -0
  35. package/core/point/PointOverlay.js +57 -0
  36. package/core/point/PointPulseLayer.d.ts +13 -0
  37. package/core/point/PointPulseLayer.js +207 -0
  38. package/core/point/index.d.ts +4 -0
  39. package/core/point/index.js +4 -0
  40. package/core/{Polygon.d.ts → polygon/Polygon.d.ts} +4 -50
  41. package/core/polygon/Polygon.js +248 -0
  42. package/core/polygon/PolygonHeatmapLayer.d.ts +11 -0
  43. package/core/polygon/PolygonHeatmapLayer.js +40 -0
  44. package/core/polygon/PolygonImageLayer.d.ts +9 -0
  45. package/core/polygon/PolygonImageLayer.js +61 -0
  46. package/core/polygon/PolygonMaskLayer.d.ts +20 -0
  47. package/core/polygon/PolygonMaskLayer.js +107 -0
  48. package/core/polygon/PolygonStyleFactory.d.ts +12 -0
  49. package/core/polygon/PolygonStyleFactory.js +100 -0
  50. package/core/polygon/index.d.ts +5 -0
  51. package/core/polygon/index.js +5 -0
  52. package/core/{SelectHandler.d.ts → select/SelectHandler.d.ts} +2 -3
  53. package/core/{SelectHandler.js → select/SelectHandler.js} +4 -4
  54. package/core/select/index.d.ts +1 -0
  55. package/core/select/index.js +1 -0
  56. package/core/{VueTemplatePoint.d.ts → vue-template-point/VueTemplatePoint.d.ts} +1 -1
  57. package/core/{VueTemplatePoint.js → vue-template-point/VueTemplatePoint.js} +4 -4
  58. package/core/vue-template-point/index.d.ts +1 -0
  59. package/core/vue-template-point/index.js +1 -0
  60. package/docs/.vitepress/config.mts +57 -57
  61. package/docs/ConfigManager.md +71 -71
  62. package/docs/ErrorHandler.md +106 -106
  63. package/docs/EventManager.md +142 -142
  64. package/docs/Line.md +215 -187
  65. package/docs/MapBaseLayers.md +198 -198
  66. package/docs/MapTools.md +172 -172
  67. package/docs/MeasureHandler.md +87 -87
  68. package/docs/MyOl.md +247 -247
  69. package/docs/Point.md +136 -136
  70. package/docs/Polygon.md +241 -241
  71. package/docs/RiverLayerManager.md +187 -187
  72. package/docs/SelectHandler.md +147 -147
  73. package/docs/ValidationUtils.md +83 -83
  74. package/docs/VueTemplatePoint.md +214 -214
  75. package/docs/index.md +73 -73
  76. package/index.d.ts +10 -15
  77. package/index.js +7 -13
  78. package/package.json +11 -1
  79. package/types/base.d.ts +47 -0
  80. package/types/base.js +1 -0
  81. package/types/common.d.ts +59 -0
  82. package/types/common.js +1 -0
  83. package/types/index.d.ts +9 -0
  84. package/types/index.js +1 -0
  85. package/types/line.d.ts +41 -0
  86. package/types/line.js +1 -0
  87. package/types/map.d.ts +77 -0
  88. package/types/map.js +1 -0
  89. package/types/point.d.ts +54 -0
  90. package/types/point.js +1 -0
  91. package/types/polygon.d.ts +8 -0
  92. package/types/polygon.js +1 -0
  93. package/types/select.d.ts +25 -0
  94. package/types/select.js +1 -0
  95. package/types/vue-template-point.d.ts +54 -0
  96. package/{types.js → types/vue-template-point.js} +0 -3
  97. package/utils/ProjectionUtils.d.ts +28 -0
  98. package/utils/ProjectionUtils.js +34 -0
  99. package/utils/ValidationUtils.d.ts +33 -86
  100. package/utils/ValidationUtils.js +60 -165
  101. package/core/Line.d.ts +0 -49
  102. package/core/Line.js +0 -114
  103. package/core/Point.js +0 -560
  104. package/core/Polygon.js +0 -646
  105. package/docs/.vitepress/dist/404.html +0 -22
  106. package/docs/.vitepress/dist/ConfigManager.html +0 -46
  107. package/docs/.vitepress/dist/ErrorHandler.html +0 -52
  108. package/docs/.vitepress/dist/EventManager.html +0 -58
  109. package/docs/.vitepress/dist/Line.html +0 -92
  110. package/docs/.vitepress/dist/MapBaseLayers.html +0 -52
  111. package/docs/.vitepress/dist/MapTools.html +0 -81
  112. package/docs/.vitepress/dist/MeasureHandler.html +0 -32
  113. package/docs/.vitepress/dist/MyOl.html +0 -62
  114. package/docs/.vitepress/dist/Point.html +0 -81
  115. package/docs/.vitepress/dist/Polygon.html +0 -102
  116. package/docs/.vitepress/dist/RiverLayerManager.html +0 -66
  117. package/docs/.vitepress/dist/SelectHandler.html +0 -46
  118. package/docs/.vitepress/dist/ValidationUtils.html +0 -47
  119. package/docs/.vitepress/dist/VueTemplatePoint.html +0 -112
  120. package/docs/.vitepress/dist/assets/ConfigManager.md.BOMdGTaa.js +0 -22
  121. package/docs/.vitepress/dist/assets/ConfigManager.md.BOMdGTaa.lean.js +0 -1
  122. package/docs/.vitepress/dist/assets/ErrorHandler.md.yUiuJ9w9.js +0 -28
  123. package/docs/.vitepress/dist/assets/ErrorHandler.md.yUiuJ9w9.lean.js +0 -1
  124. package/docs/.vitepress/dist/assets/EventManager.md.BhCUVy1f.js +0 -34
  125. package/docs/.vitepress/dist/assets/EventManager.md.BhCUVy1f.lean.js +0 -1
  126. package/docs/.vitepress/dist/assets/Line.md.BAQOzmSt.js +0 -68
  127. package/docs/.vitepress/dist/assets/Line.md.BAQOzmSt.lean.js +0 -1
  128. package/docs/.vitepress/dist/assets/MapBaseLayers.md.Bw0L_m0b.js +0 -28
  129. package/docs/.vitepress/dist/assets/MapBaseLayers.md.Bw0L_m0b.lean.js +0 -1
  130. package/docs/.vitepress/dist/assets/MapTools.md.DaYgiDPe.js +0 -57
  131. package/docs/.vitepress/dist/assets/MapTools.md.DaYgiDPe.lean.js +0 -1
  132. package/docs/.vitepress/dist/assets/MeasureHandler.md.7Sf4ymRv.js +0 -8
  133. package/docs/.vitepress/dist/assets/MeasureHandler.md.7Sf4ymRv.lean.js +0 -1
  134. package/docs/.vitepress/dist/assets/MyOl.md.D-14Gzjy.js +0 -38
  135. package/docs/.vitepress/dist/assets/MyOl.md.D-14Gzjy.lean.js +0 -1
  136. package/docs/.vitepress/dist/assets/Point.md.Bi9juuuv.js +0 -57
  137. package/docs/.vitepress/dist/assets/Point.md.Bi9juuuv.lean.js +0 -1
  138. package/docs/.vitepress/dist/assets/Polygon.md.-JIqEvzD.js +0 -78
  139. package/docs/.vitepress/dist/assets/Polygon.md.-JIqEvzD.lean.js +0 -1
  140. package/docs/.vitepress/dist/assets/RiverLayerManager.md.CfUu2RxH.js +0 -42
  141. package/docs/.vitepress/dist/assets/RiverLayerManager.md.CfUu2RxH.lean.js +0 -1
  142. package/docs/.vitepress/dist/assets/SelectHandler.md.COR4ez_p.js +0 -22
  143. package/docs/.vitepress/dist/assets/SelectHandler.md.COR4ez_p.lean.js +0 -1
  144. package/docs/.vitepress/dist/assets/ValidationUtils.md.ReTVWa73.js +0 -23
  145. package/docs/.vitepress/dist/assets/ValidationUtils.md.ReTVWa73.lean.js +0 -1
  146. package/docs/.vitepress/dist/assets/VueTemplatePoint.md.CtxSb5Pm.js +0 -88
  147. package/docs/.vitepress/dist/assets/VueTemplatePoint.md.CtxSb5Pm.lean.js +0 -1
  148. package/docs/.vitepress/dist/assets/app.YvjVuxaB.js +0 -1
  149. package/docs/.vitepress/dist/assets/chunks/framework.C_W0ODpn.js +0 -18
  150. package/docs/.vitepress/dist/assets/chunks/theme.Bf87fILP.js +0 -1
  151. package/docs/.vitepress/dist/assets/index.md.BJz6tHSr.js +0 -26
  152. package/docs/.vitepress/dist/assets/index.md.BJz6tHSr.lean.js +0 -1
  153. package/docs/.vitepress/dist/assets/inter-italic-cyrillic-ext.r48I6akx.woff2 +0 -0
  154. package/docs/.vitepress/dist/assets/inter-italic-cyrillic.By2_1cv3.woff2 +0 -0
  155. package/docs/.vitepress/dist/assets/inter-italic-greek-ext.1u6EdAuj.woff2 +0 -0
  156. package/docs/.vitepress/dist/assets/inter-italic-greek.DJ8dCoTZ.woff2 +0 -0
  157. package/docs/.vitepress/dist/assets/inter-italic-latin-ext.CN1xVJS-.woff2 +0 -0
  158. package/docs/.vitepress/dist/assets/inter-italic-latin.C2AdPX0b.woff2 +0 -0
  159. package/docs/.vitepress/dist/assets/inter-italic-vietnamese.BSbpV94h.woff2 +0 -0
  160. package/docs/.vitepress/dist/assets/inter-roman-cyrillic-ext.BBPuwvHQ.woff2 +0 -0
  161. package/docs/.vitepress/dist/assets/inter-roman-cyrillic.C5lxZ8CY.woff2 +0 -0
  162. package/docs/.vitepress/dist/assets/inter-roman-greek-ext.CqjqNYQ-.woff2 +0 -0
  163. package/docs/.vitepress/dist/assets/inter-roman-greek.BBVDIX6e.woff2 +0 -0
  164. package/docs/.vitepress/dist/assets/inter-roman-latin-ext.4ZJIpNVo.woff2 +0 -0
  165. package/docs/.vitepress/dist/assets/inter-roman-latin.Di8DUHzh.woff2 +0 -0
  166. package/docs/.vitepress/dist/assets/inter-roman-vietnamese.BjW4sHH5.woff2 +0 -0
  167. package/docs/.vitepress/dist/assets/style.C2pAQzDq.css +0 -1
  168. package/docs/.vitepress/dist/hashmap.json +0 -1
  169. package/docs/.vitepress/dist/index.html +0 -50
  170. package/docs/.vitepress/dist/vp-icons.css +0 -1
  171. package/types.d.ts +0 -431
package/CHANGELOG.md CHANGED
@@ -15,254 +15,254 @@
15
15
  ## [2.4.8] - 2026-01-30
16
16
 
17
17
  ### ✨ Features
18
-
19
- - **SelectHandler:** 重构选择交互以支持独立样式渲染和多选隔离
20
- - 重构Polygon样式处理并添加示例组件
21
- - **core:** 添加基于GeoJSON数据的地图定位功能
22
- - **core:** 添加地图定位功能并重构点位相关方法
23
- - **Point:** 添加闪烁点功能及示例
24
- - **core:** 为Polygon添加layerName选项并调整图层添加逻辑
25
- - **Point:** 添加setOneVisibleByProp方法控制点显示
26
- - **Polygon:** 优化遮罩功能支持多几何图形处理
27
- - **测量工具:** 添加测量距离和面积功能及工具栏样式
28
- - **地图:** 添加自定义投影配置支持
29
- - **日志管理:** 实现统一日志开关与级别控制
30
- - **SelectHandler:** 新增要素选择处理器模块
31
- - upgrade OpenLayers to v10.6.1 and update project to v2.0.0
32
- - update MapBaseLayers to handle optional token and improve annotation layer management
33
- - 重新添加已清理的App.vue文件,移除了所有敏感token信息
34
- - 重构Vue模板点位功能并优化事件管理
35
- - **Polygon:** 改进图像图层处理逻辑并添加更新功能
36
- - 添加验证工具类并重构现有验证逻辑
37
- - **地图工具:** 重构地图工具类并增强错误处理
38
- - 重构类型系统并增强核心功能
39
-
40
- ### 🐛 Bug Fixes
41
-
42
- - **core:** 改进Vue依赖检测逻辑并更新版本号
43
- - **VueTemplatePoint:** 修复Vue3环境下pointData的类型定义
44
- - **core:** 修正Line类中layerName属性设置错误
45
- - resolve TypeScript build error in MapBaseLayers.ts
46
-
47
- ### ⚡ Performance
48
-
49
- - **Polygon:** 优化GeoJSON解析性能,直接注入layerName
50
-
51
- ### ♻️ Refactor
52
-
53
- - **MapBaseLayers:** 重构图层管理逻辑,优化代码结构和可维护性
54
- - **ConfigManager:** 集中管理默认配置并移除无用接口
55
- - **样式处理:** 统一处理自定义样式逻辑并修复代码格式
56
- - 将nameKey重命名为textKey以提高语义清晰度
57
- - 更新依赖项并优化类型导出结构
58
- - **core:** 重构DomPoint和MapBaseLayers类,优化代码结构和功能
59
-
60
- ### 📝 Documentation
61
-
62
- - add vitepress documentation and github actions workflow
63
- - 添加详细模块文档并更新发布配置
64
- - update README with branch strategy and add migration guide
65
-
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
117
-
118
- ### ✨ Features
119
-
120
- - **SelectHandler:** 重构选择交互以支持独立样式渲染和多选隔离
121
- - 重构Polygon样式处理并添加示例组件
122
- - **core:** 添加基于GeoJSON数据的地图定位功能
123
- - **core:** 添加地图定位功能并重构点位相关方法
124
- - **Point:** 添加闪烁点功能及示例
125
- - **core:** 为Polygon添加layerName选项并调整图层添加逻辑
126
- - **Point:** 添加setOneVisibleByProp方法控制点显示
127
- - **Polygon:** 优化遮罩功能支持多几何图形处理
128
- - **测量工具:** 添加测量距离和面积功能及工具栏样式
129
- - **地图:** 添加自定义投影配置支持
130
- - **日志管理:** 实现统一日志开关与级别控制
131
- - **SelectHandler:** 新增要素选择处理器模块
132
- - upgrade OpenLayers to v10.6.1 and update project to v2.0.0
133
- - update MapBaseLayers to handle optional token and improve annotation layer management
134
- - 重新添加已清理的App.vue文件,移除了所有敏感token信息
135
- - 重构Vue模板点位功能并优化事件管理
136
- - **Polygon:** 改进图像图层处理逻辑并添加更新功能
137
- - 添加验证工具类并重构现有验证逻辑
138
- - **地图工具:** 重构地图工具类并增强错误处理
139
- - 重构类型系统并增强核心功能
140
-
141
- ### 🐛 Bug Fixes
142
-
143
- - **core:** 改进Vue依赖检测逻辑并更新版本号
144
- - **VueTemplatePoint:** 修复Vue3环境下pointData的类型定义
145
- - **core:** 修正Line类中layerName属性设置错误
146
- - resolve TypeScript build error in MapBaseLayers.ts
147
-
148
- ### ⚡ Performance
149
-
150
- - **Polygon:** 优化GeoJSON解析性能,直接注入layerName
151
-
152
- ### ♻️ Refactor
153
-
154
- - **MapBaseLayers:** 重构图层管理逻辑,优化代码结构和可维护性
155
- - **ConfigManager:** 集中管理默认配置并移除无用接口
156
- - **样式处理:** 统一处理自定义样式逻辑并修复代码格式
157
- - 将nameKey重命名为textKey以提高语义清晰度
158
- - 更新依赖项并优化类型导出结构
159
- - **core:** 重构DomPoint和MapBaseLayers类,优化代码结构和功能
160
-
161
- ### 📝 Documentation
162
-
163
- - 添加详细模块文档并更新发布配置
164
- - update README with branch strategy and add migration guide
165
-
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
-
18
+
19
+ - **SelectHandler:** 重构选择交互以支持独立样式渲染和多选隔离
20
+ - 重构Polygon样式处理并添加示例组件
21
+ - **core:** 添加基于GeoJSON数据的地图定位功能
22
+ - **core:** 添加地图定位功能并重构点位相关方法
23
+ - **Point:** 添加闪烁点功能及示例
24
+ - **core:** 为Polygon添加layerName选项并调整图层添加逻辑
25
+ - **Point:** 添加setOneVisibleByProp方法控制点显示
26
+ - **Polygon:** 优化遮罩功能支持多几何图形处理
27
+ - **测量工具:** 添加测量距离和面积功能及工具栏样式
28
+ - **地图:** 添加自定义投影配置支持
29
+ - **日志管理:** 实现统一日志开关与级别控制
30
+ - **SelectHandler:** 新增要素选择处理器模块
31
+ - upgrade OpenLayers to v10.6.1 and update project to v2.0.0
32
+ - update MapBaseLayers to handle optional token and improve annotation layer management
33
+ - 重新添加已清理的App.vue文件,移除了所有敏感token信息
34
+ - 重构Vue模板点位功能并优化事件管理
35
+ - **Polygon:** 改进图像图层处理逻辑并添加更新功能
36
+ - 添加验证工具类并重构现有验证逻辑
37
+ - **地图工具:** 重构地图工具类并增强错误处理
38
+ - 重构类型系统并增强核心功能
39
+
40
+ ### 🐛 Bug Fixes
41
+
42
+ - **core:** 改进Vue依赖检测逻辑并更新版本号
43
+ - **VueTemplatePoint:** 修复Vue3环境下pointData的类型定义
44
+ - **core:** 修正Line类中layerName属性设置错误
45
+ - resolve TypeScript build error in MapBaseLayers.ts
46
+
47
+ ### ⚡ Performance
48
+
49
+ - **Polygon:** 优化GeoJSON解析性能,直接注入layerName
50
+
51
+ ### ♻️ Refactor
52
+
53
+ - **MapBaseLayers:** 重构图层管理逻辑,优化代码结构和可维护性
54
+ - **ConfigManager:** 集中管理默认配置并移除无用接口
55
+ - **样式处理:** 统一处理自定义样式逻辑并修复代码格式
56
+ - 将nameKey重命名为textKey以提高语义清晰度
57
+ - 更新依赖项并优化类型导出结构
58
+ - **core:** 重构DomPoint和MapBaseLayers类,优化代码结构和功能
59
+
60
+ ### 📝 Documentation
61
+
62
+ - add vitepress documentation and github actions workflow
63
+ - 添加详细模块文档并更新发布配置
64
+ - update README with branch strategy and add migration guide
65
+
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
117
+
118
+ ### ✨ Features
119
+
120
+ - **SelectHandler:** 重构选择交互以支持独立样式渲染和多选隔离
121
+ - 重构Polygon样式处理并添加示例组件
122
+ - **core:** 添加基于GeoJSON数据的地图定位功能
123
+ - **core:** 添加地图定位功能并重构点位相关方法
124
+ - **Point:** 添加闪烁点功能及示例
125
+ - **core:** 为Polygon添加layerName选项并调整图层添加逻辑
126
+ - **Point:** 添加setOneVisibleByProp方法控制点显示
127
+ - **Polygon:** 优化遮罩功能支持多几何图形处理
128
+ - **测量工具:** 添加测量距离和面积功能及工具栏样式
129
+ - **地图:** 添加自定义投影配置支持
130
+ - **日志管理:** 实现统一日志开关与级别控制
131
+ - **SelectHandler:** 新增要素选择处理器模块
132
+ - upgrade OpenLayers to v10.6.1 and update project to v2.0.0
133
+ - update MapBaseLayers to handle optional token and improve annotation layer management
134
+ - 重新添加已清理的App.vue文件,移除了所有敏感token信息
135
+ - 重构Vue模板点位功能并优化事件管理
136
+ - **Polygon:** 改进图像图层处理逻辑并添加更新功能
137
+ - 添加验证工具类并重构现有验证逻辑
138
+ - **地图工具:** 重构地图工具类并增强错误处理
139
+ - 重构类型系统并增强核心功能
140
+
141
+ ### 🐛 Bug Fixes
142
+
143
+ - **core:** 改进Vue依赖检测逻辑并更新版本号
144
+ - **VueTemplatePoint:** 修复Vue3环境下pointData的类型定义
145
+ - **core:** 修正Line类中layerName属性设置错误
146
+ - resolve TypeScript build error in MapBaseLayers.ts
147
+
148
+ ### ⚡ Performance
149
+
150
+ - **Polygon:** 优化GeoJSON解析性能,直接注入layerName
151
+
152
+ ### ♻️ Refactor
153
+
154
+ - **MapBaseLayers:** 重构图层管理逻辑,优化代码结构和可维护性
155
+ - **ConfigManager:** 集中管理默认配置并移除无用接口
156
+ - **样式处理:** 统一处理自定义样式逻辑并修复代码格式
157
+ - 将nameKey重命名为textKey以提高语义清晰度
158
+ - 更新依赖项并优化类型导出结构
159
+ - **core:** 重构DomPoint和MapBaseLayers类,优化代码结构和功能
160
+
161
+ ### 📝 Documentation
162
+
163
+ - 添加详细模块文档并更新发布配置
164
+ - update README with branch strategy and add migration guide
165
+
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/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/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
  * 提供完整的地图操作功能,包括点、线、面要素管理,底图切换,工具操作等
@@ -321,19 +318,25 @@ class MyOl {
321
318
  * @param zoom 缩放级别
322
319
  * @param duration 动画持续时间(毫秒)
323
320
  */
324
- locationAction(longitude, latitude, zoom = 20, duration = 3000) {
321
+ locationAction(longitude, latitude, zoom = 20, duration = 3000, projection) {
325
322
  try {
326
323
  // 参数验证
327
324
  if (typeof longitude !== 'number' || typeof latitude !== 'number') {
328
325
  throw new Error('经纬度必须是数字类型');
329
326
  }
330
- if (longitude < -180 || longitude > 180) {
331
- throw new Error('经度值必须在 -180 180 之间');
327
+ const hasProjection = !!projection?.dataProjection || !!projection?.featureProjection;
328
+ if (!Number.isFinite(longitude) || !Number.isFinite(latitude)) {
329
+ throw new Error('经纬度必须是有效数字');
332
330
  }
333
- if (latitude < -90 || latitude > 90) {
334
- 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
+ }
335
338
  }
336
- this.getTools().locationAction(longitude, latitude, zoom, duration);
339
+ this.getTools().locationAction(longitude, latitude, zoom, duration, projection);
337
340
  // 记录定位操作
338
341
  this.errorHandler.debug('地图定位完成', {
339
342
  longitude,