vue-baidu-map-api-v3 1.0.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/LICENSE +21 -0
- package/README.md +95 -0
- package/README.zh.md +97 -0
- package/components/base/bindEvent.js +11 -0
- package/components/base/events.js +120 -0
- package/components/base/factory.js +63 -0
- package/components/base/mixins/abstract.js +13 -0
- package/components/base/mixins/common.js +81 -0
- package/components/base/util.js +6 -0
- package/components/context-menu/Item.vue +62 -0
- package/components/context-menu/Menu.vue +52 -0
- package/components/controls/CityList.vue +43 -0
- package/components/controls/Control.vue +37 -0
- package/components/controls/Copyright.vue +52 -0
- package/components/controls/Geolocation.vue +59 -0
- package/components/controls/MapType.vue +39 -0
- package/components/controls/Navigation.vue +55 -0
- package/components/controls/OverviewMap.vue +56 -0
- package/components/controls/Panorama.vue +29 -0
- package/components/controls/Scale.vue +36 -0
- package/components/extra/CurveLine.vue +101 -0
- package/components/extra/Heatmap.vue +78 -0
- package/components/extra/Lushu.vue +125 -0
- package/components/extra/MarkerClusterer.vue +93 -0
- package/components/index.js +98 -0
- package/components/layers/Tile.vue +53 -0
- package/components/layers/Traffic.vue +34 -0
- package/components/map/Map.vue +302 -0
- package/components/map/MapView.vue +9 -0
- package/components/others/AutoComplete.vue +70 -0
- package/components/others/Boundary.vue +60 -0
- package/components/overlays/Circle.vue +170 -0
- package/components/overlays/Ground.vue +65 -0
- package/components/overlays/Icon.vue +0 -0
- package/components/overlays/InfoWindow.vue +137 -0
- package/components/overlays/Label.vue +99 -0
- package/components/overlays/Marker.vue +163 -0
- package/components/overlays/Overlay.vue +55 -0
- package/components/overlays/PointCollection.vue +76 -0
- package/components/overlays/Polygon.vue +105 -0
- package/components/overlays/Polyline.vue +107 -0
- package/components/overlays/Symblo.vue +0 -0
- package/components/search/Bus.vue +102 -0
- package/components/search/Driving.vue +177 -0
- package/components/search/LocalSearch.vue +152 -0
- package/components/search/Transit.vue +126 -0
- package/components/search/Walking.vue +115 -0
- package/index.js +1 -0
- package/package.json +104 -0
- package/types/auto-complete.d.ts +22 -0
- package/types/base/base-control.d.ts +14 -0
- package/types/base/common.d.ts +171 -0
- package/types/base/component.d.ts +5 -0
- package/types/boundary.d.ts +41 -0
- package/types/bus.d.ts +28 -0
- package/types/circle.d.ts +47 -0
- package/types/city-list.d.ts +3 -0
- package/types/control.d.ts +3 -0
- package/types/copyright.d.ts +7 -0
- package/types/curve-line.d.ts +37 -0
- package/types/driving.d.ts +48 -0
- package/types/geolocation.d.ts +18 -0
- package/types/ground.d.ts +25 -0
- package/types/heatmap.d.ts +29 -0
- package/types/index.d.ts +93 -0
- package/types/info-window.d.ts +52 -0
- package/types/item.d.ts +26 -0
- package/types/label.d.ts +36 -0
- package/types/local-search.d.ts +63 -0
- package/types/lushu.d.ts +54 -0
- package/types/map-type.d.ts +13 -0
- package/types/map-view.d.ts +4 -0
- package/types/map.d.ts +88 -0
- package/types/marker-clusterer.d.ts +26 -0
- package/types/marker.d.ts +79 -0
- package/types/menu.d.ts +8 -0
- package/types/navigation.d.ts +18 -0
- package/types/overlay.d.ts +17 -0
- package/types/overview-map.d.ts +14 -0
- package/types/panorama.d.ts +3 -0
- package/types/point-collection.d.ts +27 -0
- package/types/polygon.d.ts +47 -0
- package/types/polyline.d.ts +43 -0
- package/types/scale.d.ts +3 -0
- package/types/tile.d.ts +22 -0
- package/types/traffic.d.ts +9 -0
- package/types/transit.d.ts +40 -0
- package/types/tsconfig.json +17 -0
- package/types/walking.d.ts +36 -0
package/types/bus.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { BaiduMapComponent } from './base/component'
|
|
2
|
+
import { Point } from './base/common'
|
|
3
|
+
|
|
4
|
+
export declare class Bus extends BaiduMapComponent {
|
|
5
|
+
/**
|
|
6
|
+
* location表示检索区域,其类型可为空、坐标点或城市名称的字符串。当参数为空时,
|
|
7
|
+
* 检索位置由当前地图中心点确定,且搜索结果的标注将自动加载到地图上,并支持调整地图视野层级;
|
|
8
|
+
* 当参数为坐标时,检索位置由该点所在位置确定;当参数为城市名称时,检索会在该城市内进行。
|
|
9
|
+
*/
|
|
10
|
+
location: string | Point
|
|
11
|
+
/**
|
|
12
|
+
* 公交路线关键词
|
|
13
|
+
*/
|
|
14
|
+
keyword: string
|
|
15
|
+
/**
|
|
16
|
+
* 是否选展现检索结果面板。
|
|
17
|
+
* @default true
|
|
18
|
+
*/
|
|
19
|
+
panel: boolean
|
|
20
|
+
/**
|
|
21
|
+
* 检索结束后是否自动调整地图视野。
|
|
22
|
+
*/
|
|
23
|
+
autoViewport: boolean
|
|
24
|
+
/**
|
|
25
|
+
* 是否选择第一个检索结果。
|
|
26
|
+
*/
|
|
27
|
+
selectFirstResult: boolean
|
|
28
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { BaiduMapComponent } from './base/component'
|
|
2
|
+
import { Point } from './base/common'
|
|
3
|
+
|
|
4
|
+
export declare class Circle extends BaiduMapComponent {
|
|
5
|
+
center: Point
|
|
6
|
+
/**
|
|
7
|
+
* 设置圆形的半径,单位为米
|
|
8
|
+
*/
|
|
9
|
+
radius: number
|
|
10
|
+
/**
|
|
11
|
+
* 设置线颜色,参数为合法的CSS颜色值
|
|
12
|
+
*/
|
|
13
|
+
strokeColor: string
|
|
14
|
+
/**
|
|
15
|
+
* 设置线的宽度,取值为大于等于1的整数
|
|
16
|
+
*/
|
|
17
|
+
strokeWeight: number
|
|
18
|
+
/**
|
|
19
|
+
* 设置线透明度,取值范围0 - 1
|
|
20
|
+
*/
|
|
21
|
+
strokeOpacity: number
|
|
22
|
+
/**
|
|
23
|
+
* @default 'solid'
|
|
24
|
+
*/
|
|
25
|
+
strokeStyle: 'solid' | 'dashed'
|
|
26
|
+
/**
|
|
27
|
+
* 设置圆的填充颜色,参数为合法的CSS颜色值。
|
|
28
|
+
* 当参数为空字符串时,圆覆盖物将没有填充效果
|
|
29
|
+
*/
|
|
30
|
+
fillColor: string
|
|
31
|
+
/**
|
|
32
|
+
* 设置圆的填充透明度,取值范围0 - 1
|
|
33
|
+
*/
|
|
34
|
+
fillOpacity: number
|
|
35
|
+
/**
|
|
36
|
+
* @default true
|
|
37
|
+
*/
|
|
38
|
+
massClear: boolean
|
|
39
|
+
/**
|
|
40
|
+
* @default true
|
|
41
|
+
*/
|
|
42
|
+
clicking: boolean
|
|
43
|
+
/**
|
|
44
|
+
* @default false
|
|
45
|
+
*/
|
|
46
|
+
editing: boolean
|
|
47
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { BaiduMapComponent } from './base/component'
|
|
2
|
+
import { Point } from './base/common'
|
|
3
|
+
|
|
4
|
+
export declare class CurveLine extends BaiduMapComponent {
|
|
5
|
+
/**
|
|
6
|
+
* 构成弧线的关键点
|
|
7
|
+
*/
|
|
8
|
+
points: Point[]
|
|
9
|
+
/**
|
|
10
|
+
* 设置折线颜色,参数为合法的CSS颜色值
|
|
11
|
+
*/
|
|
12
|
+
strokeColor: string
|
|
13
|
+
/**
|
|
14
|
+
* 设置折线的宽度,取值为大于等于1的整数
|
|
15
|
+
*/
|
|
16
|
+
strokeWeight: number
|
|
17
|
+
/**
|
|
18
|
+
* 设置折线透明度,取值范围0 - 1
|
|
19
|
+
*/
|
|
20
|
+
strokeOpacity: number
|
|
21
|
+
/**
|
|
22
|
+
* @default 'solid'
|
|
23
|
+
*/
|
|
24
|
+
strokeStyle: 'solid' | 'dashed'
|
|
25
|
+
/**
|
|
26
|
+
* @default true
|
|
27
|
+
*/
|
|
28
|
+
massClear: boolean
|
|
29
|
+
/**
|
|
30
|
+
* @default true
|
|
31
|
+
*/
|
|
32
|
+
clicking: boolean
|
|
33
|
+
/**
|
|
34
|
+
* @default false
|
|
35
|
+
*/
|
|
36
|
+
editing: boolean
|
|
37
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { BaiduMapComponent } from './base/component'
|
|
2
|
+
import { Point, LocalResultPoi, DrivingPolicy } from './base/common'
|
|
3
|
+
|
|
4
|
+
export declare class Driving extends BaiduMapComponent {
|
|
5
|
+
/**
|
|
6
|
+
* location表示检索区域,其类型可为空、坐标点或城市名称的字符串。当参数为空时,
|
|
7
|
+
* 检索位置由当前地图中心点确定,且搜索结果的标注将自动加载到地图上,并支持调整地图视野层级;
|
|
8
|
+
* 当参数为坐标时,检索位置由该点所在位置确定;当参数为城市名称时,检索会在该城市内进行。
|
|
9
|
+
*/
|
|
10
|
+
location: string | Point
|
|
11
|
+
/**
|
|
12
|
+
* 起点,参数可以是关键字、坐标点(自1.1版本支持)或者LocalSearchPoi实例。
|
|
13
|
+
*/
|
|
14
|
+
start: string | Point | LocalResultPoi
|
|
15
|
+
/**
|
|
16
|
+
* 终点,参数可以是关键字、坐标点(自1.1版本支持)或者LocalSearchPoi实例。
|
|
17
|
+
*/
|
|
18
|
+
end: string | Point | LocalResultPoi
|
|
19
|
+
/**
|
|
20
|
+
* 起点城市,可以是城市名或者城市编码。作为地方性重复地名的辅助选项,须与 endCity 属性同时使用,否则检索结果以 location 属性为准。
|
|
21
|
+
*/
|
|
22
|
+
startCity: string | number
|
|
23
|
+
/**
|
|
24
|
+
* 终点城市,可以是城市名或者城市编码。作为地方性重复地名的辅助选项,须与 startCity 属性同时使用,否则检索结果以 location 属性为准。
|
|
25
|
+
*/
|
|
26
|
+
endCity: string | number
|
|
27
|
+
/**
|
|
28
|
+
* 途经点集合,最多支持10个途经点,可以是名称也可以是坐标。
|
|
29
|
+
*/
|
|
30
|
+
waypoints: Point[]
|
|
31
|
+
/**
|
|
32
|
+
* 公交导航的策略参数
|
|
33
|
+
*/
|
|
34
|
+
policy: DrivingPolicy
|
|
35
|
+
/**
|
|
36
|
+
* 是否选展现检索结果面板。
|
|
37
|
+
* @default true
|
|
38
|
+
*/
|
|
39
|
+
panel: boolean
|
|
40
|
+
/**
|
|
41
|
+
* 检索结束后是否自动调整地图视野。
|
|
42
|
+
*/
|
|
43
|
+
autoViewport: boolean
|
|
44
|
+
/**
|
|
45
|
+
* 是否选择第一个检索结果。
|
|
46
|
+
*/
|
|
47
|
+
selectFirstResult: boolean
|
|
48
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { ControlAnchor, Size, Icon } from './base/common'
|
|
2
|
+
import { BaseControl } from './base/base-control'
|
|
3
|
+
|
|
4
|
+
export declare class Geolocation extends BaseControl {
|
|
5
|
+
/**
|
|
6
|
+
* 是否显示定位信息面板。默认显示定位信息面板
|
|
7
|
+
*/
|
|
8
|
+
showAddressBar: boolean
|
|
9
|
+
/**
|
|
10
|
+
* 添加控件时是否进行定位。默认添加控件时不进行定位
|
|
11
|
+
* @default false
|
|
12
|
+
*/
|
|
13
|
+
autoLocation: boolean
|
|
14
|
+
/**
|
|
15
|
+
* 可自定义定位中心点的Icon样式
|
|
16
|
+
*/
|
|
17
|
+
locationIcon: Icon
|
|
18
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { BaiduMapComponent } from './base/component'
|
|
2
|
+
import { Bounds } from './base/common'
|
|
3
|
+
|
|
4
|
+
export declare class Ground extends BaiduMapComponent {
|
|
5
|
+
/**
|
|
6
|
+
* 设置图层显示的矩形区域
|
|
7
|
+
*/
|
|
8
|
+
bounds: Bounds
|
|
9
|
+
/**
|
|
10
|
+
* 设置图层的透明度
|
|
11
|
+
*/
|
|
12
|
+
opacity: number
|
|
13
|
+
/**
|
|
14
|
+
* 图层地址
|
|
15
|
+
*/
|
|
16
|
+
imageURL: string
|
|
17
|
+
/**
|
|
18
|
+
* 设置图层显示的最小级别
|
|
19
|
+
*/
|
|
20
|
+
displayOnMinLevel: number
|
|
21
|
+
/**
|
|
22
|
+
* 设置图层显示的最大级别
|
|
23
|
+
*/
|
|
24
|
+
displayOnMaxLevel: number
|
|
25
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
|
|
2
|
+
interface HeatmapData {
|
|
3
|
+
lng: number
|
|
4
|
+
lat: number
|
|
5
|
+
count: number
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export declare class Heatmap {
|
|
9
|
+
/**
|
|
10
|
+
* 设置热力图的点坐标和权重值的集合
|
|
11
|
+
*/
|
|
12
|
+
data: HeatmapData[]
|
|
13
|
+
/**
|
|
14
|
+
* 权重最大值
|
|
15
|
+
*/
|
|
16
|
+
max: number
|
|
17
|
+
/**
|
|
18
|
+
* 热力图半径
|
|
19
|
+
*/
|
|
20
|
+
radius: number
|
|
21
|
+
/**
|
|
22
|
+
* 热力图渐变区间,如: {5:'rgb(0, 110, 255)',.8:'rgb(100, 0, 255)'},其中 key 表示插值的位置,取值范围 0 ~ 1,value 为颜色值。
|
|
23
|
+
*/
|
|
24
|
+
gradient: object
|
|
25
|
+
/**
|
|
26
|
+
* 热力图透明度
|
|
27
|
+
*/
|
|
28
|
+
opacity: number
|
|
29
|
+
}
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import * as Vue from 'vue'
|
|
2
|
+
|
|
3
|
+
import { Map } from './map'
|
|
4
|
+
import { MapView } from './map-view'
|
|
5
|
+
import { Scale } from './scale'
|
|
6
|
+
import { Navigation } from './navigation'
|
|
7
|
+
import { MapType } from './map-type'
|
|
8
|
+
import { OverviewMap } from './overview-map'
|
|
9
|
+
import { Geolocation } from './geolocation'
|
|
10
|
+
import { Copyright } from './copyright'
|
|
11
|
+
import { CityList } from './city-list'
|
|
12
|
+
import { Panorama } from './panorama'
|
|
13
|
+
import { Control } from './control'
|
|
14
|
+
import { Marker } from './marker'
|
|
15
|
+
import { PointCollection } from './point-collection'
|
|
16
|
+
import { Polyline } from './polyline'
|
|
17
|
+
import { Polygon } from './polygon'
|
|
18
|
+
import { Circle } from './circle'
|
|
19
|
+
import { Ground } from './ground'
|
|
20
|
+
import { Label } from './label'
|
|
21
|
+
import { InfoWindow } from './info-window'
|
|
22
|
+
import { Overlay } from './overlay'
|
|
23
|
+
import { Menu } from './menu'
|
|
24
|
+
import { Item } from './item'
|
|
25
|
+
import { LocalSearch } from './local-search'
|
|
26
|
+
import { Transit } from './transit'
|
|
27
|
+
import { Walking } from './walking'
|
|
28
|
+
import { Driving } from './driving'
|
|
29
|
+
import { Bus } from './bus'
|
|
30
|
+
import { Tile } from './tile'
|
|
31
|
+
import { Traffic } from './traffic'
|
|
32
|
+
import { Boundary } from './boundary'
|
|
33
|
+
import { AutoComplete } from './auto-complete'
|
|
34
|
+
import { MarkerClusterer } from './marker-clusterer'
|
|
35
|
+
import { Heatmap } from './heatmap'
|
|
36
|
+
import { Lushu } from './lushu'
|
|
37
|
+
import { CurveLine } from './curve-line'
|
|
38
|
+
|
|
39
|
+
export interface InstallationOptions {
|
|
40
|
+
/**
|
|
41
|
+
* Baidu map developer platform application key.
|
|
42
|
+
* Visit http://lbsyun.baidu.com/apiconsole/key for details
|
|
43
|
+
*/
|
|
44
|
+
ak: string
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Install all vue-baidu-map components into Vue.
|
|
49
|
+
* Please do not invoke this method directly.
|
|
50
|
+
* Call `Vue.use(BaiduMap)` to install.
|
|
51
|
+
*/
|
|
52
|
+
declare function install (vue: typeof Vue, options: InstallationOptions): void
|
|
53
|
+
|
|
54
|
+
declare const _default: {
|
|
55
|
+
install: typeof install
|
|
56
|
+
}
|
|
57
|
+
export default _default
|
|
58
|
+
|
|
59
|
+
export class BaiduMap extends Map {}
|
|
60
|
+
export class BmView extends MapView {}
|
|
61
|
+
export class BmScale extends Scale {}
|
|
62
|
+
export class BmNavigation extends Navigation {}
|
|
63
|
+
export class BmMapType extends MapType {}
|
|
64
|
+
export class BmOverviewMap extends OverviewMap {}
|
|
65
|
+
export class BmGeolocation extends Geolocation {}
|
|
66
|
+
export class BmCopyright extends Copyright {}
|
|
67
|
+
export class BmCityList extends CityList {}
|
|
68
|
+
export class BmPanorama extends Panorama {}
|
|
69
|
+
export class BmControl extends Control {}
|
|
70
|
+
export class BmMarker extends Marker {}
|
|
71
|
+
export class BmPointCollection extends PointCollection {}
|
|
72
|
+
export class BmPolyline extends Polyline {}
|
|
73
|
+
export class BmPolygon extends Polygon {}
|
|
74
|
+
export class BmCircle extends Circle {}
|
|
75
|
+
export class BmGround extends Ground {}
|
|
76
|
+
export class BmLabel extends Label {}
|
|
77
|
+
export class BmInfoWindow extends InfoWindow {}
|
|
78
|
+
export class BmOverlay extends Overlay {}
|
|
79
|
+
export class BmContextMenu extends Menu {}
|
|
80
|
+
export class BmContextMenuItem extends Item {}
|
|
81
|
+
export class BmLocalSearch extends LocalSearch {}
|
|
82
|
+
export class BmTransit extends Transit {}
|
|
83
|
+
export class BmWalking extends Walking {}
|
|
84
|
+
export class BmDriving extends Driving {}
|
|
85
|
+
export class BmBus extends Bus {}
|
|
86
|
+
export class BmTile extends Tile {}
|
|
87
|
+
export class BmTraffic extends Traffic {}
|
|
88
|
+
export class BmBoundary extends Boundary {}
|
|
89
|
+
export class BmAutoComplete extends AutoComplete {}
|
|
90
|
+
export class BmlMarkerClusterer extends MarkerClusterer {}
|
|
91
|
+
export class BmlLushu extends Lushu {}
|
|
92
|
+
export class BmlHeatmap extends Heatmap {}
|
|
93
|
+
export class BmlCurveLine extends CurveLine {}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { BaiduMapComponent } from './base/component'
|
|
2
|
+
import { Point, Size } from './base/common'
|
|
3
|
+
|
|
4
|
+
export declare class InfoWindow extends BaiduMapComponent {
|
|
5
|
+
/**
|
|
6
|
+
* @default false
|
|
7
|
+
*/
|
|
8
|
+
show: boolean
|
|
9
|
+
position: Point
|
|
10
|
+
/**
|
|
11
|
+
* 信息窗标题文字,支持HTML内容
|
|
12
|
+
*/
|
|
13
|
+
title: string
|
|
14
|
+
/**
|
|
15
|
+
* 信息窗宽度,单位像素。取值范围:0, 220 - 730。如果您指定宽度为0,则信息窗口的宽度将按照其内容自动调整
|
|
16
|
+
*/
|
|
17
|
+
width: number
|
|
18
|
+
/**
|
|
19
|
+
* 信息窗高度,单位像素。取值范围:0, 60 - 650。如果您指定高度为0,则信息窗口的高度将按照其内容自动调整
|
|
20
|
+
*/
|
|
21
|
+
height: number
|
|
22
|
+
/**
|
|
23
|
+
* 信息窗最大化时的宽度,单位像素。取值范围:220 - 730
|
|
24
|
+
*/
|
|
25
|
+
maxWidth: number
|
|
26
|
+
/**
|
|
27
|
+
* 信息窗位置偏移值。默认情况下在地图上打开的信息窗底端的尖角将指向其地理坐标,
|
|
28
|
+
* 在标注上打开的信息窗底端尖角的位置取决于标注所用图标的infoWindowOffset属性值,您可以为信息窗添加偏移量来改变默认位置
|
|
29
|
+
*/
|
|
30
|
+
offset: Size
|
|
31
|
+
/**
|
|
32
|
+
* 启用窗口最大化功能。需要设置最大化后信息窗口里的内容,该接口才生效
|
|
33
|
+
* @default false
|
|
34
|
+
*/
|
|
35
|
+
maximize: boolean
|
|
36
|
+
/**
|
|
37
|
+
* 是否开启信息窗口打开时地图自动移动(默认开启)
|
|
38
|
+
* @default true
|
|
39
|
+
*/
|
|
40
|
+
autoPan: boolean
|
|
41
|
+
/**
|
|
42
|
+
* 是否开启点击地图关闭信息窗口(默认开启)
|
|
43
|
+
* @default true
|
|
44
|
+
*/
|
|
45
|
+
closeOnClick: boolean
|
|
46
|
+
/**
|
|
47
|
+
* 自定义部分的短信内容,可选项。
|
|
48
|
+
* 完整的短信内容包括:自定义部分+位置链接,不设置时,显示默认短信内容。
|
|
49
|
+
* 短信内容最长为140个字
|
|
50
|
+
*/
|
|
51
|
+
message: string
|
|
52
|
+
}
|
package/types/item.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { BaiduMapComponent } from './base/component'
|
|
2
|
+
|
|
3
|
+
export declare class Item extends BaiduMapComponent {
|
|
4
|
+
/**
|
|
5
|
+
* 点击菜单时执行的回调函数,第一个参数为 {BMap, map, target, pixel, point}
|
|
6
|
+
*/
|
|
7
|
+
callback (params: any): Function
|
|
8
|
+
/**
|
|
9
|
+
* 指定此菜单项的文本
|
|
10
|
+
*/
|
|
11
|
+
text: string
|
|
12
|
+
/**
|
|
13
|
+
* 指定此菜单项的icon URL(大小为17px*17px)
|
|
14
|
+
*/
|
|
15
|
+
iconUrl: string
|
|
16
|
+
|
|
17
|
+
id: string
|
|
18
|
+
/**
|
|
19
|
+
* 是否禁用菜单项
|
|
20
|
+
*/
|
|
21
|
+
disabled: boolean
|
|
22
|
+
/**
|
|
23
|
+
* 是否是分隔线(此属性为真时,其它属性会被忽略)
|
|
24
|
+
*/
|
|
25
|
+
seperator: boolean
|
|
26
|
+
}
|
package/types/label.d.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { BaiduMapComponent } from './base/component'
|
|
2
|
+
import { Point, Size } from './base/common'
|
|
3
|
+
|
|
4
|
+
export declare class Label extends BaiduMapComponent {
|
|
5
|
+
/**
|
|
6
|
+
* 设置文本标注的内容。支持HTML
|
|
7
|
+
*/
|
|
8
|
+
content: string
|
|
9
|
+
/**
|
|
10
|
+
* 设置文本标注的内容。支持HTML
|
|
11
|
+
*/
|
|
12
|
+
title: string
|
|
13
|
+
/**
|
|
14
|
+
* 设置文本标注的偏移值
|
|
15
|
+
*/
|
|
16
|
+
offset: Size
|
|
17
|
+
/**
|
|
18
|
+
* 设置文本标注坐标。仅当通过Map.addOverlay()方法添加的文本标注有效
|
|
19
|
+
*/
|
|
20
|
+
position: Point
|
|
21
|
+
/**
|
|
22
|
+
* 设置文本标注样式,该样式将作用于文本标注的容器元素上。
|
|
23
|
+
* 其中styles为JavaScript对象常量,比如: setStyle({ color : "red", fontSize : "12px" })
|
|
24
|
+
* 注意:如果css的属性名中包含连字符,需要将连字符去掉并将其后的字母进行大写处理,
|
|
25
|
+
* 例如:背景色属性要写成:backgroundColor
|
|
26
|
+
*/
|
|
27
|
+
labelStyle: object
|
|
28
|
+
/**
|
|
29
|
+
* @default 0
|
|
30
|
+
*/
|
|
31
|
+
zIndex: number
|
|
32
|
+
/**
|
|
33
|
+
* @default true
|
|
34
|
+
*/
|
|
35
|
+
massClear: boolean
|
|
36
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { BaiduMapComponent } from './base/component'
|
|
2
|
+
import { Point, Bounds, LocalResultPoi } from './base/common'
|
|
3
|
+
|
|
4
|
+
interface Nearby {
|
|
5
|
+
center: Point | string | LocalResultPoi
|
|
6
|
+
radius: number
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
interface CustomData {
|
|
10
|
+
// lbs云v2接口,可在lbs云平台上查看自己的geotableId
|
|
11
|
+
geotableId: number
|
|
12
|
+
// 空格分隔的多字符串
|
|
13
|
+
tags: string
|
|
14
|
+
// 过滤条件,参考:http://developer.baidu.com/map/index.php?title=lbscloud/api/geosearch
|
|
15
|
+
filter: string
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export declare class LocalSearch extends BaiduMapComponent {
|
|
19
|
+
/**
|
|
20
|
+
* location表示检索区域,其类型可为空、坐标点或城市名称的字符串。当参数为空时,
|
|
21
|
+
* 检索位置由当前地图中心点确定,且搜索结果的标注将自动加载到地图上,并支持调整地图视野层级;
|
|
22
|
+
* 当参数为坐标时,检索位置由该点所在位置确定;当参数为城市名称时,检索会在该城市内进行。
|
|
23
|
+
*/
|
|
24
|
+
location: string | Point
|
|
25
|
+
/**
|
|
26
|
+
* 搜索关键字。当keyword为数组时将同时执行多关键字的查询,最多支持10个关键字。
|
|
27
|
+
*/
|
|
28
|
+
keyword: string | string[]
|
|
29
|
+
/**
|
|
30
|
+
* 是否选展现检索结果面板。
|
|
31
|
+
*/
|
|
32
|
+
panel: boolean
|
|
33
|
+
/**
|
|
34
|
+
* 表示是否将搜索范围约束在当前城市
|
|
35
|
+
*/
|
|
36
|
+
forceLocal: boolean
|
|
37
|
+
/**
|
|
38
|
+
* 表示检索lbs云服务的数据
|
|
39
|
+
*/
|
|
40
|
+
customData: CustomData
|
|
41
|
+
/**
|
|
42
|
+
* 限定检索的矩形区域。如果区域超出当前 location,将不会产生检索结果。当与 nearby 属性同时,以 nearby 的查询结果为准。
|
|
43
|
+
*/
|
|
44
|
+
bounds: Bounds
|
|
45
|
+
/**
|
|
46
|
+
* 限定检索的圆形区域,参数为由圆心和半径组成的对象。如果区域超出当前 location,将不会产生检索结果。当与 bounds 属性同时,以 nearby 的查询结果为准。
|
|
47
|
+
*/
|
|
48
|
+
nearby: Nearby
|
|
49
|
+
/**
|
|
50
|
+
* 设置每页容量,取值范围:1 - 100,
|
|
51
|
+
* 对于多关键字检索,容量表示每个关键字的数量,
|
|
52
|
+
* 如果有2个关键字,则实际检索结果数量范围为:2 - 200
|
|
53
|
+
*/
|
|
54
|
+
pageCapacity: number
|
|
55
|
+
/**
|
|
56
|
+
* 检索结束后是否自动调整地图视野。
|
|
57
|
+
*/
|
|
58
|
+
autoViewPort: boolean
|
|
59
|
+
/**
|
|
60
|
+
* 是否选择第一个检索结果。
|
|
61
|
+
*/
|
|
62
|
+
selectFirstResult: boolean
|
|
63
|
+
}
|
package/types/lushu.d.ts
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { BaiduMapComponent } from './base/component'
|
|
2
|
+
import { Point, Size, Icon } from './base/common'
|
|
3
|
+
|
|
4
|
+
interface LandmarkPois {
|
|
5
|
+
lng: number
|
|
6
|
+
lat: number
|
|
7
|
+
html: string
|
|
8
|
+
pauseTime: number
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export declare class Lushu extends BaiduMapComponent {
|
|
12
|
+
/**
|
|
13
|
+
* 是否行进
|
|
14
|
+
* @default true
|
|
15
|
+
*/
|
|
16
|
+
play: boolean
|
|
17
|
+
/**
|
|
18
|
+
* 构成路线的坐标点数组
|
|
19
|
+
*/
|
|
20
|
+
path: Point[]
|
|
21
|
+
/**
|
|
22
|
+
* 要在覆盖物移动过程中显示的特殊点
|
|
23
|
+
*/
|
|
24
|
+
landmarkPois: LandmarkPois[]
|
|
25
|
+
/**
|
|
26
|
+
* 覆盖物的图标
|
|
27
|
+
*/
|
|
28
|
+
icon: Icon
|
|
29
|
+
/**
|
|
30
|
+
* 覆盖物移动速度
|
|
31
|
+
* @default 4000
|
|
32
|
+
*/
|
|
33
|
+
speed: number
|
|
34
|
+
/**
|
|
35
|
+
* 信息窗体中的内容,无内容则不显示信息窗体
|
|
36
|
+
* @default ''
|
|
37
|
+
*/
|
|
38
|
+
content: string
|
|
39
|
+
/**
|
|
40
|
+
* 是否自动调整路线视野
|
|
41
|
+
* @default false
|
|
42
|
+
*/
|
|
43
|
+
autoView: boolean
|
|
44
|
+
/**
|
|
45
|
+
* 移动物体是否随路径旋转朝向
|
|
46
|
+
* @default false
|
|
47
|
+
*/
|
|
48
|
+
rotation: boolean
|
|
49
|
+
/**
|
|
50
|
+
* 是否开启移动物体上的信息窗体
|
|
51
|
+
* @default true
|
|
52
|
+
*/
|
|
53
|
+
infoWindow: boolean
|
|
54
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { MapType as mt, MapTypeControlType } from './base/common'
|
|
2
|
+
import { BaseControl } from './base/base-control'
|
|
3
|
+
|
|
4
|
+
export declare class MapType extends BaseControl {
|
|
5
|
+
/**
|
|
6
|
+
* 控件样式
|
|
7
|
+
*/
|
|
8
|
+
type: MapTypeControlType
|
|
9
|
+
/**
|
|
10
|
+
* 控件展示的地图类型,默认为普通图、卫星图、卫星加路网混合图和三维图。通过此属性可配置控件展示的地图类型
|
|
11
|
+
*/
|
|
12
|
+
mapTypes: mt[]
|
|
13
|
+
}
|