tg-map-vue3 3.1.6 → 3.1.8
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/TgMap.vue.d.ts +6 -0
- package/dist/src/components/TgMapWidget.vue.d.ts +8 -8
- package/dist/src/components/index.d.ts +31 -29
- package/dist/src/map/event-target.d.ts +13 -1
- package/dist/src/map/lat-lng.d.ts +1 -1
- package/dist/src/map/map/baidu-map.d.ts +17 -13
- package/dist/src/map/map/controls/control.d.ts +3 -3
- package/dist/src/map/map/controls/map-type.control.d.ts +1 -1
- package/dist/src/map/map/controls/scale.control.d.ts +2 -2
- package/dist/src/map/map/controls/zoom.control.d.ts +1 -1
- package/dist/src/map/map/extra/autocomplete.d.ts +35 -0
- package/dist/src/map/map/extra/marker-clusterer.d.ts +3 -3
- package/dist/src/map/map/extra/places-service.d.ts +43 -0
- package/dist/src/map/map/google-map.d.ts +18 -14
- package/dist/src/map/map/here-map.d.ts +5 -1
- package/dist/src/map/map/map-options.d.ts +1 -1
- package/dist/src/map/map/map-type.d.ts +4 -4
- package/dist/src/map/map/map.d.ts +20 -16
- package/dist/src/map/map/overlay/baidu-info-box.d.ts +1 -1
- package/dist/src/map/map/overlay/circle.d.ts +3 -3
- package/dist/src/map/map/overlay/element-overlay.d.ts +2 -2
- package/dist/src/map/map/overlay/google-label.d.ts +14 -14
- package/dist/src/map/map/overlay/icon.d.ts +2 -2
- package/dist/src/map/map/overlay/info-box.d.ts +7 -7
- package/dist/src/map/map/overlay/info-window.d.ts +4 -4
- package/dist/src/map/map/overlay/label.d.ts +4 -4
- package/dist/src/map/map/overlay/marker.d.ts +7 -7
- package/dist/src/map/map/overlay/overlay.d.ts +3 -3
- package/dist/src/map/map/overlay/polygon.d.ts +3 -3
- package/dist/src/map/map/overlay/polyline.d.ts +3 -3
- package/dist/src/map/map/overlay/shape.d.ts +2 -2
- package/dist/src/map/map-config.d.ts +16 -5
- package/dist/src/map/map-loader.d.ts +12 -2
- package/dist/src/map/unions.d.ts +7 -4
- package/dist/src/utils/arrays.d.ts +1 -1
- package/dist/src/utils/google-utils.d.ts +31 -0
- package/dist/src/utils/here-utils.d.ts +1 -1
- package/dist/tg-map.js +2966 -2707
- package/dist/tg-map.js.map +1 -1
- package/dist/tg-map.umd.cjs +5 -5
- package/dist/tg-map.umd.cjs.map +1 -1
- package/package.json +3 -3
|
@@ -82,6 +82,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
82
82
|
mapType: {
|
|
83
83
|
type: import("vue").PropType<any>;
|
|
84
84
|
};
|
|
85
|
+
hideLogo: {
|
|
86
|
+
type: import("vue").PropType<boolean>;
|
|
87
|
+
};
|
|
85
88
|
onLoad: import("vue").Prop<import("../utils/vue-utils").EventCallback<AbstractMap>, import("../utils/vue-utils").EventCallback<AbstractMap>>;
|
|
86
89
|
'onUpdate:center': import("vue").Prop<import("../utils/vue-utils").EventCallback<LatLng>, import("../utils/vue-utils").EventCallback<LatLng>>;
|
|
87
90
|
'onUpdate:current-center': import("vue").Prop<import("../utils/vue-utils").EventCallback<LatLng>, import("../utils/vue-utils").EventCallback<LatLng>>;
|
|
@@ -169,6 +172,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
169
172
|
mapType: {
|
|
170
173
|
type: import("vue").PropType<any>;
|
|
171
174
|
};
|
|
175
|
+
hideLogo: {
|
|
176
|
+
type: import("vue").PropType<boolean>;
|
|
177
|
+
};
|
|
172
178
|
onLoad: import("vue").Prop<import("../utils/vue-utils").EventCallback<AbstractMap>, import("../utils/vue-utils").EventCallback<AbstractMap>>;
|
|
173
179
|
'onUpdate:center': import("vue").Prop<import("../utils/vue-utils").EventCallback<LatLng>, import("../utils/vue-utils").EventCallback<LatLng>>;
|
|
174
180
|
'onUpdate:current-center': import("vue").Prop<import("../utils/vue-utils").EventCallback<LatLng>, import("../utils/vue-utils").EventCallback<LatLng>>;
|
|
@@ -2,19 +2,19 @@ import { dimen } from '../utils/formatter';
|
|
|
2
2
|
/** TgMap上的Widget, 只是对绝对布局进行简单的封装 */
|
|
3
3
|
declare const _default: import("vue").DefineComponent<{
|
|
4
4
|
left: {
|
|
5
|
-
type: (
|
|
5
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
6
6
|
default: null;
|
|
7
7
|
};
|
|
8
8
|
top: {
|
|
9
|
-
type: (
|
|
9
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
10
10
|
default: null;
|
|
11
11
|
};
|
|
12
12
|
right: {
|
|
13
|
-
type: (
|
|
13
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
14
14
|
default: null;
|
|
15
15
|
};
|
|
16
16
|
bottom: {
|
|
17
|
-
type: (
|
|
17
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
18
18
|
default: null;
|
|
19
19
|
};
|
|
20
20
|
}, unknown, unknown, {
|
|
@@ -23,19 +23,19 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
23
23
|
dimen: typeof dimen;
|
|
24
24
|
}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
25
25
|
left: {
|
|
26
|
-
type: (
|
|
26
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
27
27
|
default: null;
|
|
28
28
|
};
|
|
29
29
|
top: {
|
|
30
|
-
type: (
|
|
30
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
31
31
|
default: null;
|
|
32
32
|
};
|
|
33
33
|
right: {
|
|
34
|
-
type: (
|
|
34
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
35
35
|
default: null;
|
|
36
36
|
};
|
|
37
37
|
bottom: {
|
|
38
|
-
type: (
|
|
38
|
+
type: (StringConstructor | NumberConstructor)[];
|
|
39
39
|
default: null;
|
|
40
40
|
};
|
|
41
41
|
}>>, {
|
|
@@ -1,13 +1,40 @@
|
|
|
1
1
|
/// <reference types="@/map/dts" />
|
|
2
2
|
import type { App } from 'vue';
|
|
3
|
-
import {
|
|
4
|
-
import MapMixin, { MIXIN_HOOK_DESTROY, MIXIN_HOOK_CREATE, MIXIN_MAP_NAME } from './map-mixin';
|
|
3
|
+
import { getTgMapConfig, setTgMapConfig, type PartialTgMapConfig, type TgMapConfig } from '../map/map-config';
|
|
5
4
|
import LifecycleLogPlugin, { type LifecycleLogOptions } from '../utils/lifecycle-log';
|
|
5
|
+
import MapMixin, { MIXIN_HOOK_CREATE, MIXIN_HOOK_DESTROY, MIXIN_MAP_NAME } from './map-mixin';
|
|
6
6
|
declare const TgMapPlugin: {
|
|
7
7
|
install(app: App, config?: PartialTgMapConfig): void;
|
|
8
8
|
};
|
|
9
9
|
export default TgMapPlugin;
|
|
10
|
-
export
|
|
10
|
+
export { type Tg } from '../map/event';
|
|
11
|
+
export * from '../map/lat-lng';
|
|
12
|
+
export * from '../map/map-factory';
|
|
13
|
+
export * from '../map/map/controls/control';
|
|
14
|
+
export * from '../map/map/controls/map-type.control';
|
|
15
|
+
export * from '../map/map/controls/scale.control';
|
|
16
|
+
export * from '../map/map/controls/zoom.control';
|
|
17
|
+
export * from '../map/map/extra/autocomplete';
|
|
18
|
+
export * from '../map/map/extra/marker-clusterer';
|
|
19
|
+
export * from '../map/map/extra/places-service';
|
|
20
|
+
export * from '../map/map/map';
|
|
21
|
+
export * from '../map/map/overlay/circle';
|
|
22
|
+
export * from '../map/map/overlay/icon';
|
|
23
|
+
export * from '../map/map/overlay/info-box';
|
|
24
|
+
export * from '../map/map/overlay/info-window';
|
|
25
|
+
export * from '../map/map/overlay/marker';
|
|
26
|
+
export * from '../map/map/overlay/overlay';
|
|
27
|
+
export * from '../map/map/overlay/polygon';
|
|
28
|
+
export * from '../map/map/overlay/polyline';
|
|
29
|
+
export * from '../map/types';
|
|
30
|
+
export * from '../utils/arrays';
|
|
31
|
+
export * from '../utils/mapped-types';
|
|
32
|
+
export { Objects } from '../utils/objects';
|
|
33
|
+
export * from '../utils/spherical-utils';
|
|
34
|
+
export * from '../utils/strings';
|
|
35
|
+
export * from '../utils/utils';
|
|
36
|
+
export * from '../utils/values';
|
|
37
|
+
export * from '../utils/vue-utils';
|
|
11
38
|
export { default as TgMap } from './TgMap.vue';
|
|
12
39
|
export { default as TgMapWidget } from './TgMapWidget.vue';
|
|
13
40
|
export { default as TgCustomControl } from './controls/TgCustomControl.vue';
|
|
@@ -16,6 +43,7 @@ export { default as TgScaleControl } from './controls/TgScaleControl.vue';
|
|
|
16
43
|
export { default as TgZoomControl } from './controls/TgZoomControl.vue';
|
|
17
44
|
export { default as TgMarkerClusterer } from './extra/TgMarkerClusterer.vue';
|
|
18
45
|
export { default as TgTrafficLayer } from './layers/TgTrafficLayer.vue';
|
|
46
|
+
export * from './map-hooks';
|
|
19
47
|
export { default as TgCircle } from './overlays/TgCircle.vue';
|
|
20
48
|
export { default as TgElementOverlay } from './overlays/TgElementOverlay.vue';
|
|
21
49
|
export { default as TgInfoBox } from './overlays/TgInfoBox.vue';
|
|
@@ -24,30 +52,4 @@ export { default as TgLabel } from './overlays/TgLabel.vue';
|
|
|
24
52
|
export { default as TgMarker } from './overlays/TgMarker.vue';
|
|
25
53
|
export { default as TgPolygon } from './overlays/TgPolygon.vue';
|
|
26
54
|
export { default as TgPolyline } from './overlays/TgPolyline.vue';
|
|
27
|
-
export * from '../map/lat-lng';
|
|
28
|
-
export * from '../map/map/map';
|
|
29
|
-
export * from '../map/map-factory';
|
|
30
|
-
export * from '../map/types';
|
|
31
|
-
export { type Tg } from '../map/event';
|
|
32
|
-
export * from '../map/map/overlay/icon';
|
|
33
|
-
export * from '../map/map/overlay/marker';
|
|
34
|
-
export * from '../map/map/overlay/circle';
|
|
35
|
-
export * from '../map/map/overlay/polygon';
|
|
36
|
-
export * from '../map/map/overlay/polyline';
|
|
37
|
-
export * from '../map/map/overlay/overlay';
|
|
38
|
-
export * from '../map/map/overlay/info-window';
|
|
39
|
-
export * from '../map/map/overlay/info-box';
|
|
40
|
-
export * from '../map/map/extra/marker-clusterer';
|
|
41
|
-
export * from '../map/map/controls/control';
|
|
42
|
-
export * from '../map/map/controls/map-type.control';
|
|
43
|
-
export * from '../map/map/controls/scale.control';
|
|
44
|
-
export * from '../map/map/controls/zoom.control';
|
|
45
|
-
export * from '../utils/utils';
|
|
46
|
-
export * from '../utils/vue-utils';
|
|
47
|
-
export * from '../utils/mapped-types';
|
|
48
|
-
export * from '../utils/spherical-utils';
|
|
49
|
-
export { Objects } from '../utils/objects';
|
|
50
|
-
export * from '../utils/arrays';
|
|
51
|
-
export * from '../utils/strings';
|
|
52
|
-
export * from '../utils/values';
|
|
53
55
|
export { TgMapConfig, PartialTgMapConfig, getTgMapConfig, setTgMapConfig, LifecycleLogPlugin, LifecycleLogOptions, MapMixin, MIXIN_HOOK_CREATE, MIXIN_HOOK_DESTROY, MIXIN_MAP_NAME, };
|
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
import { type Tg } from './event';
|
|
2
2
|
import { type CoordTypeSupplier } from './lat-lng';
|
|
3
|
-
import type {
|
|
3
|
+
import type { UnionBaiduEventTarget, UnionGoogleEventTarget } from './unions';
|
|
4
|
+
/**
|
|
5
|
+
* 移除事件监听的函数
|
|
6
|
+
*
|
|
7
|
+
* 实现{@link EventTarget}有点复杂, 对于简单的情况, 实现一个设置监听的函数+返回{@link RemoveEventListenerFunction}就够了
|
|
8
|
+
* @see addBaiduEventListener
|
|
9
|
+
* @see addGoogleEventListener
|
|
10
|
+
* */
|
|
11
|
+
export interface RemoveEventListenerFunction {
|
|
12
|
+
(): void;
|
|
13
|
+
}
|
|
14
|
+
export declare function addGoogleEventListener(target: UnionGoogleEventTarget, type: string, listener: (...args: any[]) => void): RemoveEventListenerFunction;
|
|
15
|
+
export declare function addBaiduEventListener(target: UnionBaiduEventTarget, type: string, listener: (...args: any[]) => void): RemoveEventListenerFunction;
|
|
4
16
|
/**
|
|
5
17
|
* ## Delegate(代理) VS Mixin(混合)
|
|
6
18
|
* Delegate相对于Mixin的优点是调用路径更明确, 缺点是js/ts原生不支持, 需要写样板代码
|
|
@@ -1,22 +1,24 @@
|
|
|
1
1
|
import { LatLng, LatLngBounds } from '../lat-lng';
|
|
2
|
-
import {
|
|
3
|
-
import { MapOptions, GestureHandlingOptions, type MapStyle } from './map-options';
|
|
4
|
-
import type { BaiduOverlay } from './overlay/overlay';
|
|
5
|
-
import { BaiduMarkerClusterer, type MarkerClustererOptions } from './extra/marker-clusterer';
|
|
6
|
-
import { BaiduPolyline } from './overlay/polyline';
|
|
7
|
-
import { BaiduPolygon } from './overlay/polygon';
|
|
8
|
-
import { BaiduCircle } from './overlay/circle';
|
|
2
|
+
import type { Padding, Point } from '../types';
|
|
9
3
|
import { CustomControl } from './controls/control';
|
|
10
4
|
import { BaiduMapTypeControl } from './controls/map-type.control';
|
|
11
|
-
import { BaiduZoomControl } from './controls/zoom.control';
|
|
12
5
|
import { BaiduScaleControl } from './controls/scale.control';
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
6
|
+
import { BaiduZoomControl } from './controls/zoom.control';
|
|
7
|
+
import { type Autocomplete, type AutocompleteOptions } from './extra/autocomplete';
|
|
8
|
+
import { BaiduMarkerClusterer, type MarkerClustererOptions } from './extra/marker-clusterer';
|
|
9
|
+
import { type PlaceServiceOptions, type PlacesService } from './extra/places-service';
|
|
10
|
+
import { AbstractMap, type AbstractMapEventMap } from './map';
|
|
11
|
+
import { GestureHandlingOptions, MapOptions, type MapStyle } from './map-options';
|
|
15
12
|
import { BuildInMapTypeId, MapType, type Layer } from './map-type';
|
|
16
|
-
import
|
|
17
|
-
import { BaiduLabelOverlay } from './overlay/label';
|
|
18
|
-
import { BaiduInfoBoxOverlay } from './overlay/info-box';
|
|
13
|
+
import { BaiduCircle } from './overlay/circle';
|
|
19
14
|
import type { ElementOverlay } from './overlay/element-overlay';
|
|
15
|
+
import { BaiduInfoBoxOverlay } from './overlay/info-box';
|
|
16
|
+
import { BaiduInfoWindow } from './overlay/info-window';
|
|
17
|
+
import { BaiduLabelOverlay } from './overlay/label';
|
|
18
|
+
import { BaiduMarker } from './overlay/marker';
|
|
19
|
+
import type { BaiduOverlay } from './overlay/overlay';
|
|
20
|
+
import { BaiduPolygon } from './overlay/polygon';
|
|
21
|
+
import { BaiduPolyline } from './overlay/polyline';
|
|
20
22
|
export declare class BaiduMap extends AbstractMap {
|
|
21
23
|
setDefaultCursor(cursor: string): void;
|
|
22
24
|
private buildInMapTypeId2BIMT;
|
|
@@ -63,4 +65,6 @@ export declare class BaiduMap extends AbstractMap {
|
|
|
63
65
|
createZoomControl: typeof BaiduZoomControl.create;
|
|
64
66
|
createScaleControl: typeof BaiduScaleControl.create;
|
|
65
67
|
createMarkerClusterer(options: MarkerClustererOptions): BaiduMarkerClusterer;
|
|
68
|
+
createAutocomplete(options: AutocompleteOptions): Autocomplete;
|
|
69
|
+
createPlaceService(options: PlaceServiceOptions): PlacesService;
|
|
66
70
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/// <reference types="
|
|
2
|
-
import type { UnionControl } from '../../unions';
|
|
1
|
+
/// <reference types="google.maps" />
|
|
3
2
|
import { KeyValue } from '../../../utils/values';
|
|
4
|
-
import type {
|
|
3
|
+
import type { UnionControl } from '../../unions';
|
|
5
4
|
import type { BaiduMap } from '../baidu-map';
|
|
5
|
+
import type { GoogleMap } from '../google-map';
|
|
6
6
|
import type { AbstractMap } from '../map';
|
|
7
7
|
export declare enum ControlPosition {
|
|
8
8
|
/** 左上 */
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/// <reference types="baidumap-web-sdk" />
|
|
2
|
-
import { BaiduControl, GoogleControl, ControlPosition, AbstractControl } from './control';
|
|
3
2
|
import type { BaiduMap } from '../baidu-map';
|
|
4
3
|
import type { GoogleMap } from '../google-map';
|
|
5
4
|
import { MapType } from '../map-type';
|
|
5
|
+
import { AbstractControl, BaiduControl, ControlPosition, GoogleControl } from './control';
|
|
6
6
|
export interface MapTypeControl extends AbstractControl {
|
|
7
7
|
}
|
|
8
8
|
export declare enum MapTypeControlType {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BaiduControl, GoogleControl, ControlPosition, AbstractControl } from './control';
|
|
2
|
-
import type { GoogleMap } from '../google-map';
|
|
3
1
|
import type { BaiduMap } from '../baidu-map';
|
|
2
|
+
import type { GoogleMap } from '../google-map';
|
|
3
|
+
import { AbstractControl, BaiduControl, ControlPosition, GoogleControl } from './control';
|
|
4
4
|
export interface ScaleControl extends AbstractControl {
|
|
5
5
|
}
|
|
6
6
|
export interface ScaleControlOptions {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="baidumap-web-sdk" />
|
|
2
|
-
import { BaiduControl, GoogleControl, ControlPosition, AbstractControl } from './control';
|
|
3
2
|
import type { BaiduMap } from '../baidu-map';
|
|
4
3
|
import type { GoogleMap } from '../google-map';
|
|
4
|
+
import { AbstractControl, BaiduControl, ControlPosition, GoogleControl } from './control';
|
|
5
5
|
export interface ZoomControl extends AbstractControl {
|
|
6
6
|
}
|
|
7
7
|
export interface ZoomControlOptions {
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/// <reference types="google.maps" />
|
|
2
|
+
import { type EventCallback } from '../../../components';
|
|
3
|
+
import { type AddressFields } from '../../../utils/google-utils';
|
|
4
|
+
import { type RemoveEventListenerFunction } from '../../event-target';
|
|
5
|
+
import type { UnionAutocomplete } from '../../unions';
|
|
6
|
+
import type { BaiduMap } from '../baidu-map';
|
|
7
|
+
import type { GoogleMap } from '../google-map';
|
|
8
|
+
import type { AbstractMap } from '../map';
|
|
9
|
+
export interface AutocompleteResult extends AddressFields {
|
|
10
|
+
/** 名字 */
|
|
11
|
+
title: string;
|
|
12
|
+
}
|
|
13
|
+
export interface AutocompleteOptions {
|
|
14
|
+
input: HTMLInputElement;
|
|
15
|
+
bindToMap?: boolean;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* 该类没有太多事件, 故没有去实现{@link Tg.EventTarget}接口
|
|
19
|
+
*/
|
|
20
|
+
export declare abstract class Autocomplete {
|
|
21
|
+
map: AbstractMap;
|
|
22
|
+
abstract inner: UnionAutocomplete;
|
|
23
|
+
constructor(map: AbstractMap);
|
|
24
|
+
abstract addResultListener(listener: EventCallback<AutocompleteResult>): RemoveEventListenerFunction;
|
|
25
|
+
}
|
|
26
|
+
export declare class GoogleAutocomplete extends Autocomplete {
|
|
27
|
+
inner: google.maps.places.Autocomplete;
|
|
28
|
+
constructor(map: GoogleMap, options: AutocompleteOptions);
|
|
29
|
+
addResultListener(listener: EventCallback<AutocompleteResult>): RemoveEventListenerFunction;
|
|
30
|
+
}
|
|
31
|
+
export declare class BaiduAutocomplete extends Autocomplete {
|
|
32
|
+
inner: BMap.Autocomplete;
|
|
33
|
+
constructor(map: BaiduMap, options: AutocompleteOptions);
|
|
34
|
+
addResultListener(listener: EventCallback<AutocompleteResult>): RemoveEventListenerFunction;
|
|
35
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type { GoogleMap } from '../google-map';
|
|
1
|
+
import type { Point, Size } from '../../types';
|
|
3
2
|
import type { BaiduMap } from '../baidu-map';
|
|
3
|
+
import type { GoogleMap } from '../google-map';
|
|
4
|
+
import type { AbstractMap } from '../map';
|
|
4
5
|
import type { MarkerOverlay } from '../overlay/marker';
|
|
5
|
-
import type { Size, Point } from '../../types';
|
|
6
6
|
export interface MarkerClustererOptions {
|
|
7
7
|
markers?: MarkerOverlay[];
|
|
8
8
|
gridSize?: number;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/// <reference types="google.maps" />
|
|
2
|
+
/// <reference types="baidumap-web-sdk" />
|
|
3
|
+
import { LatLng, LatLngBounds, type AbstractMap } from '../../../components';
|
|
4
|
+
import type { UnionPlacesService } from '../../unions';
|
|
5
|
+
import type { BaiduMap } from '../baidu-map';
|
|
6
|
+
import type { GoogleMap } from '../google-map';
|
|
7
|
+
export interface Place {
|
|
8
|
+
id: string;
|
|
9
|
+
position: LatLng;
|
|
10
|
+
country: string;
|
|
11
|
+
province: string;
|
|
12
|
+
city: string;
|
|
13
|
+
title: string;
|
|
14
|
+
address: string;
|
|
15
|
+
}
|
|
16
|
+
export interface PlaceServiceOptions {
|
|
17
|
+
}
|
|
18
|
+
export declare abstract class PlacesService {
|
|
19
|
+
map: AbstractMap;
|
|
20
|
+
abstract inner: UnionPlacesService;
|
|
21
|
+
constructor(map: AbstractMap);
|
|
22
|
+
abstract search(query: string): Promise<Place[]>;
|
|
23
|
+
abstract searchInBounds(query: string, bounds: LatLngBounds): Promise<Place[]>;
|
|
24
|
+
abstract searchNearBy(query: string, center: LatLng, radius: number): Promise<Place[]>;
|
|
25
|
+
}
|
|
26
|
+
export declare class GooglePlacesService extends PlacesService {
|
|
27
|
+
inner: google.maps.places.PlacesService;
|
|
28
|
+
constructor(map: GoogleMap, options: PlaceServiceOptions);
|
|
29
|
+
search(query: string): Promise<Place[]>;
|
|
30
|
+
searchInBounds(query: string, bounds: LatLngBounds): Promise<Place[]>;
|
|
31
|
+
searchNearBy(query: string, center: LatLng, radius: number): Promise<Place[]>;
|
|
32
|
+
private searchImpl;
|
|
33
|
+
}
|
|
34
|
+
export declare class BaiduPlacesService extends PlacesService {
|
|
35
|
+
private searchRequestMap;
|
|
36
|
+
get inner(): BMap.LocalSearch;
|
|
37
|
+
currentSearch: BMap.LocalSearch | undefined;
|
|
38
|
+
constructor(map: BaiduMap, options: PlaceServiceOptions);
|
|
39
|
+
search(query: string): Promise<Place[]>;
|
|
40
|
+
searchInBounds(query: string, bounds: LatLngBounds): Promise<Place[]>;
|
|
41
|
+
searchNearBy(query: string, center: LatLng, radius: number): Promise<Place[]>;
|
|
42
|
+
private newSearch;
|
|
43
|
+
}
|
|
@@ -1,23 +1,25 @@
|
|
|
1
|
-
/// <reference types="
|
|
1
|
+
/// <reference types="google.maps" />
|
|
2
2
|
import { LatLng, LatLngBounds } from '../lat-lng';
|
|
3
|
-
import {
|
|
4
|
-
import type { MapOptions, GestureHandlingOptions, MapStyle } from './map-options';
|
|
5
|
-
import type { GoogleOverlay } from './overlay/overlay';
|
|
6
|
-
import { type MarkerClustererOptions, GoogleMarkerClusterer } from './extra/marker-clusterer';
|
|
7
|
-
import { GooglePolyline } from './overlay/polyline';
|
|
8
|
-
import { GooglePolygon } from './overlay/polygon';
|
|
9
|
-
import { GoogleCircle } from './overlay/circle';
|
|
3
|
+
import { Point, type Padding } from '../types';
|
|
10
4
|
import { CustomControl } from './controls/control';
|
|
11
5
|
import { GoogleMapTypeControl } from './controls/map-type.control';
|
|
12
|
-
import { GoogleZoomControl } from './controls/zoom.control';
|
|
13
6
|
import { GoogleScaleControl } from './controls/scale.control';
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
7
|
+
import { GoogleZoomControl } from './controls/zoom.control';
|
|
8
|
+
import { Autocomplete, type AutocompleteOptions } from './extra/autocomplete';
|
|
9
|
+
import { GoogleMarkerClusterer, type MarkerClustererOptions } from './extra/marker-clusterer';
|
|
10
|
+
import { type PlaceServiceOptions, type PlacesService } from './extra/places-service';
|
|
11
|
+
import { AbstractMap } from './map';
|
|
12
|
+
import type { GestureHandlingOptions, MapOptions, MapStyle } from './map-options';
|
|
16
13
|
import { BuildInMapTypeId, MapType, type Layer, type OverlayMapType } from './map-type';
|
|
17
|
-
import {
|
|
18
|
-
import { GoogleLabelOverlay } from './overlay/label';
|
|
19
|
-
import { GoogleInfoBoxOverlay } from './overlay/info-box';
|
|
14
|
+
import { GoogleCircle } from './overlay/circle';
|
|
20
15
|
import type { ElementOverlay } from './overlay/element-overlay';
|
|
16
|
+
import { GoogleInfoBoxOverlay } from './overlay/info-box';
|
|
17
|
+
import { GoogleInfoWindow } from './overlay/info-window';
|
|
18
|
+
import { GoogleLabelOverlay } from './overlay/label';
|
|
19
|
+
import { GoogleMarker } from './overlay/marker';
|
|
20
|
+
import type { GoogleOverlay } from './overlay/overlay';
|
|
21
|
+
import { GooglePolygon } from './overlay/polygon';
|
|
22
|
+
import { GooglePolyline } from './overlay/polyline';
|
|
21
23
|
export declare class GoogleMap extends AbstractMap {
|
|
22
24
|
mapOptions: MapOptions;
|
|
23
25
|
setDefaultCursor(cursor: string): void;
|
|
@@ -65,4 +67,6 @@ export declare class GoogleMap extends AbstractMap {
|
|
|
65
67
|
createZoomControl: typeof GoogleZoomControl.create;
|
|
66
68
|
createScaleControl: typeof GoogleScaleControl.create;
|
|
67
69
|
createMarkerClusterer(options: MarkerClustererOptions): GoogleMarkerClusterer;
|
|
70
|
+
createAutocomplete(options: AutocompleteOptions): Autocomplete;
|
|
71
|
+
createPlaceService(options: PlaceServiceOptions): PlacesService;
|
|
68
72
|
}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
/// <reference types="heremaps" />
|
|
2
|
+
import { CoordType, LatLng } from '../lat-lng';
|
|
3
|
+
import type { Autocomplete, AutocompleteOptions } from './extra/autocomplete';
|
|
4
|
+
import type { PlaceServiceOptions, PlacesService } from './extra/places-service';
|
|
2
5
|
import { AbstractMap } from './map';
|
|
3
6
|
import type { MapOptions } from './map-options';
|
|
4
|
-
import { CoordType, LatLng } from '../lat-lng';
|
|
5
7
|
export declare class HereMap extends AbstractMap {
|
|
6
8
|
mapOptions: MapOptions;
|
|
7
9
|
setDefaultCursor(cursor: string): void;
|
|
@@ -46,4 +48,6 @@ export declare class HereMap extends AbstractMap {
|
|
|
46
48
|
createMapTypeControl(options: import('./controls/map-type.control').MapTypeControlOptions): import('./controls/map-type.control').MapTypeControl;
|
|
47
49
|
createZoomControl(options: import('./controls/zoom.control').ZoomControlOptions): import('./controls/zoom.control').ZoomControl;
|
|
48
50
|
createScaleControl(options: import('./controls/scale.control').ScaleControlOptions): import('./controls/zoom.control').ZoomControl;
|
|
51
|
+
createAutocomplete(options: AutocompleteOptions): Autocomplete;
|
|
52
|
+
createPlaceService(options: PlaceServiceOptions): PlacesService;
|
|
49
53
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="baidumap-web-sdk" />
|
|
2
2
|
/// <reference types="baidumap-web-sdk" />
|
|
3
|
-
/// <reference types="
|
|
4
|
-
import type { GoogleLayer } from '../unions';
|
|
5
|
-
import type { Point } from '../types';
|
|
6
|
-
import { CoordType } from '../lat-lng';
|
|
3
|
+
/// <reference types="google.maps" />
|
|
7
4
|
import { FastFindValues } from '../../utils/values';
|
|
5
|
+
import { CoordType } from '../lat-lng';
|
|
6
|
+
import type { Point } from '../types';
|
|
7
|
+
import type { GoogleLayer } from '../unions';
|
|
8
8
|
/**
|
|
9
9
|
* 内置地图的id
|
|
10
10
|
*/
|
|
@@ -1,24 +1,26 @@
|
|
|
1
|
-
import type { CoordType, CoordTypeSupplier, LatLng, LatLngBounds } from '../lat-lng';
|
|
2
|
-
import type { MarkerOverlay, MarkerOptions } from './overlay/marker';
|
|
3
|
-
import type { Overlay } from './overlay/overlay';
|
|
4
|
-
import type { UnionMap } from '../unions';
|
|
5
|
-
import type { MarkerClustererOptions, MarkerClusterer } from './extra/marker-clusterer';
|
|
6
|
-
import type { InfoWindowOverlay, InfoWindowOptions } from './overlay/info-window';
|
|
7
|
-
import type { PolylineOptions, PolylineOverlay } from './overlay/polyline';
|
|
8
|
-
import type { PolygonOptions, PolygonOverlay } from './overlay/polygon';
|
|
9
|
-
import type { CircleOptions, CircleOverlay } from './overlay/circle';
|
|
10
1
|
import type { Tg } from '../event';
|
|
11
2
|
import type { AbstractEventTargetDelegate } from '../event-target';
|
|
12
|
-
import type {
|
|
13
|
-
import type {
|
|
14
|
-
import type {
|
|
3
|
+
import type { CoordType, CoordTypeSupplier, LatLng, LatLngBounds } from '../lat-lng';
|
|
4
|
+
import type { Padding, Point } from '../types';
|
|
5
|
+
import type { UnionMap } from '../unions';
|
|
6
|
+
import type { AbstractControl, CustomControl } from './controls/control';
|
|
7
|
+
import type { MapTypeControl, MapTypeControlOptions } from './controls/map-type.control';
|
|
15
8
|
import type { ScaleControlOptions } from './controls/scale.control';
|
|
9
|
+
import type { ZoomControl, ZoomControlOptions } from './controls/zoom.control';
|
|
10
|
+
import type { Autocomplete, AutocompleteOptions } from './extra/autocomplete';
|
|
11
|
+
import type { MarkerClusterer, MarkerClustererOptions } from './extra/marker-clusterer';
|
|
12
|
+
import type { PlaceServiceOptions, PlacesService } from './extra/places-service';
|
|
16
13
|
import type { GestureHandlingOptions, MapStyle } from './map-options';
|
|
17
|
-
import type { BuildInMapTypeId,
|
|
18
|
-
import type {
|
|
19
|
-
import type { LabelOptions, LabelOverlay } from './overlay/label';
|
|
20
|
-
import type { InfoBoxOptions, InfoBoxOverlay } from './overlay/info-box';
|
|
14
|
+
import type { BuildInMapTypeId, Layer, MapType, OverlayMapType } from './map-type';
|
|
15
|
+
import type { CircleOptions, CircleOverlay } from './overlay/circle';
|
|
21
16
|
import type { ElementOverlay } from './overlay/element-overlay';
|
|
17
|
+
import type { InfoBoxOptions, InfoBoxOverlay } from './overlay/info-box';
|
|
18
|
+
import type { InfoWindowOptions, InfoWindowOverlay } from './overlay/info-window';
|
|
19
|
+
import type { LabelOptions, LabelOverlay } from './overlay/label';
|
|
20
|
+
import type { MarkerOptions, MarkerOverlay } from './overlay/marker';
|
|
21
|
+
import type { Overlay } from './overlay/overlay';
|
|
22
|
+
import type { PolygonOptions, PolygonOverlay } from './overlay/polygon';
|
|
23
|
+
import type { PolylineOptions, PolylineOverlay } from './overlay/polyline';
|
|
22
24
|
export type AbstractMapEventMap = {
|
|
23
25
|
click: Tg.MouseEvent;
|
|
24
26
|
dblclick: Tg.MouseEvent;
|
|
@@ -106,6 +108,8 @@ export declare abstract class AbstractMap implements CoordTypeSupplier, Tg.Event
|
|
|
106
108
|
abstract removeOverlay(overlay: Overlay): void;
|
|
107
109
|
abstract createMarker(options: MarkerOptions): MarkerOverlay;
|
|
108
110
|
abstract createMarkerClusterer(options: MarkerClustererOptions): MarkerClusterer;
|
|
111
|
+
abstract createAutocomplete(options: AutocompleteOptions): Autocomplete;
|
|
112
|
+
abstract createPlaceService(options: PlaceServiceOptions): PlacesService;
|
|
109
113
|
abstract createInfoWindow(options: InfoWindowOptions): InfoWindowOverlay;
|
|
110
114
|
abstract createInfoBox(options: InfoBoxOptions): InfoBoxOverlay;
|
|
111
115
|
abstract createPolyline(options: PolylineOptions): PolylineOverlay;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="baidumap-web-sdk" />
|
|
2
2
|
import { Point } from '../../types';
|
|
3
|
-
import type { BMarker } from './marker';
|
|
4
3
|
import './baidu-info-box.scss';
|
|
4
|
+
import type { BMarker } from './marker';
|
|
5
5
|
export type BaiduInfoBox = InstanceType<ReturnType<typeof createBaiduInfoBoxClass>>;
|
|
6
6
|
export declare function createBaiduInfoBox(content: HTMLElement, position?: BMap.Point, offset?: Point, zIndex?: number, maxWidth?: number, borderClass?: string): {
|
|
7
7
|
container: HTMLElement;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/// <reference types="baidumap-web-sdk" />
|
|
2
|
-
/// <reference types="
|
|
2
|
+
/// <reference types="google.maps" />
|
|
3
3
|
import type { Tg } from '../../event';
|
|
4
|
-
import type { Overlay } from './overlay';
|
|
5
|
-
import { type Shape, type ShapeOptions, BaiduShape, GoogleShape } from './shape';
|
|
6
4
|
import { LatLng } from '../../lat-lng';
|
|
7
5
|
import type { BaiduMap } from '../baidu-map';
|
|
8
6
|
import type { GoogleMap } from '../google-map';
|
|
7
|
+
import type { Overlay } from './overlay';
|
|
8
|
+
import { BaiduShape, GoogleShape, type Shape, type ShapeOptions } from './shape';
|
|
9
9
|
type CircleEventMap = {
|
|
10
10
|
click: Tg.Event;
|
|
11
11
|
dblclick: Tg.Event;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/// <reference types="
|
|
1
|
+
/// <reference types="google.maps" />
|
|
2
2
|
import { LatLng } from '../../lat-lng';
|
|
3
|
-
import
|
|
3
|
+
import { Point } from '../../types';
|
|
4
4
|
import type { AbstractMap } from '../map';
|
|
5
5
|
import './element-overlay.scss';
|
|
6
6
|
export declare enum MapPane {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/// <reference types="
|
|
1
|
+
/// <reference types="google.maps" />
|
|
2
|
+
import { type Nullable } from '../../../components';
|
|
2
3
|
import type { Point } from '../../types';
|
|
3
|
-
import type { Nullable } from '../../../components';
|
|
4
4
|
export type GoogleLabel = InstanceType<ReturnType<typeof createGoogleLabelClass>>;
|
|
5
5
|
export declare function createGoogleLabel(element: HTMLElement, position: Nullable<google.maps.LatLng>, offset?: Point, zIndex?: number): {
|
|
6
6
|
container: HTMLElement;
|
|
@@ -21,17 +21,16 @@ export declare function createGoogleLabel(element: HTMLElement, position: Nullab
|
|
|
21
21
|
getOffset(): Point | undefined;
|
|
22
22
|
getVisible(): boolean;
|
|
23
23
|
setVisible(visible: boolean): void;
|
|
24
|
-
getMap(): google.maps.Map | google.maps.StreetViewPanorama;
|
|
25
|
-
getPanes(): google.maps.MapPanes;
|
|
24
|
+
getMap(): google.maps.Map | google.maps.StreetViewPanorama | null;
|
|
25
|
+
getPanes(): google.maps.MapPanes | null;
|
|
26
26
|
getProjection(): google.maps.MapCanvasProjection;
|
|
27
27
|
setMap(map: google.maps.Map | google.maps.StreetViewPanorama | null): void;
|
|
28
|
-
addListener(eventName: string, handler:
|
|
29
|
-
bindTo(key: string, target: google.maps.MVCObject, targetKey?: string | undefined, noNotify?: boolean | undefined): void;
|
|
30
|
-
changed(key: string): void;
|
|
28
|
+
addListener(eventName: string, handler: Function): google.maps.MapsEventListener;
|
|
29
|
+
bindTo(key: string, target: google.maps.MVCObject, targetKey?: string | null | undefined, noNotify?: boolean | undefined): void;
|
|
31
30
|
get(key: string): any;
|
|
32
31
|
notify(key: string): void;
|
|
33
32
|
set(key: string, value: any): void;
|
|
34
|
-
setValues(values
|
|
33
|
+
setValues(values?: object | null | undefined): void;
|
|
35
34
|
unbind(key: string): void;
|
|
36
35
|
unbindAll(): void;
|
|
37
36
|
};
|
|
@@ -56,19 +55,20 @@ declare function createGoogleLabelClass(): {
|
|
|
56
55
|
getOffset(): Point | undefined;
|
|
57
56
|
getVisible(): boolean;
|
|
58
57
|
setVisible(visible: boolean): void;
|
|
59
|
-
getMap(): google.maps.Map | google.maps.StreetViewPanorama;
|
|
60
|
-
getPanes(): google.maps.MapPanes;
|
|
58
|
+
getMap(): google.maps.Map | google.maps.StreetViewPanorama | null;
|
|
59
|
+
getPanes(): google.maps.MapPanes | null;
|
|
61
60
|
getProjection(): google.maps.MapCanvasProjection;
|
|
62
61
|
setMap(map: google.maps.Map | google.maps.StreetViewPanorama | null): void;
|
|
63
|
-
addListener(eventName: string, handler:
|
|
64
|
-
bindTo(key: string, target: google.maps.MVCObject, targetKey?: string | undefined, noNotify?: boolean | undefined): void;
|
|
65
|
-
changed(key: string): void;
|
|
62
|
+
addListener(eventName: string, handler: Function): google.maps.MapsEventListener;
|
|
63
|
+
bindTo(key: string, target: google.maps.MVCObject, targetKey?: string | null | undefined, noNotify?: boolean | undefined): void;
|
|
66
64
|
get(key: string): any;
|
|
67
65
|
notify(key: string): void;
|
|
68
66
|
set(key: string, value: any): void;
|
|
69
|
-
setValues(values
|
|
67
|
+
setValues(values?: object | null | undefined): void;
|
|
70
68
|
unbind(key: string): void;
|
|
71
69
|
unbindAll(): void;
|
|
72
70
|
};
|
|
71
|
+
preventMapHitsAndGesturesFrom(this: any, element: Element): void;
|
|
72
|
+
preventMapHitsFrom(this: any, element: Element): void;
|
|
73
73
|
};
|
|
74
74
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/// <reference types="
|
|
1
|
+
/// <reference types="google.maps" />
|
|
2
2
|
/// <reference types="baidumap-web-sdk" />
|
|
3
|
-
import type {
|
|
3
|
+
import type { Point, Size } from '../../types';
|
|
4
4
|
/** 字面量形式, 使用起来会简单点, 目前没看出使用class形式的必要🤔 */
|
|
5
5
|
export interface Icon {
|
|
6
6
|
readonly url: string;
|