tg-map-vue3 3.7.5 → 3.7.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 +1 -1
- package/dist/src/components/TgMap.vue.d.ts +4 -16
- package/dist/src/components/overlays/TgMarker.vue.d.ts +20 -1
- package/dist/src/map/map-loader.d.ts +1 -5
- package/dist/src/utils/objects.d.ts +0 -10
- package/dist/src/utils/utils.d.ts +0 -4
- package/dist/tg-map.js +859 -881
- package/dist/tg-map.js.map +1 -1
- package/dist/tg-map.umd.cjs +6 -6
- package/dist/tg-map.umd.cjs.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -69,10 +69,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
69
69
|
type: PropType<"single" | "multi">;
|
|
70
70
|
};
|
|
71
71
|
gestureHandling: {
|
|
72
|
-
type: PropType<StringEnumValue<typeof GestureHandlingOptions>>;
|
|
73
|
-
* 仅用来获取center的值, 需要设置center的值请使用`center`属性
|
|
74
|
-
* @see center
|
|
75
|
-
* */
|
|
72
|
+
type: PropType<StringEnumValue<typeof GestureHandlingOptions>>;
|
|
76
73
|
};
|
|
77
74
|
minZoom: {
|
|
78
75
|
type: PropType<number>;
|
|
@@ -84,10 +81,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
84
81
|
type: PropType<MapStyle>;
|
|
85
82
|
};
|
|
86
83
|
mapTypeId: {
|
|
87
|
-
type: PropType<StringEnumValue<typeof BuildInMapTypeId>>;
|
|
88
|
-
* 仅用来获取center的值, 需要设置center的值请使用`center`属性
|
|
89
|
-
* @see center
|
|
90
|
-
* */
|
|
84
|
+
type: PropType<StringEnumValue<typeof BuildInMapTypeId>>;
|
|
91
85
|
};
|
|
92
86
|
/** 地图类型对象, 优先级比mapTypeId高 */
|
|
93
87
|
mapType: {
|
|
@@ -169,10 +163,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
169
163
|
type: PropType<"single" | "multi">;
|
|
170
164
|
};
|
|
171
165
|
gestureHandling: {
|
|
172
|
-
type: PropType<StringEnumValue<typeof GestureHandlingOptions>>;
|
|
173
|
-
* 仅用来获取center的值, 需要设置center的值请使用`center`属性
|
|
174
|
-
* @see center
|
|
175
|
-
* */
|
|
166
|
+
type: PropType<StringEnumValue<typeof GestureHandlingOptions>>;
|
|
176
167
|
};
|
|
177
168
|
minZoom: {
|
|
178
169
|
type: PropType<number>;
|
|
@@ -184,10 +175,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
184
175
|
type: PropType<MapStyle>;
|
|
185
176
|
};
|
|
186
177
|
mapTypeId: {
|
|
187
|
-
type: PropType<StringEnumValue<typeof BuildInMapTypeId>>;
|
|
188
|
-
* 仅用来获取center的值, 需要设置center的值请使用`center`属性
|
|
189
|
-
* @see center
|
|
190
|
-
* */
|
|
178
|
+
type: PropType<StringEnumValue<typeof BuildInMapTypeId>>;
|
|
191
179
|
};
|
|
192
180
|
/** 地图类型对象, 优先级比mapTypeId高 */
|
|
193
181
|
mapType: {
|
|
@@ -42,6 +42,14 @@ declare const TgMarker: import("vue").DefineComponent<{
|
|
|
42
42
|
normalizePositionForBaidu: {
|
|
43
43
|
type: PropType<boolean>;
|
|
44
44
|
};
|
|
45
|
+
/**
|
|
46
|
+
* 是否自动添加到TgMarkerClusterer中去
|
|
47
|
+
* @default true
|
|
48
|
+
*/
|
|
49
|
+
autoAddToClusterer: {
|
|
50
|
+
type: PropType<boolean>;
|
|
51
|
+
default: boolean;
|
|
52
|
+
};
|
|
45
53
|
'onUpdate:position': import("vue").Prop<import("../../utils/vue-utils").EventCallback<LatLng>>;
|
|
46
54
|
}, {
|
|
47
55
|
attrs: import("vue").ComputedRef<{
|
|
@@ -198,6 +206,7 @@ declare const TgMarker: import("vue").DefineComponent<{
|
|
|
198
206
|
} & import("vue").ComponentCustomProperties & {}) | undefined;
|
|
199
207
|
info: TgInfo | undefined;
|
|
200
208
|
emittedPosition: LatLng | undefined;
|
|
209
|
+
autoAddToClustererWhenCreate: boolean;
|
|
201
210
|
}, unknown, {}, {
|
|
202
211
|
$clusterer(): TgMarkerClusterer | undefined;
|
|
203
212
|
onAddLabel(label: TgLabel): void;
|
|
@@ -239,6 +248,14 @@ declare const TgMarker: import("vue").DefineComponent<{
|
|
|
239
248
|
normalizePositionForBaidu: {
|
|
240
249
|
type: PropType<boolean>;
|
|
241
250
|
};
|
|
251
|
+
/**
|
|
252
|
+
* 是否自动添加到TgMarkerClusterer中去
|
|
253
|
+
* @default true
|
|
254
|
+
*/
|
|
255
|
+
autoAddToClusterer: {
|
|
256
|
+
type: PropType<boolean>;
|
|
257
|
+
default: boolean;
|
|
258
|
+
};
|
|
242
259
|
'onUpdate:position': import("vue").Prop<import("../../utils/vue-utils").EventCallback<LatLng>>;
|
|
243
260
|
}>> & {
|
|
244
261
|
onClick?: ((event: import("../../map/event").Tg.MouseEvent) => any) | undefined;
|
|
@@ -253,7 +270,9 @@ declare const TgMarker: import("vue").DefineComponent<{
|
|
|
253
270
|
onDrag?: ((event: import("../../map/event").Tg.MouseEvent) => any) | undefined;
|
|
254
271
|
onDragend?: ((event: import("../../map/event").Tg.MouseEvent) => any) | undefined;
|
|
255
272
|
"onUpdate:position"?: ((event: LatLng) => any) | undefined;
|
|
256
|
-
}, {
|
|
273
|
+
}, {
|
|
274
|
+
autoAddToClusterer: boolean;
|
|
275
|
+
}, {}>;
|
|
257
276
|
type TgMarker = InstanceType<typeof TgMarker>;
|
|
258
277
|
export default TgMarker;
|
|
259
278
|
export type TgInfo = TgInfoWindow | TgInfoBox;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { TgMapConfig } from './map-config';
|
|
2
2
|
import { TgMapType } from './map-factory';
|
|
3
3
|
/**
|
|
4
4
|
* 使用类型映射的方式`TgMapConfig[T]`, 确定`type`的类型之后, 不会自动推断`config`的类型,
|
|
@@ -8,10 +8,6 @@ type LoadMapOptions<T extends TgMapType> = {
|
|
|
8
8
|
type: T;
|
|
9
9
|
config: TgMapConfig[T];
|
|
10
10
|
};
|
|
11
|
-
/**
|
|
12
|
-
* 加载缓存的地图, 保证一种地图只加载一次
|
|
13
|
-
*/
|
|
14
|
-
export declare function loadCachedMap(type: TgMapType): Promise<unknown>;
|
|
15
11
|
/** 载入地图库 */
|
|
16
12
|
export declare function loadMap<T extends TgMapType>(options: LoadMapOptions<T>): Promise<unknown>;
|
|
17
13
|
export declare function loadJsonp(url: string, callbackParamName?: string): Promise<unknown>;
|
|
@@ -8,20 +8,10 @@ export declare namespace Objects {
|
|
|
8
8
|
function toJsonSafely(value: any): string;
|
|
9
9
|
/** 删除obj中纯对象上的值为undefined的属性 */
|
|
10
10
|
function deleteUndefinedPropertyOnPlainObjectDeeply(obj: any): void;
|
|
11
|
-
/** 存在则返回, 不存在则新建 */
|
|
12
|
-
function putIfAbsent<K extends keyof any, V>(obj: Record<K, V>, key: K, ifAbsent: () => Exclude<V, undefined>): Exclude<V, undefined>;
|
|
13
11
|
/** @see Omit */
|
|
14
12
|
function omit<T, K extends keyof any>(obj: T, ...keys: K[]): Omit<T, K>;
|
|
15
13
|
/** @see Pick */
|
|
16
14
|
function pick<T, K extends keyof T>(obj: T, ...keys: K[]): Pick<T, K>;
|
|
17
|
-
/**
|
|
18
|
-
* 使用{@link keyPath}读取`obj`的字段
|
|
19
|
-
*
|
|
20
|
-
* @param keyPath `.`分隔的字段名 或 字段名数组
|
|
21
|
-
* @returns 若字段不存在, 则返回`undefined`
|
|
22
|
-
*/
|
|
23
|
-
function get(obj: any, keyPath: string | string[]): any;
|
|
24
|
-
function del(obj: any, keyPath: string | string[]): any;
|
|
25
15
|
}
|
|
26
16
|
/** 用于替代Vue2中的filter, 直接交给模板使用 */
|
|
27
17
|
export declare const stringify: typeof Objects.toJsonSafely;
|
|
@@ -14,7 +14,3 @@ export declare function isDef<T>(v: T | undefined | null): v is T;
|
|
|
14
14
|
* @see isDef
|
|
15
15
|
*/
|
|
16
16
|
export declare function isEntryValueDef<K, V>(entry: [K, V]): entry is [K, NonNullable<V>];
|
|
17
|
-
/**
|
|
18
|
-
* 创建一个异步初始化的单例, 保证只初始化成功一次
|
|
19
|
-
*/
|
|
20
|
-
export declare function createAsyncSingleton<T>(creator: () => Promise<T>): () => Promise<T>;
|