tg-map-vue3 3.3.9 → 3.4.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.
- package/dist/src/components/index.d.ts +2 -0
- package/dist/src/components/overlays/TgCircle.vue.d.ts +25 -3
- package/dist/src/components/overlays/TgInfoWindow.vue.d.ts +14 -3
- package/dist/src/components/overlays/TgLabel.vue.d.ts +7 -4
- package/dist/src/components/overlays/TgMarker.vue.d.ts +31 -7
- package/dist/src/components/overlays/TgPolygon.vue.d.ts +20 -4
- package/dist/src/components/overlays/TgPolyline.vue.d.ts +21 -5
- package/dist/src/components/overlays/TgRectangle.vue.d.ts +88 -0
- package/dist/src/map/event-target.d.ts +22 -1
- package/dist/src/map/lat-lng.d.ts +23 -1
- package/dist/src/map/map/baidu-map.d.ts +2 -0
- package/dist/src/map/map/google-map.d.ts +2 -0
- package/dist/src/map/map/here-map.d.ts +50 -32
- package/dist/src/map/map/map.d.ts +4 -2
- package/dist/src/map/map/overlay/baidu-info-box.d.ts +0 -4
- package/dist/src/map/map/overlay/circle.d.ts +13 -2
- package/dist/src/map/map/overlay/google-label.d.ts +0 -6
- package/dist/src/map/map/overlay/info-window.d.ts +1 -2
- package/dist/src/map/map/overlay/marker.d.ts +4 -5
- package/dist/src/map/map/overlay/overlay.d.ts +9 -5
- package/dist/src/map/map/overlay/polygon.d.ts +13 -4
- package/dist/src/map/map/overlay/polyline.d.ts +31 -3
- package/dist/src/map/map/overlay/rectangle.d.ts +52 -0
- package/dist/src/map/map/overlay/shape.d.ts +3 -1
- package/dist/src/map/unions.d.ts +1 -1
- package/dist/src/utils/arrays.d.ts +17 -1
- package/dist/src/utils/baidu-utils.d.ts +4 -0
- package/dist/src/utils/google-utils.d.ts +1 -0
- package/dist/src/utils/mapped-types.d.ts +6 -0
- package/dist/src/utils/vue-utils.d.ts +3 -7
- package/dist/tg-map.js +2664 -2244
- package/dist/tg-map.js.map +1 -1
- package/dist/tg-map.umd.cjs +7 -7
- package/dist/tg-map.umd.cjs.map +1 -1
- package/package.json +1 -1
|
@@ -27,6 +27,7 @@ export * from '../map/map/overlay/marker';
|
|
|
27
27
|
export * from '../map/map/overlay/overlay';
|
|
28
28
|
export * from '../map/map/overlay/polygon';
|
|
29
29
|
export * from '../map/map/overlay/polyline';
|
|
30
|
+
export * from '../map/map/overlay/rectangle';
|
|
30
31
|
export * from '../map/types';
|
|
31
32
|
export * from '../utils/arrays';
|
|
32
33
|
export * from '../utils/assert';
|
|
@@ -54,4 +55,5 @@ export { default as TgLabel } from './overlays/TgLabel.vue';
|
|
|
54
55
|
export { default as TgMarker } from './overlays/TgMarker.vue';
|
|
55
56
|
export { default as TgPolygon } from './overlays/TgPolygon.vue';
|
|
56
57
|
export { default as TgPolyline } from './overlays/TgPolyline.vue';
|
|
58
|
+
export { default as TgRectangle } from './overlays/TgRectangle.vue';
|
|
57
59
|
export { type TgMapConfig, type PartialTgMapConfig, getTgMapConfig, setTgMapConfig, LifecycleLogPlugin, type LifecycleLogOptions, MapMixin, MIXIN_HOOK_CREATE, MIXIN_HOOK_DESTROY, MIXIN_MAP_NAME, };
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { LatLng } from '../../map/lat-lng';
|
|
2
|
-
import type { CircleOverlay } from '../../map/map/overlay/circle';
|
|
2
|
+
import type { CircleEventMap, CircleOverlay } from '../../map/map/overlay/circle';
|
|
3
|
+
import { type EventEmits } from '../../utils/vue-utils';
|
|
4
|
+
type TgCircleEmits = {
|
|
5
|
+
'update:center': LatLng;
|
|
6
|
+
'update:radius': number;
|
|
7
|
+
};
|
|
3
8
|
declare const _default: import("vue").DefineComponent<{
|
|
4
9
|
center: {
|
|
5
10
|
type: import("vue").PropType<LatLng>;
|
|
@@ -33,6 +38,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
33
38
|
fillOpacity: {
|
|
34
39
|
type: import("vue").PropType<number>;
|
|
35
40
|
};
|
|
41
|
+
'onUpdate:center': import("vue").Prop<import("../../utils/vue-utils").EventCallback<LatLng>>;
|
|
42
|
+
'onUpdate:radius': import("vue").Prop<import("../../utils/vue-utils").EventCallback<number>>;
|
|
36
43
|
}, {
|
|
37
44
|
attrs: import("vue").ComputedRef<{
|
|
38
45
|
binds: Record<string, unknown>;
|
|
@@ -40,9 +47,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
40
47
|
listenerProps: Record<string, unknown>;
|
|
41
48
|
}>;
|
|
42
49
|
overlay: CircleOverlay;
|
|
50
|
+
emittedRadius: number | undefined;
|
|
51
|
+
emittedCenter: LatLng | undefined;
|
|
43
52
|
}, unknown, {}, {}, import("vue").DefineComponent<{}, {}, {}, {}, {
|
|
44
53
|
recreate(): void;
|
|
45
|
-
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>, import("vue").ComponentOptionsMixin,
|
|
54
|
+
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>, import("vue").ComponentOptionsMixin, EventEmits<CircleEventMap & TgCircleEmits>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
46
55
|
center: {
|
|
47
56
|
type: import("vue").PropType<LatLng>;
|
|
48
57
|
required: true;
|
|
@@ -75,5 +84,18 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
75
84
|
fillOpacity: {
|
|
76
85
|
type: import("vue").PropType<number>;
|
|
77
86
|
};
|
|
78
|
-
|
|
87
|
+
'onUpdate:center': import("vue").Prop<import("../../utils/vue-utils").EventCallback<LatLng>>;
|
|
88
|
+
'onUpdate:radius': import("vue").Prop<import("../../utils/vue-utils").EventCallback<number>>;
|
|
89
|
+
}>> & {
|
|
90
|
+
"onUpdate:center"?: ((event: LatLng) => any) | undefined;
|
|
91
|
+
onClick?: ((event: import("../../map/event").Tg.Event) => any) | undefined;
|
|
92
|
+
onDblclick?: ((event: import("../../map/event").Tg.Event) => any) | undefined;
|
|
93
|
+
onMousedown?: ((event: import("../../map/event").Tg.MouseEvent) => any) | undefined;
|
|
94
|
+
onMouseout?: ((event: import("../../map/event").Tg.MouseEvent) => any) | undefined;
|
|
95
|
+
onMouseover?: ((event: import("../../map/event").Tg.MouseEvent) => any) | undefined;
|
|
96
|
+
onMouseup?: ((event: import("../../map/event").Tg.MouseEvent) => any) | undefined;
|
|
97
|
+
"onUpdate:radius"?: ((event: number) => any) | undefined;
|
|
98
|
+
"onRadius-changed"?: ((event: import("../../map/event").Tg.Event) => any) | undefined;
|
|
99
|
+
"onCenter-changed"?: ((event: import("../../map/event").Tg.Event) => any) | undefined;
|
|
100
|
+
}, {}, {}>;
|
|
79
101
|
export default _default;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { LatLng } from '../../map/lat-lng';
|
|
2
|
-
import type {
|
|
2
|
+
import type { InfoWindowEventMap, InfoWindowOptions, InfoWindowOverlay } from '../../map/map/overlay/info-window';
|
|
3
|
+
import { type EventEmits } from '../../utils/vue-utils';
|
|
3
4
|
import { type TgMarkerPublicInstance } from './TgMarker.vue';
|
|
5
|
+
type TgInfoWindowEmits = {
|
|
6
|
+
'update:show': boolean;
|
|
7
|
+
};
|
|
4
8
|
declare const TgInfoWindow: import("vue").DefineComponent<{
|
|
5
9
|
show: {
|
|
6
10
|
type: import("vue").PropType<boolean>;
|
|
@@ -18,6 +22,7 @@ declare const TgInfoWindow: import("vue").DefineComponent<{
|
|
|
18
22
|
disableAutoPan: {
|
|
19
23
|
type: import("vue").PropType<boolean>;
|
|
20
24
|
};
|
|
25
|
+
'onUpdate:show': import("vue").Prop<import("../../utils/vue-utils").EventCallback<boolean>>;
|
|
21
26
|
}, {
|
|
22
27
|
attrs: import("vue").ComputedRef<{
|
|
23
28
|
binds: Record<string, unknown>;
|
|
@@ -31,7 +36,7 @@ declare const TgInfoWindow: import("vue").DefineComponent<{
|
|
|
31
36
|
getOptions(): InfoWindowOptions;
|
|
32
37
|
}, import("vue").DefineComponent<{}, {}, {}, {}, {
|
|
33
38
|
recreate(): void;
|
|
34
|
-
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>, import("vue").ComponentOptionsMixin,
|
|
39
|
+
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>, import("vue").ComponentOptionsMixin, EventEmits<InfoWindowEventMap & TgInfoWindowEmits>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
35
40
|
show: {
|
|
36
41
|
type: import("vue").PropType<boolean>;
|
|
37
42
|
required: true;
|
|
@@ -48,6 +53,12 @@ declare const TgInfoWindow: import("vue").DefineComponent<{
|
|
|
48
53
|
disableAutoPan: {
|
|
49
54
|
type: import("vue").PropType<boolean>;
|
|
50
55
|
};
|
|
51
|
-
|
|
56
|
+
'onUpdate:show': import("vue").Prop<import("../../utils/vue-utils").EventCallback<boolean>>;
|
|
57
|
+
}>> & {
|
|
58
|
+
"onUpdate:show"?: ((event: boolean) => any) | undefined;
|
|
59
|
+
onCloseclick?: ((event: import("../../map/event").Tg.Event) => any) | undefined;
|
|
60
|
+
onOpen?: ((event: import("../../map/event").Tg.Event) => any) | undefined;
|
|
61
|
+
onClose?: ((event: import("../../map/event").Tg.Event) => any) | undefined;
|
|
62
|
+
}, {}, {}>;
|
|
52
63
|
type TgInfoWindow = InstanceType<typeof TgInfoWindow>;
|
|
53
64
|
export default TgInfoWindow;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { LatLng } from '../../map/lat-lng';
|
|
2
|
-
import type { LabelOptions, LabelOverlay } from '../../map/map/overlay/label';
|
|
3
|
-
import { type TgMarkerPublicInstance } from './TgMarker.vue';
|
|
2
|
+
import type { LabelEventMap, LabelOptions, LabelOverlay } from '../../map/map/overlay/label';
|
|
4
3
|
import type { Marker } from '../../map/map/overlay/marker';
|
|
4
|
+
import { type EventEmits } from '../../utils/vue-utils';
|
|
5
|
+
import { type TgMarkerPublicInstance } from './TgMarker.vue';
|
|
5
6
|
declare const TgLabel: import("vue").DefineComponent<{
|
|
6
7
|
position: {
|
|
7
8
|
type: import("vue").PropType<LatLng>;
|
|
@@ -26,7 +27,7 @@ declare const TgLabel: import("vue").DefineComponent<{
|
|
|
26
27
|
getOptions(): LabelOptions;
|
|
27
28
|
}, import("vue").DefineComponent<{}, {}, {}, {}, {
|
|
28
29
|
recreate(): void;
|
|
29
|
-
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>, import("vue").ComponentOptionsMixin,
|
|
30
|
+
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>, import("vue").ComponentOptionsMixin, EventEmits<LabelEventMap>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
30
31
|
position: {
|
|
31
32
|
type: import("vue").PropType<LatLng>;
|
|
32
33
|
};
|
|
@@ -36,6 +37,8 @@ declare const TgLabel: import("vue").DefineComponent<{
|
|
|
36
37
|
zIndex: {
|
|
37
38
|
type: import("vue").PropType<number>;
|
|
38
39
|
};
|
|
39
|
-
}
|
|
40
|
+
}>> & {
|
|
41
|
+
onClick?: ((event: import("../../map/event").Tg.Event) => any) | undefined;
|
|
42
|
+
}, {}, {}>;
|
|
40
43
|
type TgLabel = InstanceType<typeof TgLabel>;
|
|
41
44
|
export default TgLabel;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { type PropType } from 'vue';
|
|
2
2
|
import { LatLng } from '../../map/lat-lng';
|
|
3
3
|
import type { UnionIcon } from '../../map/map/overlay/icon';
|
|
4
|
-
import { type MarkerOverlay } from '../../map/map/overlay/marker';
|
|
4
|
+
import { type MarkerEventMap, type MarkerOverlay } from '../../map/map/overlay/marker';
|
|
5
|
+
import { type EventEmits } from '../../utils/vue-utils';
|
|
5
6
|
import TgMarkerClusterer from '../extra/TgMarkerClusterer.vue';
|
|
6
7
|
import type TgInfoBox from './TgInfoBox.vue';
|
|
7
8
|
import type TgInfoWindow from './TgInfoWindow.vue';
|
|
8
9
|
import type TgLabel from './TgLabel.vue';
|
|
10
|
+
type TgMarkerEmits = {
|
|
11
|
+
'update:position': LatLng;
|
|
12
|
+
};
|
|
9
13
|
declare const TgMarker: import("vue").DefineComponent<{
|
|
10
14
|
position: {
|
|
11
15
|
type: PropType<LatLng>;
|
|
@@ -35,6 +39,7 @@ declare const TgMarker: import("vue").DefineComponent<{
|
|
|
35
39
|
visible: {
|
|
36
40
|
type: PropType<boolean>;
|
|
37
41
|
};
|
|
42
|
+
'onUpdate:position': import("vue").Prop<import("../../utils/vue-utils").EventCallback<LatLng>>;
|
|
38
43
|
}, {
|
|
39
44
|
attrs: import("vue").ComputedRef<{
|
|
40
45
|
binds: Record<string, unknown>;
|
|
@@ -51,6 +56,7 @@ declare const TgMarker: import("vue").DefineComponent<{
|
|
|
51
56
|
readonly position?: LatLng | undefined;
|
|
52
57
|
readonly offset?: any;
|
|
53
58
|
style?: unknown;
|
|
59
|
+
onClick?: ((event: import("../../map/event").Tg.Event) => any) | undefined;
|
|
54
60
|
class?: unknown;
|
|
55
61
|
ref?: import("vue").VNodeRef | undefined;
|
|
56
62
|
ref_for?: boolean | undefined;
|
|
@@ -105,7 +111,7 @@ declare const TgMarker: import("vue").DefineComponent<{
|
|
|
105
111
|
}>;
|
|
106
112
|
$root: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}> | null;
|
|
107
113
|
$parent: import("vue").ComponentPublicInstance<{}, {}, {}, {}, {}, {}, {}, {}, false, import("vue").ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}, {}, string, {}>, {}, {}> | null;
|
|
108
|
-
$emit: (event:
|
|
114
|
+
$emit: (event: "click", event: import("../../map/event").Tg.Event) => void;
|
|
109
115
|
$el: any;
|
|
110
116
|
$options: import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
|
|
111
117
|
position: {
|
|
@@ -117,7 +123,9 @@ declare const TgMarker: import("vue").DefineComponent<{
|
|
|
117
123
|
zIndex: {
|
|
118
124
|
type: PropType<number>;
|
|
119
125
|
};
|
|
120
|
-
}
|
|
126
|
+
}>> & {
|
|
127
|
+
onClick?: ((event: import("../../map/event").Tg.Event) => any) | undefined;
|
|
128
|
+
}, {
|
|
121
129
|
attrs: import("vue").ComputedRef<{
|
|
122
130
|
binds: Record<string, unknown>;
|
|
123
131
|
listeners: Record<string, unknown>;
|
|
@@ -131,7 +139,7 @@ declare const TgMarker: import("vue").DefineComponent<{
|
|
|
131
139
|
getOptions(): import("../../map/map/overlay/label").LabelOptions;
|
|
132
140
|
}, import("vue").DefineComponent<{}, {}, {}, {}, {
|
|
133
141
|
recreate(): void;
|
|
134
|
-
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>, import("vue").ComponentOptionsMixin,
|
|
142
|
+
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>, import("vue").ComponentOptionsMixin, EventEmits<import("../../map/map/overlay/label").LabelEventMap>, string, {}, {}, string, {}> & {
|
|
135
143
|
beforeCreate?: ((() => void) | (() => void)[]) | undefined;
|
|
136
144
|
created?: ((() => void) | (() => void)[]) | undefined;
|
|
137
145
|
beforeMount?: ((() => void) | (() => void)[]) | undefined;
|
|
@@ -161,7 +169,9 @@ declare const TgMarker: import("vue").DefineComponent<{
|
|
|
161
169
|
zIndex: {
|
|
162
170
|
type: PropType<number>;
|
|
163
171
|
};
|
|
164
|
-
}>> &
|
|
172
|
+
}>> & {
|
|
173
|
+
onClick?: ((event: import("../../map/event").Tg.Event) => any) | undefined;
|
|
174
|
+
} & import("vue").ShallowUnwrapRef<{
|
|
165
175
|
attrs: import("vue").ComputedRef<{
|
|
166
176
|
binds: Record<string, unknown>;
|
|
167
177
|
listeners: Record<string, unknown>;
|
|
@@ -177,6 +187,7 @@ declare const TgMarker: import("vue").DefineComponent<{
|
|
|
177
187
|
getOptions(): import("../../map/map/overlay/label").LabelOptions;
|
|
178
188
|
} & import("vue").ComponentCustomProperties & {}) | undefined;
|
|
179
189
|
info: TgInfo | undefined;
|
|
190
|
+
emittedPosition: LatLng | undefined;
|
|
180
191
|
}, unknown, {}, {
|
|
181
192
|
$clusterer(): TgMarkerClusterer | undefined;
|
|
182
193
|
onAddLabel(label: TgLabel): void;
|
|
@@ -186,7 +197,7 @@ declare const TgMarker: import("vue").DefineComponent<{
|
|
|
186
197
|
onInfoShowChanged(info: TgInfo, isShow: boolean): void;
|
|
187
198
|
}, import("vue").DefineComponent<{}, {}, {}, {}, {
|
|
188
199
|
recreate(): void;
|
|
189
|
-
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>, import("vue").ComponentOptionsMixin,
|
|
200
|
+
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>, import("vue").ComponentOptionsMixin, EventEmits<MarkerEventMap & TgMarkerEmits>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
190
201
|
position: {
|
|
191
202
|
type: PropType<LatLng>;
|
|
192
203
|
required: true;
|
|
@@ -215,7 +226,20 @@ declare const TgMarker: import("vue").DefineComponent<{
|
|
|
215
226
|
visible: {
|
|
216
227
|
type: PropType<boolean>;
|
|
217
228
|
};
|
|
218
|
-
|
|
229
|
+
'onUpdate:position': import("vue").Prop<import("../../utils/vue-utils").EventCallback<LatLng>>;
|
|
230
|
+
}>> & {
|
|
231
|
+
onDrag?: ((event: import("../../map/event").Tg.MouseEvent) => any) | undefined;
|
|
232
|
+
onDragend?: ((event: import("../../map/event").Tg.MouseEvent) => any) | undefined;
|
|
233
|
+
onDragstart?: ((event: import("../../map/event").Tg.MouseEvent) => any) | undefined;
|
|
234
|
+
onClick?: ((event: import("../../map/event").Tg.MouseEvent) => any) | undefined;
|
|
235
|
+
onDblclick?: ((event: import("../../map/event").Tg.MouseEvent) => any) | undefined;
|
|
236
|
+
onMousedown?: ((event: import("../../map/event").Tg.MouseEvent) => any) | undefined;
|
|
237
|
+
onMouseout?: ((event: import("../../map/event").Tg.MouseEvent) => any) | undefined;
|
|
238
|
+
onMouseover?: ((event: import("../../map/event").Tg.MouseEvent) => any) | undefined;
|
|
239
|
+
onMouseup?: ((event: import("../../map/event").Tg.MouseEvent) => any) | undefined;
|
|
240
|
+
"onUpdate:position"?: ((event: LatLng) => any) | undefined;
|
|
241
|
+
onRightclick?: ((event: import("../../map/event").Tg.MouseEvent) => any) | undefined;
|
|
242
|
+
}, {}, {}>;
|
|
219
243
|
type TgMarker = InstanceType<typeof TgMarker>;
|
|
220
244
|
export default TgMarker;
|
|
221
245
|
export type TgInfo = TgInfoWindow | TgInfoBox;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { type PropType } from 'vue';
|
|
2
|
-
import type { PolygonOverlay } from '../../map/map/overlay/polygon';
|
|
3
2
|
import type { LatLng } from '../../map/lat-lng';
|
|
3
|
+
import type { PolygonEventMap, PolygonOverlay } from '../../map/map/overlay/polygon';
|
|
4
|
+
import { type EventEmits } from '../../utils/vue-utils';
|
|
5
|
+
type TgPolygonEmits = {
|
|
6
|
+
'update:paths': LatLng[][];
|
|
7
|
+
};
|
|
4
8
|
declare const _default: import("vue").DefineComponent<{
|
|
5
9
|
paths: {
|
|
6
10
|
type: PropType<LatLng[][]>;
|
|
@@ -30,16 +34,18 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
30
34
|
fillOpacity: {
|
|
31
35
|
type: PropType<number>;
|
|
32
36
|
};
|
|
37
|
+
'onUpdate:paths': import("vue").Prop<import("../../utils/vue-utils").EventCallback<LatLng[][]>>;
|
|
33
38
|
}, {
|
|
34
39
|
attrs: import("vue").ComputedRef<{
|
|
35
40
|
binds: Record<string, unknown>;
|
|
36
41
|
listeners: Record<string, unknown>;
|
|
37
42
|
listenerProps: Record<string, unknown>;
|
|
38
43
|
}>;
|
|
39
|
-
|
|
44
|
+
overlay: PolygonOverlay;
|
|
45
|
+
emittedPaths: LatLng[][] | undefined;
|
|
40
46
|
}, unknown, {}, {}, import("vue").DefineComponent<{}, {}, {}, {}, {
|
|
41
47
|
recreate(): void;
|
|
42
|
-
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>, import("vue").ComponentOptionsMixin,
|
|
48
|
+
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>, import("vue").ComponentOptionsMixin, EventEmits<PolygonEventMap & TgPolygonEmits>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
43
49
|
paths: {
|
|
44
50
|
type: PropType<LatLng[][]>;
|
|
45
51
|
required: true;
|
|
@@ -68,5 +74,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
68
74
|
fillOpacity: {
|
|
69
75
|
type: PropType<number>;
|
|
70
76
|
};
|
|
71
|
-
|
|
77
|
+
'onUpdate:paths': import("vue").Prop<import("../../utils/vue-utils").EventCallback<LatLng[][]>>;
|
|
78
|
+
}>> & {
|
|
79
|
+
onClick?: ((event: import("../../map/event").Tg.Event) => any) | undefined;
|
|
80
|
+
onDblclick?: ((event: import("../../map/event").Tg.Event) => any) | undefined;
|
|
81
|
+
onMousedown?: ((event: import("../../map/event").Tg.MouseEvent) => any) | undefined;
|
|
82
|
+
onMouseout?: ((event: import("../../map/event").Tg.MouseEvent) => any) | undefined;
|
|
83
|
+
onMouseover?: ((event: import("../../map/event").Tg.MouseEvent) => any) | undefined;
|
|
84
|
+
onMouseup?: ((event: import("../../map/event").Tg.MouseEvent) => any) | undefined;
|
|
85
|
+
"onUpdate:paths"?: ((event: LatLng[][]) => any) | undefined;
|
|
86
|
+
"onPaths-edited"?: ((event: import("../../map/event").Tg.Event) => any) | undefined;
|
|
87
|
+
}, {}, {}>;
|
|
72
88
|
export default _default;
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import { type PropType } from 'vue';
|
|
2
|
-
import
|
|
3
|
-
import type {
|
|
2
|
+
import { LatLng } from '../../map/lat-lng';
|
|
3
|
+
import type { PolylineEventMap, PolylineOverlay } from '../../map/map/overlay/polyline';
|
|
4
|
+
import { type EventEmits } from '../../utils/vue-utils';
|
|
5
|
+
type TgPolylineEmits = {
|
|
6
|
+
'update:path': LatLng[];
|
|
7
|
+
};
|
|
4
8
|
declare const _default: import("vue").DefineComponent<{
|
|
5
9
|
path: {
|
|
6
10
|
type: PropType<LatLng[]>;
|
|
@@ -24,16 +28,18 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
24
28
|
visible: {
|
|
25
29
|
type: PropType<boolean>;
|
|
26
30
|
};
|
|
31
|
+
'onUpdate:path': import("vue").Prop<import("../../utils/vue-utils").EventCallback<LatLng[]>>;
|
|
27
32
|
}, {
|
|
28
33
|
attrs: import("vue").ComputedRef<{
|
|
29
34
|
binds: Record<string, unknown>;
|
|
30
35
|
listeners: Record<string, unknown>;
|
|
31
36
|
listenerProps: Record<string, unknown>;
|
|
32
37
|
}>;
|
|
33
|
-
|
|
38
|
+
overlay: PolylineOverlay;
|
|
39
|
+
emittedPath: LatLng[] | undefined;
|
|
34
40
|
}, unknown, {}, {}, import("vue").DefineComponent<{}, {}, {}, {}, {
|
|
35
41
|
recreate(): void;
|
|
36
|
-
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>, import("vue").ComponentOptionsMixin,
|
|
42
|
+
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>, import("vue").ComponentOptionsMixin, EventEmits<PolylineEventMap & TgPolylineEmits>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
37
43
|
path: {
|
|
38
44
|
type: PropType<LatLng[]>;
|
|
39
45
|
required: true;
|
|
@@ -56,5 +62,15 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
56
62
|
visible: {
|
|
57
63
|
type: PropType<boolean>;
|
|
58
64
|
};
|
|
59
|
-
|
|
65
|
+
'onUpdate:path': import("vue").Prop<import("../../utils/vue-utils").EventCallback<LatLng[]>>;
|
|
66
|
+
}>> & {
|
|
67
|
+
onClick?: ((event: import("../../map/event").Tg.Event) => any) | undefined;
|
|
68
|
+
onDblclick?: ((event: import("../../map/event").Tg.Event) => any) | undefined;
|
|
69
|
+
onMousedown?: ((event: import("../../map/event").Tg.MouseEvent) => any) | undefined;
|
|
70
|
+
onMouseout?: ((event: import("../../map/event").Tg.MouseEvent) => any) | undefined;
|
|
71
|
+
onMouseover?: ((event: import("../../map/event").Tg.MouseEvent) => any) | undefined;
|
|
72
|
+
onMouseup?: ((event: import("../../map/event").Tg.MouseEvent) => any) | undefined;
|
|
73
|
+
"onUpdate:path"?: ((event: LatLng[]) => any) | undefined;
|
|
74
|
+
"onPath-edited"?: ((event: import("../../map/event").Tg.Event) => any) | undefined;
|
|
75
|
+
}, {}, {}>;
|
|
60
76
|
export default _default;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { type PropType } from 'vue';
|
|
2
|
+
import type { LatLngBounds } from '../../map/lat-lng';
|
|
3
|
+
import type { RectangleEventMap, RectangleOverlay } from '../../map/map/overlay/rectangle';
|
|
4
|
+
import { type EventEmits } from '../../utils/vue-utils';
|
|
5
|
+
type TgRectangleEmits = {
|
|
6
|
+
'update:bounds': LatLngBounds;
|
|
7
|
+
};
|
|
8
|
+
declare const _default: import("vue").DefineComponent<{
|
|
9
|
+
bounds: {
|
|
10
|
+
type: PropType<LatLngBounds>;
|
|
11
|
+
required: true;
|
|
12
|
+
};
|
|
13
|
+
clickable: {
|
|
14
|
+
type: PropType<boolean>;
|
|
15
|
+
};
|
|
16
|
+
editable: {
|
|
17
|
+
type: PropType<boolean>;
|
|
18
|
+
};
|
|
19
|
+
strokeColor: {
|
|
20
|
+
type: PropType<string>;
|
|
21
|
+
};
|
|
22
|
+
strokeOpacity: {
|
|
23
|
+
type: PropType<number>;
|
|
24
|
+
};
|
|
25
|
+
strokeWeight: {
|
|
26
|
+
type: PropType<number>;
|
|
27
|
+
};
|
|
28
|
+
visible: {
|
|
29
|
+
type: PropType<boolean>;
|
|
30
|
+
};
|
|
31
|
+
fillColor: {
|
|
32
|
+
type: PropType<string>;
|
|
33
|
+
};
|
|
34
|
+
fillOpacity: {
|
|
35
|
+
type: PropType<number>;
|
|
36
|
+
};
|
|
37
|
+
'onUpdate:bounds': import("vue").Prop<import("../../utils/vue-utils").EventCallback<LatLngBounds>>;
|
|
38
|
+
}, {
|
|
39
|
+
attrs: import("vue").ComputedRef<{
|
|
40
|
+
binds: Record<string, unknown>;
|
|
41
|
+
listeners: Record<string, unknown>;
|
|
42
|
+
listenerProps: Record<string, unknown>;
|
|
43
|
+
}>;
|
|
44
|
+
overlay: RectangleOverlay;
|
|
45
|
+
emittedBounds: LatLngBounds | undefined;
|
|
46
|
+
}, unknown, {}, {}, import("vue").DefineComponent<{}, {}, {}, {}, {
|
|
47
|
+
recreate(): void;
|
|
48
|
+
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>, import("vue").ComponentOptionsMixin, EventEmits<RectangleEventMap & TgRectangleEmits>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
49
|
+
bounds: {
|
|
50
|
+
type: PropType<LatLngBounds>;
|
|
51
|
+
required: true;
|
|
52
|
+
};
|
|
53
|
+
clickable: {
|
|
54
|
+
type: PropType<boolean>;
|
|
55
|
+
};
|
|
56
|
+
editable: {
|
|
57
|
+
type: PropType<boolean>;
|
|
58
|
+
};
|
|
59
|
+
strokeColor: {
|
|
60
|
+
type: PropType<string>;
|
|
61
|
+
};
|
|
62
|
+
strokeOpacity: {
|
|
63
|
+
type: PropType<number>;
|
|
64
|
+
};
|
|
65
|
+
strokeWeight: {
|
|
66
|
+
type: PropType<number>;
|
|
67
|
+
};
|
|
68
|
+
visible: {
|
|
69
|
+
type: PropType<boolean>;
|
|
70
|
+
};
|
|
71
|
+
fillColor: {
|
|
72
|
+
type: PropType<string>;
|
|
73
|
+
};
|
|
74
|
+
fillOpacity: {
|
|
75
|
+
type: PropType<number>;
|
|
76
|
+
};
|
|
77
|
+
'onUpdate:bounds': import("vue").Prop<import("../../utils/vue-utils").EventCallback<LatLngBounds>>;
|
|
78
|
+
}>> & {
|
|
79
|
+
onClick?: ((event: import("../../map/event").Tg.Event) => any) | undefined;
|
|
80
|
+
onDblclick?: ((event: import("../../map/event").Tg.Event) => any) | undefined;
|
|
81
|
+
onMousedown?: ((event: import("../../map/event").Tg.MouseEvent) => any) | undefined;
|
|
82
|
+
onMouseout?: ((event: import("../../map/event").Tg.MouseEvent) => any) | undefined;
|
|
83
|
+
onMouseover?: ((event: import("../../map/event").Tg.MouseEvent) => any) | undefined;
|
|
84
|
+
onMouseup?: ((event: import("../../map/event").Tg.MouseEvent) => any) | undefined;
|
|
85
|
+
"onUpdate:bounds"?: ((event: LatLngBounds) => any) | undefined;
|
|
86
|
+
"onBounds-changed"?: ((event: import("../../map/event").Tg.Event) => any) | undefined;
|
|
87
|
+
}, {}, {}>;
|
|
88
|
+
export default _default;
|
|
@@ -16,11 +16,14 @@ export declare function addGoogleEventListener(target: UnionGoogleEventTarget, t
|
|
|
16
16
|
export declare function addBaiduEventListener(target: UnionBaiduEventTarget, type: string, listener: (...args: any[]) => void): RemoveEventListenerFunction;
|
|
17
17
|
export declare function addHtmlEventListener<K extends keyof EventMap, EventMap = HTMLElementEventMap, T extends EventTarget = HTMLElement>(target: T, type: K, listener: (this: T, ev: EventMap[K]) => any, options?: AddEventListenerOptions | boolean): RemoveEventListenerFunction;
|
|
18
18
|
export declare function addTgEventListener<K extends keyof EventMap, EventMap = AbstractMapEventMap, T extends Tg.EventTarget = AbstractMap>(target: T, type: K, listener: (this: T, ev: EventMap[K]) => any): RemoveEventListenerFunction;
|
|
19
|
+
export interface EventTargetDelegate extends Tg.EventTarget {
|
|
20
|
+
setTarget(target: Tg.EventTarget): this;
|
|
21
|
+
}
|
|
19
22
|
/**
|
|
20
23
|
* ## Delegate(代理) VS Mixin(混合)
|
|
21
24
|
* Delegate相对于Mixin的优点是调用路径更明确, 缺点是js/ts原生不支持, 需要写样板代码
|
|
22
25
|
*/
|
|
23
|
-
export declare abstract class AbstractEventTargetDelegate<T = any> implements
|
|
26
|
+
export declare abstract class AbstractEventTargetDelegate<T = any> implements EventTargetDelegate {
|
|
24
27
|
protected inner: T;
|
|
25
28
|
protected coordTypeSupplier: CoordTypeSupplier;
|
|
26
29
|
protected eventMap: Map<string, any>;
|
|
@@ -30,6 +33,24 @@ export declare abstract class AbstractEventTargetDelegate<T = any> implements Tg
|
|
|
30
33
|
abstract addEventListener(type: string, listener: Tg.EventListener): void;
|
|
31
34
|
abstract removeEventListener(type: string, listener: Tg.EventListener): void;
|
|
32
35
|
}
|
|
36
|
+
export declare class EventHubEventTargetDelegate<EventTypes extends string = string> implements EventTargetDelegate {
|
|
37
|
+
private delegate;
|
|
38
|
+
private options;
|
|
39
|
+
private eventHub;
|
|
40
|
+
constructor(delegate: EventTargetDelegate, options: {
|
|
41
|
+
/** 由{@link eventHub}手动处理的事件 */
|
|
42
|
+
types: EventTypes[];
|
|
43
|
+
/** 用户开始监听{@link type} */
|
|
44
|
+
onListen: (type: EventTypes) => void;
|
|
45
|
+
/** 用户结束监听{@link type} */
|
|
46
|
+
onCancel: (type: EventTypes) => void;
|
|
47
|
+
});
|
|
48
|
+
notify(event: Tg.Event): void;
|
|
49
|
+
hasListener(type: EventTypes): boolean;
|
|
50
|
+
setTarget(target: Tg.EventTarget): this;
|
|
51
|
+
addEventListener(type: string, listener: Tg.EventListener): void;
|
|
52
|
+
removeEventListener(type: string, listener: Tg.EventListener): void;
|
|
53
|
+
}
|
|
33
54
|
export declare class GoogleEventTargetDelegate<T extends UnionGoogleEventTarget = UnionGoogleEventTarget> extends AbstractEventTargetDelegate<T> {
|
|
34
55
|
private static EVENT_TYPE_MAP;
|
|
35
56
|
addEventListener(type: string, listener: Tg.EventListener): void;
|
|
@@ -17,8 +17,15 @@ export interface LatLngLiteral {
|
|
|
17
17
|
readonly coord?: CoordType;
|
|
18
18
|
}
|
|
19
19
|
export declare class LatLng {
|
|
20
|
+
/**
|
|
21
|
+
* 纬度, 分南北, [-90, 90], 0点为赤道
|
|
22
|
+
*/
|
|
20
23
|
readonly lat: number;
|
|
24
|
+
/**
|
|
25
|
+
* 经度, 分东西, [-180, 180], 0点为本初子午线
|
|
26
|
+
*/
|
|
21
27
|
readonly lng: number;
|
|
28
|
+
/** 坐标系 */
|
|
22
29
|
readonly coord: CoordType;
|
|
23
30
|
static ZERO: LatLng;
|
|
24
31
|
/** @param coord Baidu Map的坐标一般都是bd09 */
|
|
@@ -29,7 +36,17 @@ export declare class LatLng {
|
|
|
29
36
|
static fromLiteral(latlng: LatLngLiteral): LatLng;
|
|
30
37
|
static fromLngLat(lng: number, lat: number, coord?: CoordType): LatLng;
|
|
31
38
|
static create(lat: number, lng: number, coord?: CoordType): LatLng;
|
|
32
|
-
constructor(
|
|
39
|
+
constructor(
|
|
40
|
+
/**
|
|
41
|
+
* 纬度, 分南北, [-90, 90], 0点为赤道
|
|
42
|
+
*/
|
|
43
|
+
lat: number,
|
|
44
|
+
/**
|
|
45
|
+
* 经度, 分东西, [-180, 180], 0点为本初子午线
|
|
46
|
+
*/
|
|
47
|
+
lng: number,
|
|
48
|
+
/** 坐标系 */
|
|
49
|
+
coord: CoordType);
|
|
33
50
|
/** 转换坐标到指定坐标系 */
|
|
34
51
|
to(coordType: StringEnumValue<typeof CoordType>): LatLng;
|
|
35
52
|
toBaidu(coord: CoordType): BMap.Point;
|
|
@@ -74,6 +91,11 @@ export declare class LatLngBounds {
|
|
|
74
91
|
getCenter(): LatLng;
|
|
75
92
|
toString(): string;
|
|
76
93
|
equals(other: LatLngBounds): boolean;
|
|
94
|
+
/**
|
|
95
|
+
* 矩形的四个点数组
|
|
96
|
+
* 顺时针: sw(西南) -> nw(西北) -> ne(东北) -> se(东南)
|
|
97
|
+
* */
|
|
98
|
+
toRectArray(): LatLng[];
|
|
77
99
|
toGoogle(coord: CoordType): google.maps.LatLngBounds;
|
|
78
100
|
toBaidu(coord: CoordType): BMap.Bounds;
|
|
79
101
|
toBaiduArray(coord: CoordType): BMap.Point[];
|
|
@@ -20,6 +20,7 @@ import { BaiduMarker } from './overlay/marker';
|
|
|
20
20
|
import type { BaiduOverlay } from './overlay/overlay';
|
|
21
21
|
import { BaiduPolygon } from './overlay/polygon';
|
|
22
22
|
import { BaiduPolyline } from './overlay/polyline';
|
|
23
|
+
import { BaiduRectangle } from './overlay/rectangle';
|
|
23
24
|
export declare class BaiduMap extends AbstractMap {
|
|
24
25
|
setDefaultCursor(cursor: string): void;
|
|
25
26
|
private buildInMapTypeId2BIMT;
|
|
@@ -61,6 +62,7 @@ export declare class BaiduMap extends AbstractMap {
|
|
|
61
62
|
createCircle: typeof BaiduCircle.create;
|
|
62
63
|
createPolygon: typeof BaiduPolygon.create;
|
|
63
64
|
createPolyline: typeof BaiduPolyline.create;
|
|
65
|
+
createRectangle: typeof BaiduRectangle.create;
|
|
64
66
|
createInfoWindow: typeof BaiduInfoWindow.create;
|
|
65
67
|
createInfoBox: typeof BaiduInfoBoxOverlay.create;
|
|
66
68
|
createMarker: typeof BaiduMarker.create;
|
|
@@ -21,6 +21,7 @@ import { GoogleMarker } from './overlay/marker';
|
|
|
21
21
|
import type { GoogleOverlay } from './overlay/overlay';
|
|
22
22
|
import { GooglePolygon } from './overlay/polygon';
|
|
23
23
|
import { GooglePolyline } from './overlay/polyline';
|
|
24
|
+
import { GoogleRectangle } from './overlay/rectangle';
|
|
24
25
|
export declare class GoogleMap extends AbstractMap {
|
|
25
26
|
mapOptions: MapOptions;
|
|
26
27
|
setDefaultCursor(cursor: string): void;
|
|
@@ -61,6 +62,7 @@ export declare class GoogleMap extends AbstractMap {
|
|
|
61
62
|
createCircle: typeof GoogleCircle.create;
|
|
62
63
|
createPolygon: typeof GooglePolygon.create;
|
|
63
64
|
createPolyline: typeof GooglePolyline.create;
|
|
65
|
+
createRectangle: typeof GoogleRectangle.create;
|
|
64
66
|
createInfoWindow: typeof GoogleInfoWindow.create;
|
|
65
67
|
createInfoBox: typeof GoogleInfoBoxOverlay.create;
|
|
66
68
|
createMarker: typeof GoogleMarker.create;
|