tg-map-vue3 3.7.8 → 3.7.9

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
@@ -6,6 +6,7 @@
6
6
  - fix: 多个地图同时载入时报错的问题
7
7
  - feat: [TgMarker]添加`autoAddToClusterer`属性, 可以不被点聚合管理
8
8
  - ***BREAKING CHANGE***: [MapStyle]简化成纯对象, 方便使用
9
+ - ***BREAKING CHANGE***: 增加[TgStreetViewControl], 默认关闭google的街景控制按钮
9
10
 
10
11
  ## 3.6.x
11
12
 
@@ -59,6 +60,7 @@
59
60
  [TgMarker]: src/components/overlays/TgMarker.vue
60
61
  [TgInfoBox]: src/components/overlays/TgInfoBox.vue
61
62
  [TgInfoWindow]: src/components/overlays/TgInfoWindow.vue
63
+ [TgStreetViewControl]: src/components/controls/TgStreetViewControl.vue
62
64
  [Icon]: src/map/map/overlay/icon.ts#L18 "图标"
63
65
  [SymbolIcon]: src/map/map/overlay/icon.ts#L139 "Svg图标"
64
66
  [IconSequence]: src/map/map/overlay/icon.ts#L55 "Svg图标序列"
@@ -0,0 +1,19 @@
1
+ import { ControlPosition } from '../../map/map/controls/control';
2
+ import { createEmptyVNode } from '../../utils/vue-utils';
3
+ /**
4
+ * 街景控件, 当前只有google支持
5
+ * */
6
+ declare const _default: import("vue").DefineComponent<{
7
+ position: {
8
+ type: import("vue").PropType<import("../../utils/mapped-types").StringEnumValue<typeof ControlPosition>>;
9
+ default: ControlPosition;
10
+ };
11
+ }, typeof createEmptyVNode, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
12
+ position: {
13
+ type: import("vue").PropType<import("../../utils/mapped-types").StringEnumValue<typeof ControlPosition>>;
14
+ default: ControlPosition;
15
+ };
16
+ }>>, {
17
+ position: import("../../utils/mapped-types").StringEnumValue<typeof ControlPosition>;
18
+ }, {}>;
19
+ export default _default;
@@ -13,6 +13,7 @@ export * from '../map/map-factory';
13
13
  export * from '../map/map/controls/control';
14
14
  export * from '../map/map/controls/map-type.control';
15
15
  export * from '../map/map/controls/scale.control';
16
+ export * from '../map/map/controls/street-view.control';
16
17
  export * from '../map/map/controls/zoom.control';
17
18
  export * from '../map/map/extra/autocomplete';
18
19
  export * from '../map/map/extra/map-urls';
@@ -47,6 +48,7 @@ export { default as TgMapWidget } from './TgMapWidget.vue';
47
48
  export { default as TgCustomControl } from './controls/TgCustomControl.vue';
48
49
  export { default as TgMapTypeControl } from './controls/TgMapTypeControl.vue';
49
50
  export { default as TgScaleControl } from './controls/TgScaleControl.vue';
51
+ export { default as TgStreetViewControl } from './controls/TgStreetViewControl.vue';
50
52
  export { default as TgZoomControl } from './controls/TgZoomControl.vue';
51
53
  export { default as TgMarkerClusterer } from './extra/TgMarkerClusterer.vue';
52
54
  export { default as TgTrafficLayer } from './layers/TgTrafficLayer.vue';
@@ -60,4 +62,4 @@ export { default as TgMarker } from './overlays/TgMarker.vue';
60
62
  export { default as TgPolygon } from './overlays/TgPolygon.vue';
61
63
  export { default as TgPolyline } from './overlays/TgPolyline.vue';
62
64
  export { default as TgRectangle } from './overlays/TgRectangle.vue';
63
- export { type TgMapConfig, type PartialTgMapConfig, getTgMapConfig, setTgMapConfig, LifecycleLogPlugin, type LifecycleLogOptions, MapMixin, MIXIN_HOOK_CREATE, MIXIN_HOOK_DESTROY, MIXIN_MAP_NAME, };
65
+ export { LifecycleLogPlugin, MIXIN_HOOK_CREATE, MIXIN_HOOK_DESTROY, MIXIN_MAP_NAME, MapMixin, getTgMapConfig, setTgMapConfig, type LifecycleLogOptions, type PartialTgMapConfig, type TgMapConfig, };
@@ -3,6 +3,7 @@ import type { Padding, Point } from '../types';
3
3
  import { CustomControl } from './controls/control';
4
4
  import { BaiduMapTypeControl } from './controls/map-type.control';
5
5
  import { BaiduScaleControl } from './controls/scale.control';
6
+ import { BaiduStreetViewControl } from './controls/street-view.control';
6
7
  import { BaiduZoomControl } from './controls/zoom.control';
7
8
  import { type Autocomplete, type AutocompleteOptions } from './extra/autocomplete';
8
9
  import { type MapUrls, type MapUrlsOptions } from './extra/map-urls';
@@ -69,6 +70,7 @@ export declare class BaiduMap extends AbstractMap {
69
70
  createMarker: typeof BaiduMarker.create;
70
71
  createMapTypeControl: typeof BaiduMapTypeControl.create;
71
72
  createZoomControl: typeof BaiduZoomControl.create;
73
+ createStreetViewControl: typeof BaiduStreetViewControl.create;
72
74
  createScaleControl: typeof BaiduScaleControl.create;
73
75
  createMarkerClusterer(options: MarkerClustererOptions): BaiduMarkerClusterer;
74
76
  createAutocomplete(options: AutocompleteOptions): Autocomplete;
@@ -1,4 +1,5 @@
1
1
  /// <reference types="google.maps" />
2
+ /// <reference types="baidumap-web-sdk" />
2
3
  import { KeyValue } from '../../../utils/values';
3
4
  import type { UnionControl } from '../../unions';
4
5
  import type { BaiduMap } from '../baidu-map';
@@ -48,6 +49,18 @@ export declare abstract class AbstractControl {
48
49
  abstract addTo(map: AbstractMap): void;
49
50
  abstract removeFrom(map: AbstractMap): void;
50
51
  }
52
+ /** Control的空实现 */
53
+ export declare class EmptyControl extends AbstractControl {
54
+ private visible;
55
+ private position;
56
+ constructor(visible: boolean, position: ControlPosition);
57
+ isVisible(): boolean;
58
+ setVisible(visible: boolean): void;
59
+ getPosition(): ControlPosition;
60
+ setPosition(position: ControlPosition): void;
61
+ addTo(_map: AbstractMap): void;
62
+ removeFrom(_map: AbstractMap): void;
63
+ }
51
64
  /**
52
65
  * baidu内置的Control
53
66
  * - NavigationControl
@@ -0,0 +1,20 @@
1
+ import type { BaiduMap } from '../baidu-map';
2
+ import type { GoogleMap } from '../google-map';
3
+ import { AbstractControl, ControlPosition, EmptyControl, GoogleControl } from './control';
4
+ /**
5
+ * ## 不同实现
6
+ * - google: 支持街景控件
7
+ * - baidu: 不支持, {@link BaiduStreetViewControl}是一个空实现
8
+ */
9
+ export interface StreetViewControl extends AbstractControl {
10
+ }
11
+ export interface StreetViewControlOptions {
12
+ position?: ControlPosition;
13
+ }
14
+ export declare class BaiduStreetViewControl extends EmptyControl implements StreetViewControl {
15
+ static create(this: BaiduMap, options: StreetViewControlOptions): BaiduStreetViewControl;
16
+ }
17
+ export declare class GoogleStreetViewControl extends GoogleControl implements StreetViewControl {
18
+ static create(this: GoogleMap, options: StreetViewControlOptions): GoogleStreetViewControl;
19
+ constructor(position?: ControlPosition);
20
+ }
@@ -4,6 +4,7 @@ import { Point, type Padding } from '../types';
4
4
  import { CustomControl } from './controls/control';
5
5
  import { GoogleMapTypeControl } from './controls/map-type.control';
6
6
  import { GoogleScaleControl } from './controls/scale.control';
7
+ import { GoogleStreetViewControl } from './controls/street-view.control';
7
8
  import { GoogleZoomControl } from './controls/zoom.control';
8
9
  import { Autocomplete, type AutocompleteOptions } from './extra/autocomplete';
9
10
  import { type MapUrls, type MapUrlsOptions } from './extra/map-urls';
@@ -69,6 +70,7 @@ export declare class GoogleMap extends AbstractMap {
69
70
  createMarker: typeof GoogleMarker.create;
70
71
  createMapTypeControl: typeof GoogleMapTypeControl.create;
71
72
  createZoomControl: typeof GoogleZoomControl.create;
73
+ createStreetViewControl: typeof GoogleStreetViewControl.create;
72
74
  createScaleControl: typeof GoogleScaleControl.create;
73
75
  createMarkerClusterer(options: MarkerClustererOptions): GoogleMarkerClusterer;
74
76
  createAutocomplete(options: AutocompleteOptions): Autocomplete;
@@ -4,6 +4,7 @@ import type { Padding, Point } from '../types';
4
4
  import type { CustomControl } from './controls/control';
5
5
  import type { MapTypeControl, MapTypeControlOptions } from './controls/map-type.control';
6
6
  import type { ScaleControlOptions } from './controls/scale.control';
7
+ import type { StreetViewControl, StreetViewControlOptions } from './controls/street-view.control';
7
8
  import type { ZoomControl, ZoomControlOptions } from './controls/zoom.control';
8
9
  import type { Autocomplete, AutocompleteOptions } from './extra/autocomplete';
9
10
  import type { MapUrls, MapUrlsOptions } from './extra/map-urls';
@@ -71,5 +72,6 @@ export declare class HereMap extends AbstractMap {
71
72
  removeCustomControl(control: CustomControl): void;
72
73
  createMapTypeControl(options: MapTypeControlOptions): MapTypeControl;
73
74
  createZoomControl(options: ZoomControlOptions): ZoomControl;
75
+ createStreetViewControl(options: StreetViewControlOptions): StreetViewControl;
74
76
  createScaleControl(options: ScaleControlOptions): ZoomControl;
75
77
  }
@@ -7,6 +7,7 @@ import type { UnionMap } from '../unions';
7
7
  import type { AbstractControl, CustomControl } from './controls/control';
8
8
  import type { MapTypeControl, MapTypeControlOptions } from './controls/map-type.control';
9
9
  import type { ScaleControlOptions } from './controls/scale.control';
10
+ import type { StreetViewControl, StreetViewControlOptions } from './controls/street-view.control';
10
11
  import type { ZoomControl, ZoomControlOptions } from './controls/zoom.control';
11
12
  import type { Autocomplete, AutocompleteOptions } from './extra/autocomplete';
12
13
  import type { MapUrls, MapUrlsOptions } from './extra/map-urls';
@@ -155,6 +156,7 @@ export declare abstract class AbstractMap implements CoordTypeSupplier, Tg.Event
155
156
  abstract removeCustomControl(control: CustomControl): void;
156
157
  abstract createMapTypeControl(options: MapTypeControlOptions): MapTypeControl;
157
158
  abstract createZoomControl(options: ZoomControlOptions): ZoomControl;
159
+ abstract createStreetViewControl(options: StreetViewControlOptions): StreetViewControl;
158
160
  abstract createScaleControl(options: ScaleControlOptions): ZoomControl;
159
161
  addControl(control: AbstractControl): void;
160
162
  removeControl(control: AbstractControl): void;
@@ -2,6 +2,7 @@
2
2
  /// <reference types="heremaps" />
3
3
  /// <reference types="baidumap-web-sdk" />
4
4
  /// <reference types="baidumap-web-sdk" />
5
+ /// <reference types="baidumap-web-sdk" />
5
6
  import type { BaiduInfoBox } from './map/overlay/baidu-info-box';
6
7
  import type { GoogleLabel } from './map/overlay/google-label';
7
8
  /**