tg-map-vue3 4.2.3 → 4.2.5

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,117 +1,118 @@
1
- # 更新日志
2
-
3
- ## 4.2.x
4
-
5
- - ***BREAKING CHANGE***: `TgMapConfig.talks.layerId`废弃, 改用`layerIds`
6
- - feat: talks支持编辑覆盖物
7
- - feat: [Overlay]新增`addTo`方法
8
- - feat: talks支持切换内置地图类型和暗色模式
9
-
10
- ## 4.1.x
11
-
12
- - ***BREAKING CHANGE***: [AbstractMap]改成接口, 只保留`getCenter`/`panTo`等外部使用的方法
13
- - ***BREAKING CHANGE***: 样式改回独立的css文件, 需要手动导入`import 'tg-map-vue3/dist/tg-map.css'`
14
- - refactor: 独立出单独的[tg-map-core]包
15
- - feat: 使用实现基于maptalks的地图的展示功能
16
- - feat: 实验性支持GL版的baidu地图, 暂时不可用于生产环境
17
- - feat: [TgMap]新增`fractionalZoom`选项
18
- - feat: [TgInfoBox]新增`disableAutoPan`选项
19
- - feat: [TgZoomControl]新增`showZoomLevel`选项
20
- - refactor: [TgMarkerClusterer]的`styles`选项新增`minMarkersLength`属性, 用于支持新的talks地图
21
- - feat: [MarkerLabel]新增`talksStyle`选项
22
-
23
- ## 3.9.x
24
-
25
- - ***BREAKING CHANGE***: 依赖[tg-commons](https://www.npmjs.com/package/tg-commons), 移除`typed`/`isDef`等和地图无关的导出
26
- - feat: [TgMarker]添加`label`属性, **它和已有的[TgLabel]不能同时设置**
27
- - feat: 添加球体和线段工具: [SphericalUtil], [PolyUtil]
28
-
29
- ## 3.8.x
30
-
31
- - chore: 更新到Vue3.4 & Vite5
32
- - fix: 香港地区坐标转换问题
33
- - fix: google地图弹窗样式问题
34
-
35
- ## 3.7.x
36
-
37
- - feat: 添加[IconSequence]到[TgPolyline]中
38
- - fix: 多个地图同时载入时报错的问题
39
- - feat: [TgMarker]添加`autoAddToClusterer`属性, 可以不被点聚合管理
40
- - feat: 添加[热力图][TgHeatmap]功能
41
- - fix: 让baidu-info-box的行为和google的尽量一致
42
- - ***BREAKING CHANGE***: [MapStyle]简化成纯对象, 方便使用
43
- - ***BREAKING CHANGE***: 增加[TgStreetViewControl], 默认关闭google的街景控制按钮
44
-
45
- ## 3.6.x
46
-
47
- - feat: 添加[MapUrls], 支持打开地图网页(导航和搜索)
48
- - feat: [LatLng]和[TgMarker]添加`normalize`相关方法/参数, 处理经纬度不合法的问题
49
- - fix: 百度地图的覆盖物([BaiduShape])不能隐藏填充/线条颜色的问题
50
- - perf: [TgLabel]/[TgInfoBox]/[TgInfoWindow]和[TgMarker]不必紧密相邻, 可以放其他组件
51
- - ***BREAKING CHANGE***: `placeService` -> `placesService`
52
-
53
- ## 3.5.x
54
-
55
- - fix: [LatLngBounds]为空时中心点计算问题
56
- - perf: 废弃`rightclick`事件, 使用`contextmenu`替代
57
- - ***BREAKING CHANGE***: `useTgMap` -> [useTgMapInner]
58
- - ***BREAKING CHANGE***: 统一[TgLabel]在google和baidu上的默认显示层级, 都位于overlay上方
59
-
60
- ## 3.4.x
61
-
62
- - feat: 添加矩形[TgRectangle]
63
- - feat: 点/圆/矩形/多边形/多段线 在`editable`/`draggable`模式时支持双向绑定
64
- - fix: 修复[TgCircle]在某些情况下半径会变成0的问题
65
- - ***BREAKING CHANGE***: [TgPolygon].polygon, [TgPolyline].polyline 属性, 统一改成`overlay`
66
- - ***BREAKING CHANGE***: 修复`setDisableDoubleClickZoom(type)`在google/baidu行为相反的问题, 并且重命名为`setDoubleClickZoom(enable)`
67
-
68
- ## 3.3.x
69
-
70
- - fix: 修复同时修改center和zoom可能中心点偏移的问题
71
- - feat: [Icon]支持缩放
72
- - ***BREAKING CHANGE***: [TgMap]的高度默认改成`100%`
73
-
74
- ## 3.2.x
75
-
76
- - fix: 修复google和baidu的zoom取值不一致的问题
77
- - feat: 支持[SymbolIcon]
78
- - feat: 支持[PlacesService], [Autocomplete], [SearchBox]
79
-
80
- ## 3.1.x
81
-
82
- - feat: 支持隐藏地图Logo
83
-
84
- ## 3.0.x
85
-
86
- - ***BREAKING CHANGE***: 迁移到Vue3
87
-
88
- [TgMap]: src/components/TgMap.vue
89
- [TgCircle]: src/components/overlays/TgCircle.vue
90
- [TgLabel]: src/components/overlays/TgLabel.vue
91
- [TgRectangle]: src/components/overlays/TgRectangle.vue
92
- [TgPolygon]: src/components/overlays/TgPolygon.vue
93
- [TgPolyline]: src/components/overlays/TgPolyline.vue
94
- [TgMarker]: src/components/overlays/TgMarker.vue
95
- [TgInfoBox]: src/components/overlays/TgInfoBox.vue
96
- [TgInfoWindow]: src/components/overlays/TgInfoWindow.vue
97
- [TgHeatmap]: src/components/extra/TgHeatmap.vue "热力图"
98
- [TgStreetViewControl]: src/components/controls/TgStreetViewControl.vue
99
- [TgZoomControl]: src/components/controls/TgZoomControl.vue
100
- [Icon]: packages/tg-map-core/src/map/map/overlay/icon.ts#L17 "图标"
101
- [SymbolIcon]: packages/tg-map-core/src/map/map/overlay/icon.ts#L143 "Svg图标"
102
- [MarkerLabel]: packages/tg-map-core/src/map/map/overlay/marker-label.ts
103
- [IconSequence]: packages/tg-map-core/src/map/map/overlay/icon.ts#L254 "Svg图标序列"
104
- [PlacesService]: packages/tg-map-core/src/map/map/extra/places-service.ts "位置服务"
105
- [Autocomplete]: packages/tg-map-core/src/map/map/extra/autocomplete.ts "自动完成"
106
- [MapUrls]: packages/tg-map-core/src/map/map/extra/map-urls.ts "地图网页"
107
- [SearchBox]: packages/tg-map-core/src/map/map/extra/search-box.ts "搜索框"
108
- [useTgMapInner]: src/components/map-hooks.ts
109
- [LatLngBounds]: packages/tg-map-core/src/map/lat-lng.ts#L355
110
- [LatLng]: packages/tg-map-core/src/map/lat-lng.ts#L32
111
- [BaiduShape]: packages/tg-map-core/src/map/map/overlay/shape.ts#L48
112
- [MapStyle]: packages/tg-map-core/src/map/map/map-options.ts#L97
113
- [PolyUtil]: packages/tg-map-core/src/utils/maps-utils/poly-util.ts
114
- [SphericalUtil]: packages/tg-map-core/src/utils/maps-utils/spherical-util.ts
115
- [AbstractMap]: packages/tg-map-core/src/map/map/map.ts#L92
116
- [Overlay]: packages/tg-map-core/src/map/map/overlay/overlay.ts
117
- [tg-map-core]: packages/tg-map-core/README.md
1
+ # 更新日志
2
+
3
+ ## 4.2.x
4
+
5
+ - ***BREAKING CHANGE***: `TgMapConfig.talks.layerId`废弃, 改用`layerIds`
6
+ - feat: talks支持编辑覆盖物
7
+ - feat: [Overlay]新增`addTo`方法
8
+ - feat: talks支持切换内置地图类型和暗色模式
9
+ - feat: TgMapType.talks支持复写图层内部定义的attribution
10
+
11
+ ## 4.1.x
12
+
13
+ - ***BREAKING CHANGE***: [AbstractMap]改成接口, 只保留`getCenter`/`panTo`等外部使用的方法
14
+ - ***BREAKING CHANGE***: 样式改回独立的css文件, 需要手动导入`import 'tg-map-vue3/dist/tg-map.css'`
15
+ - refactor: 独立出单独的[tg-map-core]包
16
+ - feat: 使用实现基于maptalks的地图的展示功能
17
+ - feat: 实验性支持GL版的baidu地图, 暂时不可用于生产环境
18
+ - feat: [TgMap]新增`fractionalZoom`选项
19
+ - feat: [TgInfoBox]新增`disableAutoPan`选项
20
+ - feat: [TgZoomControl]新增`showZoomLevel`选项
21
+ - refactor: [TgMarkerClusterer]的`styles`选项新增`minMarkersLength`属性, 用于支持新的talks地图
22
+ - feat: [MarkerLabel]新增`talksStyle`选项
23
+
24
+ ## 3.9.x
25
+
26
+ - ***BREAKING CHANGE***: 依赖[tg-commons](https://www.npmjs.com/package/tg-commons), 移除`typed`/`isDef`等和地图无关的导出
27
+ - feat: [TgMarker]添加`label`属性, **它和已有的[TgLabel]不能同时设置**
28
+ - feat: 添加球体和线段工具: [SphericalUtil], [PolyUtil]
29
+
30
+ ## 3.8.x
31
+
32
+ - chore: 更新到Vue3.4 & Vite5
33
+ - fix: 香港地区坐标转换问题
34
+ - fix: google地图弹窗样式问题
35
+
36
+ ## 3.7.x
37
+
38
+ - feat: 添加[IconSequence]到[TgPolyline]中
39
+ - fix: 多个地图同时载入时报错的问题
40
+ - feat: [TgMarker]添加`autoAddToClusterer`属性, 可以不被点聚合管理
41
+ - feat: 添加[热力图][TgHeatmap]功能
42
+ - fix: 让baidu-info-box的行为和google的尽量一致
43
+ - ***BREAKING CHANGE***: [MapStyle]简化成纯对象, 方便使用
44
+ - ***BREAKING CHANGE***: 增加[TgStreetViewControl], 默认关闭google的街景控制按钮
45
+
46
+ ## 3.6.x
47
+
48
+ - feat: 添加[MapUrls], 支持打开地图网页(导航和搜索)
49
+ - feat: [LatLng]和[TgMarker]添加`normalize`相关方法/参数, 处理经纬度不合法的问题
50
+ - fix: 百度地图的覆盖物([BaiduShape])不能隐藏填充/线条颜色的问题
51
+ - perf: [TgLabel]/[TgInfoBox]/[TgInfoWindow]和[TgMarker]不必紧密相邻, 可以放其他组件
52
+ - ***BREAKING CHANGE***: `placeService` -> `placesService`
53
+
54
+ ## 3.5.x
55
+
56
+ - fix: [LatLngBounds]为空时中心点计算问题
57
+ - perf: 废弃`rightclick`事件, 使用`contextmenu`替代
58
+ - ***BREAKING CHANGE***: `useTgMap` -> [useTgMapInner]
59
+ - ***BREAKING CHANGE***: 统一[TgLabel]在google和baidu上的默认显示层级, 都位于overlay上方
60
+
61
+ ## 3.4.x
62
+
63
+ - feat: 添加矩形[TgRectangle]
64
+ - feat: 点/圆/矩形/多边形/多段线 在`editable`/`draggable`模式时支持双向绑定
65
+ - fix: 修复[TgCircle]在某些情况下半径会变成0的问题
66
+ - ***BREAKING CHANGE***: [TgPolygon].polygon, [TgPolyline].polyline 属性, 统一改成`overlay`
67
+ - ***BREAKING CHANGE***: 修复`setDisableDoubleClickZoom(type)`在google/baidu行为相反的问题, 并且重命名为`setDoubleClickZoom(enable)`
68
+
69
+ ## 3.3.x
70
+
71
+ - fix: 修复同时修改center和zoom可能中心点偏移的问题
72
+ - feat: [Icon]支持缩放
73
+ - ***BREAKING CHANGE***: [TgMap]的高度默认改成`100%`
74
+
75
+ ## 3.2.x
76
+
77
+ - fix: 修复google和baidu的zoom取值不一致的问题
78
+ - feat: 支持[SymbolIcon]
79
+ - feat: 支持[PlacesService], [Autocomplete], [SearchBox]
80
+
81
+ ## 3.1.x
82
+
83
+ - feat: 支持隐藏地图Logo
84
+
85
+ ## 3.0.x
86
+
87
+ - ***BREAKING CHANGE***: 迁移到Vue3
88
+
89
+ [TgMap]: src/components/TgMap.vue
90
+ [TgCircle]: src/components/overlays/TgCircle.vue
91
+ [TgLabel]: src/components/overlays/TgLabel.vue
92
+ [TgRectangle]: src/components/overlays/TgRectangle.vue
93
+ [TgPolygon]: src/components/overlays/TgPolygon.vue
94
+ [TgPolyline]: src/components/overlays/TgPolyline.vue
95
+ [TgMarker]: src/components/overlays/TgMarker.vue
96
+ [TgInfoBox]: src/components/overlays/TgInfoBox.vue
97
+ [TgInfoWindow]: src/components/overlays/TgInfoWindow.vue
98
+ [TgHeatmap]: src/components/extra/TgHeatmap.vue "热力图"
99
+ [TgStreetViewControl]: src/components/controls/TgStreetViewControl.vue
100
+ [TgZoomControl]: src/components/controls/TgZoomControl.vue
101
+ [Icon]: packages/tg-map-core/src/map/map/overlay/icon.ts#L17 "图标"
102
+ [SymbolIcon]: packages/tg-map-core/src/map/map/overlay/icon.ts#L143 "Svg图标"
103
+ [MarkerLabel]: packages/tg-map-core/src/map/map/overlay/marker-label.ts
104
+ [IconSequence]: packages/tg-map-core/src/map/map/overlay/icon.ts#L254 "Svg图标序列"
105
+ [PlacesService]: packages/tg-map-core/src/map/map/extra/places-service.ts "位置服务"
106
+ [Autocomplete]: packages/tg-map-core/src/map/map/extra/autocomplete.ts "自动完成"
107
+ [MapUrls]: packages/tg-map-core/src/map/map/extra/map-urls.ts "地图网页"
108
+ [SearchBox]: packages/tg-map-core/src/map/map/extra/search-box.ts "搜索框"
109
+ [useTgMapInner]: src/components/map-hooks.ts
110
+ [LatLngBounds]: packages/tg-map-core/src/map/lat-lng.ts#L355
111
+ [LatLng]: packages/tg-map-core/src/map/lat-lng.ts#L32
112
+ [BaiduShape]: packages/tg-map-core/src/map/map/overlay/shape.ts#L48
113
+ [MapStyle]: packages/tg-map-core/src/map/map/map-options.ts#L97
114
+ [PolyUtil]: packages/tg-map-core/src/utils/maps-utils/poly-util.ts
115
+ [SphericalUtil]: packages/tg-map-core/src/utils/maps-utils/spherical-util.ts
116
+ [AbstractMap]: packages/tg-map-core/src/map/map/map.ts#L92
117
+ [Overlay]: packages/tg-map-core/src/map/map/overlay/overlay.ts
118
+ [tg-map-core]: packages/tg-map-core/README.md
package/README.md CHANGED
@@ -1,105 +1,105 @@
1
- # tg-map-vue3
2
-
3
- 封装 百度地图, Google地图, Here地图(未完成), Maptalks 的Vue3组件库
4
-
5
- ## 使用
6
-
7
- 安装:
8
-
9
- ```sh
10
- pnpm install tg-map-vue3
11
- ```
12
-
13
- 使用:
14
-
15
- ```vue
16
- <template>
17
- <TgMap> </TgMap>
18
- </template>
19
- <script lang="ts" setup>
20
- import { TgMap } from 'tg-map-vue3'
21
- // 需要手动导入样式文件
22
- import 'tg-map-vue3/dist/tg-map.css'
23
- </script>
24
- ```
25
-
26
- ## 发布
27
-
28
- 在npm上, 登录[transcode-group](https://www.npmjs.com/~transcode-group)帐号后, 可以发布该项目的所有库
29
-
30
- ```sh
31
- pnpm -r publish
32
- ```
33
-
34
- ## 开发
35
-
36
- ### 初始化仓库
37
-
38
- ```sh
39
- # 拉取本仓库
40
- git clone https://github.com/TranscodeGroup/tg-map.git
41
- # 进入本地仓库目录
42
- cd tg-map
43
- # 安装依赖
44
- pnpm install
45
- ```
46
-
47
- 其他项目若需要引用本地开发中的tg-map, 可以根据需要链接tg-map-vue3/tg-map-core:
48
-
49
- ```sh
50
- # 使用相对路径链接tg-map-vue3包
51
- pnpm link ../tg-map
52
- # 使用相对路径链接tg-map-core包
53
- pnpm link ../tg-map/packages/tg-map-core
54
- ```
55
-
56
- ### 构建
57
-
58
- ```sh
59
- # 修改代码后要重新构建
60
- pnpm run build
61
- ```
62
-
63
- ## 其他
64
-
65
- ```sh
66
- pnpm install
67
- ```
68
-
69
- ### Compile and Hot-Reload for Development
70
-
71
- ```sh
72
- pnpm run dev
73
- ```
74
-
75
- ### Type-Check, Compile and Minify for Production
76
-
77
- ```sh
78
- pnpm run build
79
- ```
80
-
81
- ### Lint with [ESLint](https://eslint.org/)
82
-
83
- ```sh
84
- pnpm run lint
85
- ```
86
-
87
- ### Customize configuration
88
-
89
- See [Vite Configuration Reference](https://vitejs.dev/config/).
90
-
91
- ## 参考文档
92
-
93
- - [百度Javascript API v3.0][]: 老版, [类参考][baidu_ref3]
94
- - [百度Javascript API GL][]: 新的基于WebGL的实现, [类参考][baidu_ref]
95
- - [Google Maps Javascript API][]: Google地图, [类参考][google_ref]
96
- - [maptalks][]: 自绘地图, [类参考][maptalks_ref]
97
-
98
- [Google Maps Javascript API]: https://developers.google.com/maps/documentation/javascript
99
- [google_ref]: https://developers.google.com/maps/documentation/javascript/reference
100
- [百度Javascript API v3.0]: https://lbsyun.baidu.com/index.php?title=jspopular3.0
101
- [baidu_ref3]: https://mapopen-pub-jsapi.bj.bcebos.com/jsapi/reference/jsapi_reference_3_0.html
102
- [百度Javascript API GL]: https://lbsyun.baidu.com/index.php?title=jspopularGL
103
- [baidu_ref]: https://mapopen-pub-jsapi.bj.bcebos.com/jsapi/reference/jsapi_webgl_1_0.html
104
- [maptalks]: https://maptalks.org/
105
- [maptalks_ref]: https://maptalks.org/maptalks.js/api/1.x/Map.html
1
+ # tg-map-vue3
2
+
3
+ 封装 百度地图, Google地图, Here地图(未完成), Maptalks 的Vue3组件库
4
+
5
+ ## 使用
6
+
7
+ 安装:
8
+
9
+ ```sh
10
+ pnpm install tg-map-vue3
11
+ ```
12
+
13
+ 使用:
14
+
15
+ ```vue
16
+ <template>
17
+ <TgMap> </TgMap>
18
+ </template>
19
+ <script lang="ts" setup>
20
+ import { TgMap } from 'tg-map-vue3'
21
+ // 需要手动导入样式文件
22
+ import 'tg-map-vue3/dist/tg-map.css'
23
+ </script>
24
+ ```
25
+
26
+ ## 发布
27
+
28
+ 在npm上, 登录[transcode-group](https://www.npmjs.com/~transcode-group)帐号后, 可以发布该项目的所有库
29
+
30
+ ```sh
31
+ pnpm -r publish
32
+ ```
33
+
34
+ ## 开发
35
+
36
+ ### 初始化仓库
37
+
38
+ ```sh
39
+ # 拉取本仓库
40
+ git clone https://github.com/TranscodeGroup/tg-map.git
41
+ # 进入本地仓库目录
42
+ cd tg-map
43
+ # 安装依赖
44
+ pnpm install
45
+ ```
46
+
47
+ 其他项目若需要引用本地开发中的tg-map, 可以根据需要链接tg-map-vue3/tg-map-core:
48
+
49
+ ```sh
50
+ # 使用相对路径链接tg-map-vue3包
51
+ pnpm link ../tg-map
52
+ # 使用相对路径链接tg-map-core包
53
+ pnpm link ../tg-map/packages/tg-map-core
54
+ ```
55
+
56
+ ### 构建
57
+
58
+ ```sh
59
+ # 修改代码后要重新构建
60
+ pnpm run build
61
+ ```
62
+
63
+ ## 其他
64
+
65
+ ```sh
66
+ pnpm install
67
+ ```
68
+
69
+ ### Compile and Hot-Reload for Development
70
+
71
+ ```sh
72
+ pnpm run dev
73
+ ```
74
+
75
+ ### Type-Check, Compile and Minify for Production
76
+
77
+ ```sh
78
+ pnpm run build
79
+ ```
80
+
81
+ ### Lint with [ESLint](https://eslint.org/)
82
+
83
+ ```sh
84
+ pnpm run lint
85
+ ```
86
+
87
+ ### Customize configuration
88
+
89
+ See [Vite Configuration Reference](https://vitejs.dev/config/).
90
+
91
+ ## 参考文档
92
+
93
+ - [百度Javascript API v3.0][]: 老版, [类参考][baidu_ref3]
94
+ - [百度Javascript API GL][]: 新的基于WebGL的实现, [类参考][baidu_ref]
95
+ - [Google Maps Javascript API][]: Google地图, [类参考][google_ref]
96
+ - [maptalks][]: 自绘地图, [类参考][maptalks_ref]
97
+
98
+ [Google Maps Javascript API]: https://developers.google.com/maps/documentation/javascript
99
+ [google_ref]: https://developers.google.com/maps/documentation/javascript/reference
100
+ [百度Javascript API v3.0]: https://lbsyun.baidu.com/index.php?title=jspopular3.0
101
+ [baidu_ref3]: https://mapopen-pub-jsapi.bj.bcebos.com/jsapi/reference/jsapi_reference_3_0.html
102
+ [百度Javascript API GL]: https://lbsyun.baidu.com/index.php?title=jspopularGL
103
+ [baidu_ref]: https://mapopen-pub-jsapi.bj.bcebos.com/jsapi/reference/jsapi_webgl_1_0.html
104
+ [maptalks]: https://maptalks.org/
105
+ [maptalks_ref]: https://maptalks.org/maptalks.js/api/1.x/Map.html