my-openlayer 2.4.6 → 2.4.7

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 CHANGED
@@ -1,5 +1,55 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.4.7] - 2026-01-30
4
+
5
+ ### ✨ Features
6
+
7
+ - **SelectHandler:** 重构选择交互以支持独立样式渲染和多选隔离
8
+ - 重构Polygon样式处理并添加示例组件
9
+ - **core:** 添加基于GeoJSON数据的地图定位功能
10
+ - **core:** 添加地图定位功能并重构点位相关方法
11
+ - **Point:** 添加闪烁点功能及示例
12
+ - **core:** 为Polygon添加layerName选项并调整图层添加逻辑
13
+ - **Point:** 添加setOneVisibleByProp方法控制点显示
14
+ - **Polygon:** 优化遮罩功能支持多几何图形处理
15
+ - **测量工具:** 添加测量距离和面积功能及工具栏样式
16
+ - **地图:** 添加自定义投影配置支持
17
+ - **日志管理:** 实现统一日志开关与级别控制
18
+ - **SelectHandler:** 新增要素选择处理器模块
19
+ - upgrade OpenLayers to v10.6.1 and update project to v2.0.0
20
+ - update MapBaseLayers to handle optional token and improve annotation layer management
21
+ - 重新添加已清理的App.vue文件,移除了所有敏感token信息
22
+ - 重构Vue模板点位功能并优化事件管理
23
+ - **Polygon:** 改进图像图层处理逻辑并添加更新功能
24
+ - 添加验证工具类并重构现有验证逻辑
25
+ - **地图工具:** 重构地图工具类并增强错误处理
26
+ - 重构类型系统并增强核心功能
27
+
28
+ ### 🐛 Bug Fixes
29
+
30
+ - **core:** 改进Vue依赖检测逻辑并更新版本号
31
+ - **VueTemplatePoint:** 修复Vue3环境下pointData的类型定义
32
+ - **core:** 修正Line类中layerName属性设置错误
33
+ - resolve TypeScript build error in MapBaseLayers.ts
34
+
35
+ ### ⚡ Performance
36
+
37
+ - **Polygon:** 优化GeoJSON解析性能,直接注入layerName
38
+
39
+ ### ♻️ Refactor
40
+
41
+ - **MapBaseLayers:** 重构图层管理逻辑,优化代码结构和可维护性
42
+ - **ConfigManager:** 集中管理默认配置并移除无用接口
43
+ - **样式处理:** 统一处理自定义样式逻辑并修复代码格式
44
+ - 将nameKey重命名为textKey以提高语义清晰度
45
+ - 更新依赖项并优化类型导出结构
46
+ - **core:** 重构DomPoint和MapBaseLayers类,优化代码结构和功能
47
+
48
+ ### 📝 Documentation
49
+
50
+ - 添加详细模块文档并更新发布配置
51
+ - update README with branch strategy and add migration guide
52
+
3
53
  ## [2.4.6] - 2026-01-30
4
54
 
5
55
  ### ✨ Features
package/core/Point.js CHANGED
@@ -153,6 +153,7 @@ export default class Point {
153
153
  return;
154
154
  }
155
155
  const pointFeature = new Feature({
156
+ type: options.layerName,
156
157
  layerName: options.layerName,
157
158
  geometry: new olPoint([item.lgtd, item.lttd]),
158
159
  name: options.textKey ? item[options.textKey] : '',
@@ -172,7 +173,15 @@ export default class Point {
172
173
  layerName: options.layerName,
173
174
  source: clusterSource,
174
175
  style: (feature) => {
175
- const name = feature.get('features')[0].get(options.textKey);
176
+ if (options.style) {
177
+ if (typeof options.style === 'function') {
178
+ return options.style(feature);
179
+ }
180
+ else {
181
+ return options.style;
182
+ }
183
+ }
184
+ const name = feature.get('features')[0].get('name');
176
185
  return this.createClusterStyle(options, name);
177
186
  },
178
187
  zIndex: options.zIndex || ConfigManager.DEFAULT_CLUSTER_OPTIONS.zIndex,
@@ -278,7 +287,6 @@ export default class Point {
278
287
  anchors,
279
288
  remove: () => {
280
289
  anchors.forEach(anchor => {
281
- console.log('Removing overlay:', anchor);
282
290
  const element = anchor.getElement();
283
291
  if (element) {
284
292
  element.remove();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "my-openlayer",
3
3
  "private": false,
4
- "version": "2.4.6",
4
+ "version": "2.4.7",
5
5
  "type": "module",
6
6
  "license": "MIT",
7
7
  "main": "index.js",