tg-map-vue3 3.1.8 → 3.1.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/dist/src/map/event-target.d.ts +1 -0
- package/dist/src/map/map/baidu-map.d.ts +2 -0
- package/dist/src/map/map/extra/autocomplete.d.ts +1 -0
- package/dist/src/map/map/map.d.ts +13 -0
- package/dist/tg-map.js +610 -580
- package/dist/tg-map.js.map +1 -1
- package/dist/tg-map.umd.cjs +4 -4
- package/dist/tg-map.umd.cjs.map +1 -1
- package/package.json +1 -1
|
@@ -13,6 +13,7 @@ export interface RemoveEventListenerFunction {
|
|
|
13
13
|
}
|
|
14
14
|
export declare function addGoogleEventListener(target: UnionGoogleEventTarget, type: string, listener: (...args: any[]) => void): RemoveEventListenerFunction;
|
|
15
15
|
export declare function addBaiduEventListener(target: UnionBaiduEventTarget, type: string, listener: (...args: any[]) => void): RemoveEventListenerFunction;
|
|
16
|
+
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;
|
|
16
17
|
/**
|
|
17
18
|
* ## Delegate(代理) VS Mixin(混合)
|
|
18
19
|
* Delegate相对于Mixin的优点是调用路径更明确, 缺点是js/ts原生不支持, 需要写样板代码
|
|
@@ -36,6 +36,8 @@ export declare class BaiduMap extends AbstractMap {
|
|
|
36
36
|
setDisableDoubleClickZoom(type: boolean): void;
|
|
37
37
|
getCenter(): LatLng;
|
|
38
38
|
setCenter(latlng: LatLng): void;
|
|
39
|
+
getZoom(): number;
|
|
40
|
+
setZoom(zoom: number): void;
|
|
39
41
|
setMinZoom(zoom: number): void;
|
|
40
42
|
setMaxZoom(zoom: number): void;
|
|
41
43
|
setMapStyle(mapStyle: MapStyle): void;
|
|
@@ -30,6 +30,7 @@ export declare class GoogleAutocomplete extends Autocomplete {
|
|
|
30
30
|
}
|
|
31
31
|
export declare class BaiduAutocomplete extends Autocomplete {
|
|
32
32
|
inner: BMap.Autocomplete;
|
|
33
|
+
private input;
|
|
33
34
|
constructor(map: BaiduMap, options: AutocompleteOptions);
|
|
34
35
|
addResultListener(listener: EventCallback<AutocompleteResult>): RemoveEventListenerFunction;
|
|
35
36
|
}
|
|
@@ -52,6 +52,19 @@ export type AbstractMapEventMap = {
|
|
|
52
52
|
'zoom-changed': Tg.Event;
|
|
53
53
|
'map-type-changed': Tg.Event;
|
|
54
54
|
};
|
|
55
|
+
/** 预设的几个地图Zoom等级 */
|
|
56
|
+
export declare const enum MapZoom {
|
|
57
|
+
/** 世界 */
|
|
58
|
+
WORLD = 1,
|
|
59
|
+
/** 大洲 */
|
|
60
|
+
STATE = 5,
|
|
61
|
+
/** 城市 */
|
|
62
|
+
CITY = 10,
|
|
63
|
+
/** 街道 */
|
|
64
|
+
STREET = 15,
|
|
65
|
+
/** 建筑 */
|
|
66
|
+
BUILDING = 20
|
|
67
|
+
}
|
|
55
68
|
/** 抽象出来的Map类 */
|
|
56
69
|
export declare abstract class AbstractMap implements CoordTypeSupplier, Tg.EventTarget {
|
|
57
70
|
element: HTMLElement;
|