@baidumap/vue-bmap 1.0.0 → 1.0.2
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/components/Control/CustomControl.d.ts +45 -0
- package/dist/components/Control/RawControl.d.ts +40 -0
- package/dist/components/Control/index.d.ts +4 -1
- package/dist/components/Layer/BaiduLayer.d.ts +11 -0
- package/dist/components/Layer/DOMLayer.d.ts +154 -0
- package/dist/components/Layer/FeatureLayer.d.ts +129 -0
- package/dist/components/Layer/FillLayer.d.ts +359 -0
- package/dist/components/Layer/LineLayer.d.ts +440 -0
- package/dist/components/Layer/PanoramaCoverageLayer.d.ts +4 -0
- package/dist/components/Layer/PixelLayer.d.ts +11 -0
- package/dist/components/Layer/PointIconLayer.d.ts +263 -0
- package/dist/components/Layer/PointShapeLayer.d.ts +193 -0
- package/dist/components/Layer/ThreeLayer.d.ts +238 -0
- package/dist/components/Layer/TrafficLayer.d.ts +77 -0
- package/dist/components/Layer/index.d.ts +22 -7
- package/dist/components/Map/Map.d.ts +18 -0
- package/dist/components/Map/index.d.ts +1 -1
- package/dist/components/Menu/index.d.ts +54 -0
- package/dist/components/Overlay/CustomOverlay.d.ts +215 -0
- package/dist/components/Overlay/MapMask.d.ts +73 -0
- package/dist/components/Overlay/PlaceDetail.d.ts +59 -0
- package/dist/components/Overlay/PlaceDetailPanel.d.ts +74 -0
- package/dist/components/Overlay/RawOverlay.d.ts +40 -0
- package/dist/components/Overlay/SimpleInfoWindow.d.ts +162 -0
- package/dist/components/Overlay/index.d.ts +11 -0
- package/dist/components/Panorama/PanoramaRef.d.ts +75 -0
- package/dist/components/Panorama/index.d.ts +306 -0
- package/dist/composables/index.d.ts +32 -0
- package/dist/composables/renderHelpers.d.ts +12 -0
- package/dist/composables/useAutocomplete.d.ts +37 -0
- package/dist/composables/useBoundary.d.ts +14 -0
- package/dist/composables/useBusLineSearch.d.ts +35 -0
- package/dist/composables/useConvertor.d.ts +13 -0
- package/dist/composables/useDrivingRoute.d.ts +64 -0
- package/dist/composables/useGeolocation.d.ts +16 -0
- package/dist/composables/useLocalCity.d.ts +12 -0
- package/dist/composables/useLocalSearch.d.ts +92 -0
- package/dist/composables/useMapStatus.d.ts +12 -0
- package/dist/composables/usePanoramaService.d.ts +16 -0
- package/dist/composables/usePlaceDetail.d.ts +19 -0
- package/dist/composables/useRawControl.d.ts +3 -0
- package/dist/composables/useRawOverlay.d.ts +3 -0
- package/dist/composables/useRenderMap.d.ts +4 -0
- package/dist/composables/useRidingRoute.d.ts +7 -0
- package/dist/composables/useTransitRoute.d.ts +16 -0
- package/dist/composables/useTruckRoute.d.ts +7 -0
- package/dist/composables/useWalkingRoute.d.ts +7 -0
- package/dist/index.cjs +1 -2
- package/dist/index.d.ts +13 -9
- package/dist/index.js +5751 -2402
- package/package.json +7 -2
- package/dist/index.cjs.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/types-skd.d.ts +0 -21
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
|
|
3
|
+
export interface PointShapeStyle {
|
|
4
|
+
visibility?: boolean;
|
|
5
|
+
shapeType?: number;
|
|
6
|
+
anchor?: number;
|
|
7
|
+
size?: number;
|
|
8
|
+
scale?: number;
|
|
9
|
+
rotation?: number;
|
|
10
|
+
offset?: [number, number];
|
|
11
|
+
color?: string;
|
|
12
|
+
opacity?: number;
|
|
13
|
+
strokeColor?: string;
|
|
14
|
+
strokeWeight?: number;
|
|
15
|
+
}
|
|
16
|
+
export interface PointShapeLayerOptions {
|
|
17
|
+
isFlat?: boolean;
|
|
18
|
+
style?: PointShapeStyle;
|
|
19
|
+
idKey?: string;
|
|
20
|
+
crs?: string;
|
|
21
|
+
selectedIndex?: number;
|
|
22
|
+
selectedColor?: string;
|
|
23
|
+
visible?: boolean;
|
|
24
|
+
opacity?: number;
|
|
25
|
+
minZoom?: number;
|
|
26
|
+
maxZoom?: number;
|
|
27
|
+
zIndex?: number;
|
|
28
|
+
enablePicked?: boolean;
|
|
29
|
+
autoSelect?: boolean;
|
|
30
|
+
popEvent?: boolean;
|
|
31
|
+
pickWidth?: number;
|
|
32
|
+
pickHeight?: number;
|
|
33
|
+
}
|
|
34
|
+
export interface PointShapeLayerProps extends PointShapeLayerOptions {
|
|
35
|
+
data?: object;
|
|
36
|
+
}
|
|
37
|
+
export declare const PointShapeLayer: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
38
|
+
isFlat: {
|
|
39
|
+
type: BooleanConstructor;
|
|
40
|
+
default: any;
|
|
41
|
+
};
|
|
42
|
+
style: {
|
|
43
|
+
type: PropType<PointShapeStyle>;
|
|
44
|
+
default: any;
|
|
45
|
+
};
|
|
46
|
+
idKey: {
|
|
47
|
+
type: StringConstructor;
|
|
48
|
+
default: any;
|
|
49
|
+
};
|
|
50
|
+
crs: {
|
|
51
|
+
type: StringConstructor;
|
|
52
|
+
default: any;
|
|
53
|
+
};
|
|
54
|
+
selectedIndex: {
|
|
55
|
+
type: NumberConstructor;
|
|
56
|
+
default: any;
|
|
57
|
+
};
|
|
58
|
+
selectedColor: {
|
|
59
|
+
type: StringConstructor;
|
|
60
|
+
default: any;
|
|
61
|
+
};
|
|
62
|
+
visible: {
|
|
63
|
+
type: BooleanConstructor;
|
|
64
|
+
default: any;
|
|
65
|
+
};
|
|
66
|
+
opacity: {
|
|
67
|
+
type: NumberConstructor;
|
|
68
|
+
default: any;
|
|
69
|
+
};
|
|
70
|
+
minZoom: {
|
|
71
|
+
type: NumberConstructor;
|
|
72
|
+
default: any;
|
|
73
|
+
};
|
|
74
|
+
maxZoom: {
|
|
75
|
+
type: NumberConstructor;
|
|
76
|
+
default: any;
|
|
77
|
+
};
|
|
78
|
+
zIndex: {
|
|
79
|
+
type: NumberConstructor;
|
|
80
|
+
default: any;
|
|
81
|
+
};
|
|
82
|
+
enablePicked: {
|
|
83
|
+
type: BooleanConstructor;
|
|
84
|
+
default: any;
|
|
85
|
+
};
|
|
86
|
+
autoSelect: {
|
|
87
|
+
type: BooleanConstructor;
|
|
88
|
+
default: any;
|
|
89
|
+
};
|
|
90
|
+
popEvent: {
|
|
91
|
+
type: BooleanConstructor;
|
|
92
|
+
default: any;
|
|
93
|
+
};
|
|
94
|
+
pickWidth: {
|
|
95
|
+
type: NumberConstructor;
|
|
96
|
+
default: any;
|
|
97
|
+
};
|
|
98
|
+
pickHeight: {
|
|
99
|
+
type: NumberConstructor;
|
|
100
|
+
default: any;
|
|
101
|
+
};
|
|
102
|
+
data: {
|
|
103
|
+
type: PropType<object>;
|
|
104
|
+
default: any;
|
|
105
|
+
};
|
|
106
|
+
}>, () => any, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
107
|
+
isFlat: {
|
|
108
|
+
type: BooleanConstructor;
|
|
109
|
+
default: any;
|
|
110
|
+
};
|
|
111
|
+
style: {
|
|
112
|
+
type: PropType<PointShapeStyle>;
|
|
113
|
+
default: any;
|
|
114
|
+
};
|
|
115
|
+
idKey: {
|
|
116
|
+
type: StringConstructor;
|
|
117
|
+
default: any;
|
|
118
|
+
};
|
|
119
|
+
crs: {
|
|
120
|
+
type: StringConstructor;
|
|
121
|
+
default: any;
|
|
122
|
+
};
|
|
123
|
+
selectedIndex: {
|
|
124
|
+
type: NumberConstructor;
|
|
125
|
+
default: any;
|
|
126
|
+
};
|
|
127
|
+
selectedColor: {
|
|
128
|
+
type: StringConstructor;
|
|
129
|
+
default: any;
|
|
130
|
+
};
|
|
131
|
+
visible: {
|
|
132
|
+
type: BooleanConstructor;
|
|
133
|
+
default: any;
|
|
134
|
+
};
|
|
135
|
+
opacity: {
|
|
136
|
+
type: NumberConstructor;
|
|
137
|
+
default: any;
|
|
138
|
+
};
|
|
139
|
+
minZoom: {
|
|
140
|
+
type: NumberConstructor;
|
|
141
|
+
default: any;
|
|
142
|
+
};
|
|
143
|
+
maxZoom: {
|
|
144
|
+
type: NumberConstructor;
|
|
145
|
+
default: any;
|
|
146
|
+
};
|
|
147
|
+
zIndex: {
|
|
148
|
+
type: NumberConstructor;
|
|
149
|
+
default: any;
|
|
150
|
+
};
|
|
151
|
+
enablePicked: {
|
|
152
|
+
type: BooleanConstructor;
|
|
153
|
+
default: any;
|
|
154
|
+
};
|
|
155
|
+
autoSelect: {
|
|
156
|
+
type: BooleanConstructor;
|
|
157
|
+
default: any;
|
|
158
|
+
};
|
|
159
|
+
popEvent: {
|
|
160
|
+
type: BooleanConstructor;
|
|
161
|
+
default: any;
|
|
162
|
+
};
|
|
163
|
+
pickWidth: {
|
|
164
|
+
type: NumberConstructor;
|
|
165
|
+
default: any;
|
|
166
|
+
};
|
|
167
|
+
pickHeight: {
|
|
168
|
+
type: NumberConstructor;
|
|
169
|
+
default: any;
|
|
170
|
+
};
|
|
171
|
+
data: {
|
|
172
|
+
type: PropType<object>;
|
|
173
|
+
default: any;
|
|
174
|
+
};
|
|
175
|
+
}>> & Readonly<{}>, {
|
|
176
|
+
visible: boolean;
|
|
177
|
+
opacity: number;
|
|
178
|
+
zIndex: number;
|
|
179
|
+
data: object;
|
|
180
|
+
style: PointShapeStyle;
|
|
181
|
+
minZoom: number;
|
|
182
|
+
maxZoom: number;
|
|
183
|
+
idKey: string;
|
|
184
|
+
crs: string;
|
|
185
|
+
selectedIndex: number;
|
|
186
|
+
selectedColor: string;
|
|
187
|
+
enablePicked: boolean;
|
|
188
|
+
autoSelect: boolean;
|
|
189
|
+
isFlat: boolean;
|
|
190
|
+
popEvent: boolean;
|
|
191
|
+
pickWidth: number;
|
|
192
|
+
pickHeight: number;
|
|
193
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
import { Point } from '../../types';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* three.js 的对象(Scene / Camera / WebGLRenderer / Object3D 等)。
|
|
6
|
+
* 本库不依赖 three,也不想把 three 的类型塞进公共 API,交由宿主自行断言。
|
|
7
|
+
*/
|
|
8
|
+
export type ThreeObject = any;
|
|
9
|
+
/** SDK ThreeLayer 实例上实际存在的成员(取自 v4 bundle) */
|
|
10
|
+
export interface ThreeLayerInstance {
|
|
11
|
+
scene?: ThreeObject;
|
|
12
|
+
camera?: ThreeObject;
|
|
13
|
+
renderer?: ThreeObject;
|
|
14
|
+
map?: ThreeObject;
|
|
15
|
+
add(object: ThreeObject): void;
|
|
16
|
+
remove(object: ThreeObject): void;
|
|
17
|
+
getScene(): ThreeObject;
|
|
18
|
+
getCamera(): ThreeObject;
|
|
19
|
+
getRender(): ThreeObject;
|
|
20
|
+
getMap(): ThreeObject | null;
|
|
21
|
+
triggerRepaint(): void;
|
|
22
|
+
triggerStop(): void;
|
|
23
|
+
refreshMap(): void;
|
|
24
|
+
pick(x: number, y: number): ThreeObject[] | null;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* 生命周期回调。
|
|
28
|
+
*
|
|
29
|
+
* SDK 用 `hook.bind(this)(renderer, scene, camera)` 调用,所以普通函数里的 `this` 是 SDK 图层实例;
|
|
30
|
+
* 第 4 个参数 `layer` 是组件对外的命令式句柄(与 ref 拿到的是同一个对象),箭头函数用它。
|
|
31
|
+
*/
|
|
32
|
+
export type ThreeLayerHook = (this: ThreeLayerInstance, renderer: ThreeObject, scene: ThreeObject, camera: ThreeObject, layer: ThreeLayerRef) => void;
|
|
33
|
+
/** 命令式句柄。图层实例要等 GL 就绪才有,所以句柄本身始终存在,成员在就绪前为 null / no-op。 */
|
|
34
|
+
export interface ThreeLayerRef {
|
|
35
|
+
/** SDK 图层实例;GL 就绪(onInit 触发)前为 null */
|
|
36
|
+
readonly raw: ThreeLayerInstance | null;
|
|
37
|
+
readonly scene: ThreeObject | null;
|
|
38
|
+
readonly camera: ThreeObject | null;
|
|
39
|
+
readonly renderer: ThreeObject | null;
|
|
40
|
+
add(object: ThreeObject): void;
|
|
41
|
+
remove(object: ThreeObject): void;
|
|
42
|
+
triggerRepaint(): void;
|
|
43
|
+
triggerStop(): void;
|
|
44
|
+
refreshMap(): void;
|
|
45
|
+
pick(x: number, y: number): ThreeObject[] | null;
|
|
46
|
+
/**
|
|
47
|
+
* 经纬度 → three.js 世界坐标(相对固定墨卡托基准点的偏移,单位约等于米)。
|
|
48
|
+
*
|
|
49
|
+
* 走 map.toFormatCoords,而不是实例上的 convertLngLat —— 后者在 v4 里是坏的:
|
|
50
|
+
* 它把 `map.toFormatCoords`(一个函数)当成带 setCenter 的对象用,一调就 TypeError。
|
|
51
|
+
*/
|
|
52
|
+
toWorld(point: Point): [number, number] | null;
|
|
53
|
+
}
|
|
54
|
+
export interface ThreeLayerOptions {
|
|
55
|
+
/** 传给 THREE.WebGLRenderer 的 alpha,默认 false。变化会重建图层。 */
|
|
56
|
+
alpha?: boolean;
|
|
57
|
+
/** 传给 THREE.WebGLRenderer 的 antialias,默认 false。变化会重建图层。 */
|
|
58
|
+
antialias?: boolean;
|
|
59
|
+
/** 是否显示,默认 true */
|
|
60
|
+
visible?: boolean;
|
|
61
|
+
/** 最小显示级别,默认 3 */
|
|
62
|
+
minZoom?: number;
|
|
63
|
+
/** 最大显示级别,默认 21 */
|
|
64
|
+
maxZoom?: number;
|
|
65
|
+
/** 层级,默认 1 */
|
|
66
|
+
zIndex?: number;
|
|
67
|
+
/**
|
|
68
|
+
* 参考中心点。只会写到实例的 this.center,而 v4 的 ThreeLayer.render 取的矩阵
|
|
69
|
+
* (_updatePolyLayerMatrix)并不带它 —— 世界坐标只能相对默认墨卡托基准点,
|
|
70
|
+
* 传了反而对不上,一般不用给。
|
|
71
|
+
*/
|
|
72
|
+
referCenter?: Point;
|
|
73
|
+
/**
|
|
74
|
+
* @deprecated 对 ThreeLayer 无效。NormalLayer 构造函数会存 this.opacity、也提供
|
|
75
|
+
* setOpacity/getOpacity,但 ThreeLayer.render 只做 renderer.render(scene, camera),
|
|
76
|
+
* 整块原型里从不读它。three.js 的透明度请设在材质上
|
|
77
|
+
* (material.transparent = true 且 material.opacity = x)。
|
|
78
|
+
*/
|
|
79
|
+
opacity?: number;
|
|
80
|
+
}
|
|
81
|
+
export interface ThreeLayerProps extends ThreeLayerOptions {
|
|
82
|
+
/** GL 就绪、场景/相机/渲染器创建完成后调用,在这里往场景里加物体 */
|
|
83
|
+
onInit?: ThreeLayerHook;
|
|
84
|
+
/**
|
|
85
|
+
* 接管渲染。SDK 里这是 if/else:接了它就**不再**调用默认的
|
|
86
|
+
* renderer.render(scene, camera),必须自己渲染。变化会重建图层。
|
|
87
|
+
*/
|
|
88
|
+
onRender?: ThreeLayerHook;
|
|
89
|
+
/** 每帧渲染前 */
|
|
90
|
+
preRender?: ThreeLayerHook;
|
|
91
|
+
/** 每帧渲染后 */
|
|
92
|
+
afterRender?: ThreeLayerHook;
|
|
93
|
+
/** 图层销毁前。SDK 随后会 dispose 场景与渲染器,场景里的物体不需要自己清 */
|
|
94
|
+
onDestroy?: ThreeLayerHook;
|
|
95
|
+
/** 因 visible / 缩放级别超出 [minZoom, maxZoom] 而隐藏时 */
|
|
96
|
+
onHide?: ThreeLayerHook;
|
|
97
|
+
/** 从隐藏恢复显示时 */
|
|
98
|
+
onShow?: ThreeLayerHook;
|
|
99
|
+
}
|
|
100
|
+
export declare const ThreeLayer: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
101
|
+
alpha: {
|
|
102
|
+
type: BooleanConstructor;
|
|
103
|
+
default: any;
|
|
104
|
+
};
|
|
105
|
+
antialias: {
|
|
106
|
+
type: BooleanConstructor;
|
|
107
|
+
default: any;
|
|
108
|
+
};
|
|
109
|
+
visible: {
|
|
110
|
+
type: BooleanConstructor;
|
|
111
|
+
default: any;
|
|
112
|
+
};
|
|
113
|
+
minZoom: {
|
|
114
|
+
type: NumberConstructor;
|
|
115
|
+
default: any;
|
|
116
|
+
};
|
|
117
|
+
maxZoom: {
|
|
118
|
+
type: NumberConstructor;
|
|
119
|
+
default: any;
|
|
120
|
+
};
|
|
121
|
+
zIndex: {
|
|
122
|
+
type: NumberConstructor;
|
|
123
|
+
default: any;
|
|
124
|
+
};
|
|
125
|
+
referCenter: {
|
|
126
|
+
type: PropType<Point>;
|
|
127
|
+
default: any;
|
|
128
|
+
};
|
|
129
|
+
opacity: {
|
|
130
|
+
type: NumberConstructor;
|
|
131
|
+
default: any;
|
|
132
|
+
};
|
|
133
|
+
onInit: {
|
|
134
|
+
type: PropType<ThreeLayerHook>;
|
|
135
|
+
default: any;
|
|
136
|
+
};
|
|
137
|
+
onRender: {
|
|
138
|
+
type: PropType<ThreeLayerHook>;
|
|
139
|
+
default: any;
|
|
140
|
+
};
|
|
141
|
+
preRender: {
|
|
142
|
+
type: PropType<ThreeLayerHook>;
|
|
143
|
+
default: any;
|
|
144
|
+
};
|
|
145
|
+
afterRender: {
|
|
146
|
+
type: PropType<ThreeLayerHook>;
|
|
147
|
+
default: any;
|
|
148
|
+
};
|
|
149
|
+
onDestroy: {
|
|
150
|
+
type: PropType<ThreeLayerHook>;
|
|
151
|
+
default: any;
|
|
152
|
+
};
|
|
153
|
+
onHide: {
|
|
154
|
+
type: PropType<ThreeLayerHook>;
|
|
155
|
+
default: any;
|
|
156
|
+
};
|
|
157
|
+
onShow: {
|
|
158
|
+
type: PropType<ThreeLayerHook>;
|
|
159
|
+
default: any;
|
|
160
|
+
};
|
|
161
|
+
}>, () => any, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
162
|
+
alpha: {
|
|
163
|
+
type: BooleanConstructor;
|
|
164
|
+
default: any;
|
|
165
|
+
};
|
|
166
|
+
antialias: {
|
|
167
|
+
type: BooleanConstructor;
|
|
168
|
+
default: any;
|
|
169
|
+
};
|
|
170
|
+
visible: {
|
|
171
|
+
type: BooleanConstructor;
|
|
172
|
+
default: any;
|
|
173
|
+
};
|
|
174
|
+
minZoom: {
|
|
175
|
+
type: NumberConstructor;
|
|
176
|
+
default: any;
|
|
177
|
+
};
|
|
178
|
+
maxZoom: {
|
|
179
|
+
type: NumberConstructor;
|
|
180
|
+
default: any;
|
|
181
|
+
};
|
|
182
|
+
zIndex: {
|
|
183
|
+
type: NumberConstructor;
|
|
184
|
+
default: any;
|
|
185
|
+
};
|
|
186
|
+
referCenter: {
|
|
187
|
+
type: PropType<Point>;
|
|
188
|
+
default: any;
|
|
189
|
+
};
|
|
190
|
+
opacity: {
|
|
191
|
+
type: NumberConstructor;
|
|
192
|
+
default: any;
|
|
193
|
+
};
|
|
194
|
+
onInit: {
|
|
195
|
+
type: PropType<ThreeLayerHook>;
|
|
196
|
+
default: any;
|
|
197
|
+
};
|
|
198
|
+
onRender: {
|
|
199
|
+
type: PropType<ThreeLayerHook>;
|
|
200
|
+
default: any;
|
|
201
|
+
};
|
|
202
|
+
preRender: {
|
|
203
|
+
type: PropType<ThreeLayerHook>;
|
|
204
|
+
default: any;
|
|
205
|
+
};
|
|
206
|
+
afterRender: {
|
|
207
|
+
type: PropType<ThreeLayerHook>;
|
|
208
|
+
default: any;
|
|
209
|
+
};
|
|
210
|
+
onDestroy: {
|
|
211
|
+
type: PropType<ThreeLayerHook>;
|
|
212
|
+
default: any;
|
|
213
|
+
};
|
|
214
|
+
onHide: {
|
|
215
|
+
type: PropType<ThreeLayerHook>;
|
|
216
|
+
default: any;
|
|
217
|
+
};
|
|
218
|
+
onShow: {
|
|
219
|
+
type: PropType<ThreeLayerHook>;
|
|
220
|
+
default: any;
|
|
221
|
+
};
|
|
222
|
+
}>> & Readonly<{}>, {
|
|
223
|
+
visible: boolean;
|
|
224
|
+
opacity: number;
|
|
225
|
+
zIndex: number;
|
|
226
|
+
minZoom: number;
|
|
227
|
+
maxZoom: number;
|
|
228
|
+
onRender: ThreeLayerHook;
|
|
229
|
+
referCenter: Point;
|
|
230
|
+
onInit: ThreeLayerHook;
|
|
231
|
+
preRender: ThreeLayerHook;
|
|
232
|
+
afterRender: ThreeLayerHook;
|
|
233
|
+
onDestroy: ThreeLayerHook;
|
|
234
|
+
onHide: ThreeLayerHook;
|
|
235
|
+
onShow: ThreeLayerHook;
|
|
236
|
+
alpha: boolean;
|
|
237
|
+
antialias: boolean;
|
|
238
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
|
|
3
|
+
export interface TrafficLayerOptions {
|
|
4
|
+
/** v4: 是否自动刷新路况数据 */
|
|
5
|
+
autoRefresh?: boolean;
|
|
6
|
+
/** v4: 路况自动刷新间隔,单位毫秒 */
|
|
7
|
+
refreshInterval?: number;
|
|
8
|
+
/** v3: 预测日期 */
|
|
9
|
+
predictDate?: {
|
|
10
|
+
weekday: number;
|
|
11
|
+
hour: number;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export interface TrafficLayerProps extends TrafficLayerOptions {
|
|
15
|
+
/** v4+: 路况颜色 [畅通, 缓行, 拥堵, 严重拥堵],变化时调用 raw.setColors() */
|
|
16
|
+
colors?: string[];
|
|
17
|
+
/** v4+: 是否显示白边,变化时调用 raw.setEdge() */
|
|
18
|
+
edge?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export declare const TrafficLayer: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
21
|
+
autoRefresh: {
|
|
22
|
+
type: BooleanConstructor;
|
|
23
|
+
default: any;
|
|
24
|
+
};
|
|
25
|
+
refreshInterval: {
|
|
26
|
+
type: NumberConstructor;
|
|
27
|
+
default: any;
|
|
28
|
+
};
|
|
29
|
+
predictDate: {
|
|
30
|
+
type: PropType<{
|
|
31
|
+
weekday: number;
|
|
32
|
+
hour: number;
|
|
33
|
+
}>;
|
|
34
|
+
default: any;
|
|
35
|
+
};
|
|
36
|
+
colors: {
|
|
37
|
+
type: PropType<string[]>;
|
|
38
|
+
default: any;
|
|
39
|
+
};
|
|
40
|
+
edge: {
|
|
41
|
+
type: BooleanConstructor;
|
|
42
|
+
default: any;
|
|
43
|
+
};
|
|
44
|
+
}>, () => any, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
45
|
+
autoRefresh: {
|
|
46
|
+
type: BooleanConstructor;
|
|
47
|
+
default: any;
|
|
48
|
+
};
|
|
49
|
+
refreshInterval: {
|
|
50
|
+
type: NumberConstructor;
|
|
51
|
+
default: any;
|
|
52
|
+
};
|
|
53
|
+
predictDate: {
|
|
54
|
+
type: PropType<{
|
|
55
|
+
weekday: number;
|
|
56
|
+
hour: number;
|
|
57
|
+
}>;
|
|
58
|
+
default: any;
|
|
59
|
+
};
|
|
60
|
+
colors: {
|
|
61
|
+
type: PropType<string[]>;
|
|
62
|
+
default: any;
|
|
63
|
+
};
|
|
64
|
+
edge: {
|
|
65
|
+
type: BooleanConstructor;
|
|
66
|
+
default: any;
|
|
67
|
+
};
|
|
68
|
+
}>> & Readonly<{}>, {
|
|
69
|
+
colors: string[];
|
|
70
|
+
edge: boolean;
|
|
71
|
+
predictDate: {
|
|
72
|
+
weekday: number;
|
|
73
|
+
hour: number;
|
|
74
|
+
};
|
|
75
|
+
autoRefresh: boolean;
|
|
76
|
+
refreshInterval: number;
|
|
77
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
@@ -63,16 +63,12 @@ export interface CanvasLayerOptions {
|
|
|
63
63
|
paneName?: string;
|
|
64
64
|
update?: Function;
|
|
65
65
|
}
|
|
66
|
-
export interface TrafficLayerOptions {
|
|
67
|
-
predictDate?: unknown;
|
|
68
|
-
}
|
|
69
66
|
export type TileLayerProps = TileLayerOptions;
|
|
70
67
|
export type NormalLayerProps = NormalLayerOptions;
|
|
71
68
|
export type GeoJSONLayerProps = GeoJSONLayerOptions;
|
|
72
69
|
export type DistrictLayerProps = DistrictLayerOptions;
|
|
73
70
|
export type CustomLayerProps = CustomLayerOptions;
|
|
74
71
|
export type CanvasLayerProps = CanvasLayerOptions;
|
|
75
|
-
export type TrafficLayerProps = TrafficLayerOptions;
|
|
76
72
|
export declare const TileLayer: import('vue').DefineComponent<{}, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
77
73
|
[key: string]: any;
|
|
78
74
|
}>[], {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
@@ -91,9 +87,8 @@ export declare const CustomLayer: import('vue').DefineComponent<{}, () => import
|
|
|
91
87
|
export declare const CanvasLayer: import('vue').DefineComponent<{}, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
92
88
|
[key: string]: any;
|
|
93
89
|
}>[], {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
94
|
-
export
|
|
95
|
-
|
|
96
|
-
}>[], {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
90
|
+
export { TrafficLayer } from './TrafficLayer';
|
|
91
|
+
export type { TrafficLayerOptions, TrafficLayerProps } from './TrafficLayer';
|
|
97
92
|
export interface RasterTileLayerOptions {
|
|
98
93
|
url: string | ((x: number, y: number, z: number) => string);
|
|
99
94
|
[k: string]: unknown;
|
|
@@ -136,3 +131,23 @@ export declare const XYZLayer: import('vue').DefineComponent<{}, () => import('v
|
|
|
136
131
|
export declare const MVTLayer: import('vue').DefineComponent<{}, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
137
132
|
[key: string]: any;
|
|
138
133
|
}>[], {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
134
|
+
export { PixelLayer } from './PixelLayer';
|
|
135
|
+
export type { PixelLayerOptions, PixelLayerProps } from './PixelLayer';
|
|
136
|
+
export { BaiduLayer } from './BaiduLayer';
|
|
137
|
+
export type { BaiduLayerOptions, BaiduLayerProps } from './BaiduLayer';
|
|
138
|
+
export { PanoramaCoverageLayer } from './PanoramaCoverageLayer';
|
|
139
|
+
export type { PanoramaCoverageLayerProps } from './PanoramaCoverageLayer';
|
|
140
|
+
export { FeatureLayer } from './FeatureLayer';
|
|
141
|
+
export type { FeatureLayerOptions, FeatureLayerProps } from './FeatureLayer';
|
|
142
|
+
export { DOMLayer } from './DOMLayer';
|
|
143
|
+
export type { DOMLayerOptions, DOMLayerProps } from './DOMLayer';
|
|
144
|
+
export { PointShapeLayer } from './PointShapeLayer';
|
|
145
|
+
export type { PointShapeStyle, PointShapeLayerOptions, PointShapeLayerProps } from './PointShapeLayer';
|
|
146
|
+
export { PointIconLayer } from './PointIconLayer';
|
|
147
|
+
export type { PointIconLayerEvent, PointIconStyle, PointIconLayerOptions, PointIconLayerProps } from './PointIconLayer';
|
|
148
|
+
export { FillLayer } from './FillLayer';
|
|
149
|
+
export type { FillStyleExpr, FillLayerStyle, FillLayerOptions, FillLayerEvent, FillLayerProps } from './FillLayer';
|
|
150
|
+
export { LineLayer } from './LineLayer';
|
|
151
|
+
export type { LineStyleExpr, LineLayerStyle, LineLayerOptions, LineLayerEvent, LineLayerProps } from './LineLayer';
|
|
152
|
+
export { ThreeLayer } from './ThreeLayer';
|
|
153
|
+
export type { ThreeObject, ThreeLayerInstance, ThreeLayerHook, ThreeLayerRef, ThreeLayerOptions, ThreeLayerProps } from './ThreeLayer';
|
|
@@ -2,6 +2,15 @@ import { PropType } from 'vue';
|
|
|
2
2
|
import { MapHandle, Point, Bounds } from '../../types';
|
|
3
3
|
import { DisplayOptions } from '../../types/core';
|
|
4
4
|
|
|
5
|
+
/** 个性化生效区域配置(setCustomArea,4.0+,3.0 不支持)。 */
|
|
6
|
+
export interface MapCustomArea {
|
|
7
|
+
/** 生效区域边界点(普通经纬度 { lng, lat },组件内部转成原生 Point) */
|
|
8
|
+
area: Point[];
|
|
9
|
+
/** 区域内个性化样式,形如 { styleJson: [...] } */
|
|
10
|
+
style: unknown;
|
|
11
|
+
/** 生效前的全局个性化调用参数,默认 { styleJson: [] }(setCustomArea 依赖全局个性化管线已初始化) */
|
|
12
|
+
globalStyle?: unknown;
|
|
13
|
+
}
|
|
5
14
|
export declare const Map: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
6
15
|
center: {
|
|
7
16
|
type: PropType<Point>;
|
|
@@ -49,6 +58,10 @@ export declare const Map: import('vue').DefineComponent<import('vue').ExtractPro
|
|
|
49
58
|
mapStyleV2: {
|
|
50
59
|
default: any;
|
|
51
60
|
};
|
|
61
|
+
customArea: {
|
|
62
|
+
type: PropType<false | MapCustomArea>;
|
|
63
|
+
default: any;
|
|
64
|
+
};
|
|
52
65
|
minZoom: {
|
|
53
66
|
type: NumberConstructor;
|
|
54
67
|
default: any;
|
|
@@ -198,6 +211,10 @@ export declare const Map: import('vue').DefineComponent<import('vue').ExtractPro
|
|
|
198
211
|
mapStyleV2: {
|
|
199
212
|
default: any;
|
|
200
213
|
};
|
|
214
|
+
customArea: {
|
|
215
|
+
type: PropType<false | MapCustomArea>;
|
|
216
|
+
default: any;
|
|
217
|
+
};
|
|
201
218
|
minZoom: {
|
|
202
219
|
type: NumberConstructor;
|
|
203
220
|
default: any;
|
|
@@ -331,6 +348,7 @@ export declare const Map: import('vue').DefineComponent<import('vue').ExtractPro
|
|
|
331
348
|
displayOptions: DisplayOptions;
|
|
332
349
|
mapStyle: unknown;
|
|
333
350
|
mapStyleV2: unknown;
|
|
351
|
+
customArea: false | MapCustomArea;
|
|
334
352
|
defaultCursor: string;
|
|
335
353
|
theme: string;
|
|
336
354
|
onReady: (map: MapHandle) => void;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { PropType } from 'vue';
|
|
2
|
+
|
|
3
|
+
export interface ContextMenuProps {
|
|
4
|
+
}
|
|
5
|
+
export declare const ContextMenu: import('vue').DefineComponent<{}, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
6
|
+
[key: string]: any;
|
|
7
|
+
}>[], {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
8
|
+
export interface MenuItemProps {
|
|
9
|
+
text: string;
|
|
10
|
+
callback?: (point?: {
|
|
11
|
+
lng: number;
|
|
12
|
+
lat: number;
|
|
13
|
+
}) => void;
|
|
14
|
+
iconWidth?: number;
|
|
15
|
+
}
|
|
16
|
+
export declare const MenuItem: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
17
|
+
text: {
|
|
18
|
+
type: StringConstructor;
|
|
19
|
+
required: true;
|
|
20
|
+
};
|
|
21
|
+
callback: {
|
|
22
|
+
type: PropType<(point?: {
|
|
23
|
+
lng: number;
|
|
24
|
+
lat: number;
|
|
25
|
+
}) => void>;
|
|
26
|
+
default: any;
|
|
27
|
+
};
|
|
28
|
+
iconWidth: {
|
|
29
|
+
type: NumberConstructor;
|
|
30
|
+
default: any;
|
|
31
|
+
};
|
|
32
|
+
}>, () => any, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
33
|
+
text: {
|
|
34
|
+
type: StringConstructor;
|
|
35
|
+
required: true;
|
|
36
|
+
};
|
|
37
|
+
callback: {
|
|
38
|
+
type: PropType<(point?: {
|
|
39
|
+
lng: number;
|
|
40
|
+
lat: number;
|
|
41
|
+
}) => void>;
|
|
42
|
+
default: any;
|
|
43
|
+
};
|
|
44
|
+
iconWidth: {
|
|
45
|
+
type: NumberConstructor;
|
|
46
|
+
default: any;
|
|
47
|
+
};
|
|
48
|
+
}>> & Readonly<{}>, {
|
|
49
|
+
callback: (point?: {
|
|
50
|
+
lng: number;
|
|
51
|
+
lat: number;
|
|
52
|
+
}) => void;
|
|
53
|
+
iconWidth: number;
|
|
54
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|