tg-map-vue3 3.6.10 → 3.7.0

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,9 @@
1
1
  # 更新日志
2
2
 
3
+ ## 3.7.x
4
+
5
+ - feat: 添加[IconSequence]到[TgPolyline]中
6
+
3
7
  ## 3.6.x
4
8
 
5
9
  - feat: 添加[MapUrls], 支持打开地图网页(导航和搜索)
@@ -53,7 +57,8 @@
53
57
  [TgInfoBox]: src/components/overlays/TgInfoBox.vue
54
58
  [TgInfoWindow]: src/components/overlays/TgInfoWindow.vue
55
59
  [Icon]: src/map/map/overlay/icon.ts#L18 "图标"
56
- [SymbolIcon]: src/map/map/overlay/icon.ts#L55 "Svg图标"
60
+ [SymbolIcon]: src/map/map/overlay/icon.ts#L139 "Svg图标"
61
+ [IconSequence]: src/map/map/overlay/icon.ts#L55 "Svg图标序列"
57
62
  [PlacesService]: src/map/map/extra/places-service.ts "位置服务"
58
63
  [Autocomplete]: src/map/map/extra/autocomplete.ts "自动完成"
59
64
  [MapUrls]: src/map/map/extra/map-urls.ts "地图网页"
package/README.md CHANGED
@@ -91,3 +91,16 @@ pnpm run lint
91
91
  ### Customize configuration
92
92
 
93
93
  See [Vite Configuration Reference](https://vitejs.dev/config/).
94
+
95
+ ## 参考文档
96
+
97
+ - [百度Javascript API v3.0][]: 老版, [类参考][baidu_ref3]
98
+ - [百度Javascript API GL][]: 新的基于WebGL的实现, [类参考][baidu_ref]
99
+ - [Google Maps Javascript API][]: Google地图, [类参考][google_ref]
100
+
101
+ [Google Maps Javascript API]: https://developers.google.com/maps/documentation/javascript
102
+ [百度Javascript API v3.0]: https://lbsyun.baidu.com/index.php?title=jspopular3.0
103
+ [baidu_ref3]: https://mapopen-pub-jsapi.bj.bcebos.com/jsapi/reference/jsapi_reference_3_0.html
104
+ [百度Javascript API GL]: https://lbsyun.baidu.com/index.php?title=jspopularGL
105
+ [baidu_ref]: https://mapopen-pub-jsapi.bj.bcebos.com/jsapi/reference/jsapi_webgl_1_0.html
106
+ [google_ref]: https://developers.google.com/maps/documentation/javascript/reference
@@ -1,5 +1,6 @@
1
1
  import { type PropType } from 'vue';
2
2
  import { LatLng } from '../../map/lat-lng';
3
+ import type { IconSequence } from '../../map/map/overlay/icon';
3
4
  import type { PolylineEventMap, PolylineOverlay } from '../../map/map/overlay/polyline';
4
5
  import { type EventEmits } from '../../utils/vue-utils';
5
6
  type TgPolylineEmits = {
@@ -10,6 +11,9 @@ declare const _default: import("vue").DefineComponent<{
10
11
  type: PropType<LatLng[]>;
11
12
  required: true;
12
13
  };
14
+ icons: {
15
+ type: PropType<IconSequence[]>;
16
+ };
13
17
  clickable: {
14
18
  type: PropType<boolean>;
15
19
  };
@@ -44,6 +48,9 @@ declare const _default: import("vue").DefineComponent<{
44
48
  type: PropType<LatLng[]>;
45
49
  required: true;
46
50
  };
51
+ icons: {
52
+ type: PropType<IconSequence[]>;
53
+ };
47
54
  clickable: {
48
55
  type: PropType<boolean>;
49
56
  };
@@ -95,3 +95,24 @@ export declare const SymbolPath: {
95
95
  readonly google: () => google.maps.SymbolPath.FORWARD_OPEN_ARROW;
96
96
  };
97
97
  };
98
+ /** 矢量Icon序列 */
99
+ export interface IconSequence {
100
+ /** 矢量Icon */
101
+ icon: SymbolIcon;
102
+ /** @default false */
103
+ fixedRotation?: boolean;
104
+ /**
105
+ * 相对起点的位置, 取值可以是像素或百分比
106
+ * @default 100%
107
+ */
108
+ offset?: string;
109
+ /**
110
+ * 重复显示是的间距, 取值可以是像素或百分比;
111
+ * 若和{@link offset}同时设置, 只有{@link repeat}会生效
112
+ */
113
+ repeat?: string;
114
+ }
115
+ export declare namespace IconSequence {
116
+ function toGoogle(value: IconSequence): google.maps.IconSequence;
117
+ function toBaidu(value: IconSequence): BMap.IconSequence;
118
+ }
@@ -6,6 +6,7 @@ import { EventHubEventTargetDelegate } from '../../event-target';
6
6
  import { LatLng } from '../../lat-lng';
7
7
  import type { BaiduMap } from '../baidu-map';
8
8
  import type { GoogleMap } from '../google-map';
9
+ import { IconSequence } from './icon';
9
10
  import type { Overlay } from './overlay';
10
11
  import { BaiduShape, GoogleShape, type NotFillableShape, type NotFillableShapeOptions } from './shape';
11
12
  export type PolylineEventMap = {
@@ -28,6 +29,7 @@ export type PolylineEventMap = {
28
29
  };
29
30
  export interface PolylineOptions extends NotFillableShapeOptions {
30
31
  path: LatLng[];
32
+ icons?: IconSequence[];
31
33
  }
32
34
  export interface Polyline extends Tg.EventTargetTyped<Polyline, PolylineEventMap>, NotFillableShape {
33
35
  getPath(): LatLng[];
@@ -51,6 +53,9 @@ export declare class BaiduPolyline extends BaiduPolyShape<BMap.Polyline> impleme
51
53
  getPath(): LatLng[];
52
54
  setPath(path: LatLng[]): void;
53
55
  }
56
+ /**
57
+ * Google地图的网页版不支持Advanced Polyline(纹理/渐变等效果), 详见: https://issuetracker.google.com/issues/267845944
58
+ */
54
59
  export declare class GooglePolyline extends GoogleShape<google.maps.Polyline> implements Polyline {
55
60
  static create(this: GoogleMap, options: PolylineOptions): GooglePolyline;
56
61
  private pathChangedListeners;