pass_b_map_vue2 0.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.
Files changed (103) hide show
  1. package/.eslintrc.js +22 -0
  2. package/.github/ISSUE_TEMPLATE.md +7 -0
  3. package/.travis.yml +26 -0
  4. package/CONTRIBUTING.md +27 -0
  5. package/LICENSE +21 -0
  6. package/README.md +52 -0
  7. package/build/compiler.js +127 -0
  8. package/build/webpack.docs.config.js +86 -0
  9. package/build/webpack.prod.config.js +24 -0
  10. package/build/webpack.test.config.js +27 -0
  11. package/components/base/bindEvent.js +11 -0
  12. package/components/base/events.js +120 -0
  13. package/components/base/factory.js +39 -0
  14. package/components/base/mixins/abstract.js +13 -0
  15. package/components/base/mixins/common.js +81 -0
  16. package/components/base/util.js +6 -0
  17. package/components/context-menu/Item.vue +62 -0
  18. package/components/context-menu/Menu.vue +52 -0
  19. package/components/controls/CityList.vue +43 -0
  20. package/components/controls/Control.vue +37 -0
  21. package/components/controls/Copyright.vue +52 -0
  22. package/components/controls/Geolocation.vue +59 -0
  23. package/components/controls/MapType.vue +39 -0
  24. package/components/controls/Navigation.vue +55 -0
  25. package/components/controls/OverviewMap.vue +56 -0
  26. package/components/controls/Panorama.vue +29 -0
  27. package/components/controls/Scale.vue +36 -0
  28. package/components/extra/CurveLine.vue +101 -0
  29. package/components/extra/Heatmap.vue +78 -0
  30. package/components/extra/Lushu.vue +125 -0
  31. package/components/extra/MarkerClusterer.vue +93 -0
  32. package/components/index.js +98 -0
  33. package/components/layers/Tile.vue +53 -0
  34. package/components/layers/Traffic.vue +34 -0
  35. package/components/map/Map.vue +287 -0
  36. package/components/map/MapView.vue +9 -0
  37. package/components/others/AutoComplete.vue +70 -0
  38. package/components/others/Boundary.vue +60 -0
  39. package/components/overlays/Circle.vue +170 -0
  40. package/components/overlays/Ground.vue +65 -0
  41. package/components/overlays/Icon.vue +0 -0
  42. package/components/overlays/InfoWindow.vue +137 -0
  43. package/components/overlays/Label.vue +99 -0
  44. package/components/overlays/Marker.vue +163 -0
  45. package/components/overlays/Overlay.vue +55 -0
  46. package/components/overlays/PointCollection.vue +76 -0
  47. package/components/overlays/Polygon.vue +105 -0
  48. package/components/overlays/Polyline.vue +86 -0
  49. package/components/overlays/Symblo.vue +0 -0
  50. package/components/search/Bus.vue +102 -0
  51. package/components/search/Driving.vue +177 -0
  52. package/components/search/LocalSearch.vue +152 -0
  53. package/components/search/Transit.vue +126 -0
  54. package/components/search/Walking.vue +115 -0
  55. package/index.d.ts +3 -0
  56. package/index.js +1 -0
  57. package/karma.conf.js +44 -0
  58. package/package.json +69 -0
  59. package/test/map.js +37 -0
  60. package/test/util/BMap.mock/Map.js +82 -0
  61. package/test/util/BMap.mock/create-class.js +9 -0
  62. package/test/util/BMap.mock/index.js +5 -0
  63. package/test/util/BMap.mock/spy.js +2 -0
  64. package/test/util/util.js +12 -0
  65. package/types/auto-complete.d.ts +21 -0
  66. package/types/base/base-control.d.ts +12 -0
  67. package/types/base/common.d.ts +127 -0
  68. package/types/boundary.d.ts +40 -0
  69. package/types/bus.d.ts +27 -0
  70. package/types/circle.d.ts +46 -0
  71. package/types/city-list.d.ts +3 -0
  72. package/types/control.d.ts +3 -0
  73. package/types/copyright.d.ts +7 -0
  74. package/types/curve-line.d.ts +36 -0
  75. package/types/driving.d.ts +47 -0
  76. package/types/geolocation.d.ts +18 -0
  77. package/types/ground.d.ts +24 -0
  78. package/types/heatmap.d.ts +29 -0
  79. package/types/index.d.ts +93 -0
  80. package/types/info-window.d.ts +51 -0
  81. package/types/item.d.ts +25 -0
  82. package/types/label.d.ts +35 -0
  83. package/types/local-search.d.ts +62 -0
  84. package/types/lushu.d.ts +53 -0
  85. package/types/map-type.d.ts +13 -0
  86. package/types/map-view.d.ts +3 -0
  87. package/types/map.d.ts +87 -0
  88. package/types/marker-clusterer.d.ts +25 -0
  89. package/types/marker.d.ts +78 -0
  90. package/types/menu.d.ts +7 -0
  91. package/types/navigation.d.ts +18 -0
  92. package/types/overlay.d.ts +16 -0
  93. package/types/overview-map.d.ts +14 -0
  94. package/types/panorama.d.ts +3 -0
  95. package/types/point-collection.d.ts +26 -0
  96. package/types/polygon.d.ts +46 -0
  97. package/types/polyline.d.ts +37 -0
  98. package/types/scale.d.ts +3 -0
  99. package/types/tile.d.ts +21 -0
  100. package/types/traffic.d.ts +8 -0
  101. package/types/transit.d.ts +39 -0
  102. package/types/tsconfig.json +17 -0
  103. package/types/walking.d.ts +35 -0
@@ -0,0 +1,127 @@
1
+
2
+
3
+ export type ControlAnchor =
4
+ 'BMAP_ANCHOR_TOP_LEFT' // 控件将定位到地图的左上角
5
+ | 'BMAP_ANCHOR_TOP_RIGHT' // 控件将定位到地图的右上角
6
+ | 'BMAP_ANCHOR_BOTTOM_LEFT' // 控件将定位到地图的左下角
7
+ | 'BMAP_ANCHOR_BOTTOM_RIGHT' // 控件将定位到地图的右下角
8
+
9
+ export type MapType =
10
+ 'BMAP_NORMAL_MAP' // 此地图类型展示普通街道视图
11
+ | 'BMAP_PERSPECTIVE_MAP' // 此地图类型展示透视图像视图
12
+ | 'BMAP_SATELLITE_MAP' // 此地图类型展示卫星视图
13
+ | 'BMAP_HYBRID_MAP' // 此地图类型展示卫星和路网的混合视图
14
+
15
+ export type NavigationControlType =
16
+ 'BMAP_NAVIGATION_CONTROL_LARGE' // 标准的平移缩放控件(包括平移、缩放按钮和滑块)
17
+ | 'BMAP_NAVIGATION_CONTROL_SMALL' // 仅包含平移和缩放按钮
18
+ | 'BMAP_NAVIGATION_CONTROL_PAN' // 仅包含平移按钮
19
+ | 'BMAP_NAVIGATION_CONTROL_ZOOM' // 仅包含缩放按钮
20
+
21
+ export type Animation =
22
+ 'BMAP_ANIMATION_DROP' // 坠落动画
23
+ | 'BMAP_ANIMATION_BOUNCE' // 跳动动画
24
+
25
+ export type ShapeType =
26
+ 'BMAP_POINT_SHAPE_CIRCLE' // 圆形,为默认形状
27
+ | 'BMAP_POINT_SHAPE_STAR' // 星形
28
+ | 'BMAP_POINT_SHAPE_SQUARE' // 方形
29
+ | 'BMAP_POINT_SHAPE_RHOMBUS' // 菱形
30
+ | 'BMAP_POINT_SHAPE_WATERDROP' // 水滴状,该类型无size和color属性
31
+
32
+ export type SizeType =
33
+ 'BMAP_POINT_SIZE_TINY' // 宽高为2px*2px
34
+ | 'BMAP_POINT_SIZE_SMALLER' // 宽高为4px*4px
35
+ | 'BMAP_POINT_SIZE_SMALL' // 宽高为8px*8px
36
+ | 'BMAP_POINT_SIZE_NORMAL' // 宽高为10px*10px,为海量点默认尺寸
37
+ | 'BMAP_POINT_SIZE_BIG' // 宽高为16px*16px
38
+ | 'BMAP_POINT_SIZE_BIGGER' // 宽高为20px*20px
39
+ | 'BMAP_POINT_SIZE_HUGE' // 宽高为30px*30px
40
+
41
+ export type TransitPolicy =
42
+ 'BMAP_TRANSIT_POLICY_LEAST_TIME' // 最少时间
43
+ | 'BMAP_TRANSIT_POLICY_LEAST_TRANSFER' // 最少换乘
44
+ | 'BMAP_TRANSIT_POLICY_LEAST_WALKING' // 最少步行
45
+ | 'BMAP_TRANSIT_POLICY_AVOID_SUBWAYS' // 不乘地铁
46
+
47
+ export type DrivingPolicy =
48
+ 'BMAP_DRIVING_POLICY_LEAST_TIME' // 最少时间
49
+ | 'BMAP_DRIVING_POLICY_LEAST_DISTANCE' // 最短距离
50
+ | 'BMAP_DRIVING_POLICY_AVOID_HIGHWAYS' // 避开高速
51
+
52
+ export type MapTypeControlType =
53
+ 'BMAP_MAPTYPE_CONTROL_HORIZONTAL' // 按钮水平方式展示,默认采用此类型展示
54
+ | 'BMAP_MAPTYPE_CONTROL_DROPDOWN' // 按钮呈下拉列表方式展示
55
+ | 'BMAP_MAPTYPE_CONTROL_MAP ' // 以图片方式展示类型控件,设置该类型后无法指定maptypes属性
56
+
57
+ /**
58
+ * 以像素表示一个矩形区域的大小。
59
+ */
60
+ export type Size = { width: number, height: number }
61
+
62
+ /**
63
+ * 表示一个地理坐标点
64
+ */
65
+ export type Point = { lng: number, lat: number }
66
+
67
+ export interface IconOptions {
68
+ anchor: Size
69
+ imageOffset: Size
70
+ imageSize: Size
71
+ infoWindowAnchor: Size
72
+ printImageUrl: string
73
+ }
74
+
75
+ export interface Icon {
76
+ url: string
77
+ size: Size,
78
+ opts: IconOptions
79
+ }
80
+
81
+ /**
82
+ * 创建一个包含所有给定点坐标的矩形区域。
83
+ * 其中sw表示矩形区域的西南角,
84
+ * 参数ne表示矩形区域的东北角
85
+ */
86
+ export interface Bounds {
87
+ sw: Point
88
+ ne: Point
89
+ }
90
+
91
+ /**
92
+ * 表示一条版权信息
93
+ */
94
+ export interface Copyright {
95
+ id: number
96
+ content: string
97
+ bounds?: Bounds
98
+ }
99
+
100
+ export interface PredictDate {
101
+ // 预测日期,取值1到7,表示周一到周日
102
+ weekday: number
103
+ // 预测小时数,取值0到23,表示当日的0点到23点
104
+ hour: number
105
+ }
106
+
107
+ // 详见:http://lbsyun.baidu.com/cms/jsapi/class/jsapi_reference.html#a7b5
108
+ interface LocalResultPoi {
109
+ title: string
110
+ point: Point
111
+ url: string
112
+ address: string
113
+ city: string
114
+ phoneNumber: string
115
+ postcode: string
116
+ type: any
117
+ isAccurate: boolean
118
+ province: string
119
+ tags: string[]
120
+ detailUrl: string
121
+ }
122
+
123
+ export interface MapStyle {
124
+ style: string,
125
+ featrues: any[],
126
+ styleJson: any[]
127
+ }
@@ -0,0 +1,40 @@
1
+
2
+ export declare class Boundary {
3
+ /**
4
+ * 行政区划名称
5
+ */
6
+ name: string
7
+ /**
8
+ * 设置折线颜色,参数为合法的CSS颜色值
9
+ */
10
+ strokeColor: string
11
+ /**
12
+ * 设置折线的宽度,取值为大于等于1的整数
13
+ */
14
+ strokeWeight: number
15
+ /**
16
+ * 设置折线透明度,取值范围0 - 1
17
+ */
18
+ strokeOpacity: number
19
+ /**
20
+ * @default 'solid'
21
+ */
22
+ strokeStyle: 'solid' | 'dashed'
23
+ /**
24
+ * 设置行政区划的填充颜色,参数为合法的CSS颜色值。
25
+ * 当参数为空字符串时,折线覆盖物将没有填充效果
26
+ */
27
+ fillColor: string
28
+ /**
29
+ * 设置行政区划的填充透明度,取值范围0 - 1
30
+ */
31
+ fillOpacity: number
32
+ /**
33
+ * @default true
34
+ */
35
+ massClear: boolean
36
+ /**
37
+ * @default true
38
+ */
39
+ clicking: boolean
40
+ }
package/types/bus.d.ts ADDED
@@ -0,0 +1,27 @@
1
+ import { Point } from './base/common'
2
+
3
+ export declare class Bus {
4
+ /**
5
+ * location表示检索区域,其类型可为空、坐标点或城市名称的字符串。当参数为空时,
6
+ * 检索位置由当前地图中心点确定,且搜索结果的标注将自动加载到地图上,并支持调整地图视野层级;
7
+ * 当参数为坐标时,检索位置由该点所在位置确定;当参数为城市名称时,检索会在该城市内进行。
8
+ */
9
+ location: string | Point
10
+ /**
11
+ * 公交路线关键词
12
+ */
13
+ keyword: string
14
+ /**
15
+ * 是否选展现检索结果面板。
16
+ * @default true
17
+ */
18
+ panel: boolean
19
+ /**
20
+ * 检索结束后是否自动调整地图视野。
21
+ */
22
+ autoViewport: boolean
23
+ /**
24
+ * 是否选择第一个检索结果。
25
+ */
26
+ selectFirstResult: boolean
27
+ }
@@ -0,0 +1,46 @@
1
+ import { Point } from './base/common'
2
+
3
+ export declare class Circle {
4
+ center: Point
5
+ /**
6
+ * 设置圆形的半径,单位为米
7
+ */
8
+ radius: number
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
+ * 设置圆的填充颜色,参数为合法的CSS颜色值。
27
+ * 当参数为空字符串时,圆覆盖物将没有填充效果
28
+ */
29
+ fillColor: string
30
+ /**
31
+ * 设置圆的填充透明度,取值范围0 - 1
32
+ */
33
+ fillOpacity: number
34
+ /**
35
+ * @default true
36
+ */
37
+ massClear: boolean
38
+ /**
39
+ * @default true
40
+ */
41
+ clicking: boolean
42
+ /**
43
+ * @default false
44
+ */
45
+ editing: boolean
46
+ }
@@ -0,0 +1,3 @@
1
+ import { BaseControl } from './base/base-control'
2
+
3
+ export declare class CityList extends BaseControl {}
@@ -0,0 +1,3 @@
1
+ import { BaseControl } from './base/base-control'
2
+
3
+ export declare class Control extends BaseControl {}
@@ -0,0 +1,7 @@
1
+ import { Point, Copyright } from './base/common'
2
+ import { BaseControl } from './base/base-control'
3
+
4
+
5
+ export declare class Copyright extends BaseControl {
6
+ copyright: Copyright[]
7
+ }
@@ -0,0 +1,36 @@
1
+ import { Point } from './base/common'
2
+
3
+ export declare class CurveLine {
4
+ /**
5
+ * 构成弧线的关键点
6
+ */
7
+ points: Point[]
8
+ /**
9
+ * 设置折线颜色,参数为合法的CSS颜色值
10
+ */
11
+ strokeColor: string
12
+ /**
13
+ * 设置折线的宽度,取值为大于等于1的整数
14
+ */
15
+ strokeWeight: number
16
+ /**
17
+ * 设置折线透明度,取值范围0 - 1
18
+ */
19
+ strokeOpacity: number
20
+ /**
21
+ * @default 'solid'
22
+ */
23
+ strokeStyle: 'solid' | 'dashed'
24
+ /**
25
+ * @default true
26
+ */
27
+ massClear: boolean
28
+ /**
29
+ * @default true
30
+ */
31
+ clicking: boolean
32
+ /**
33
+ * @default false
34
+ */
35
+ editing: boolean
36
+ }
@@ -0,0 +1,47 @@
1
+ import { Point, LocalResultPoi, DrivingPolicy } from './base/common'
2
+
3
+ export declare class Driving {
4
+ /**
5
+ * location表示检索区域,其类型可为空、坐标点或城市名称的字符串。当参数为空时,
6
+ * 检索位置由当前地图中心点确定,且搜索结果的标注将自动加载到地图上,并支持调整地图视野层级;
7
+ * 当参数为坐标时,检索位置由该点所在位置确定;当参数为城市名称时,检索会在该城市内进行。
8
+ */
9
+ location: string | Point
10
+ /**
11
+ * 起点,参数可以是关键字、坐标点(自1.1版本支持)或者LocalSearchPoi实例。
12
+ */
13
+ start: string | Point | LocalResultPoi
14
+ /**
15
+ * 终点,参数可以是关键字、坐标点(自1.1版本支持)或者LocalSearchPoi实例。
16
+ */
17
+ end: string | Point | LocalResultPoi
18
+ /**
19
+ * 起点城市,可以是城市名或者城市编码。作为地方性重复地名的辅助选项,须与 endCity 属性同时使用,否则检索结果以 location 属性为准。
20
+ */
21
+ startCity: string | number
22
+ /**
23
+ * 终点城市,可以是城市名或者城市编码。作为地方性重复地名的辅助选项,须与 startCity 属性同时使用,否则检索结果以 location 属性为准。
24
+ */
25
+ endCity: string | number
26
+ /**
27
+ * 途经点集合,最多支持10个途经点,可以是名称也可以是坐标。
28
+ */
29
+ waypoints: Point[]
30
+ /**
31
+ * 公交导航的策略参数
32
+ */
33
+ policy: DrivingPolicy
34
+ /**
35
+ * 是否选展现检索结果面板。
36
+ * @default true
37
+ */
38
+ panel: boolean
39
+ /**
40
+ * 检索结束后是否自动调整地图视野。
41
+ */
42
+ autoViewport: boolean
43
+ /**
44
+ * 是否选择第一个检索结果。
45
+ */
46
+ selectFirstResult: boolean
47
+ }
@@ -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,24 @@
1
+ import { Bounds } from './base/common'
2
+
3
+ export declare class Ground {
4
+ /**
5
+ * 设置图层显示的矩形区域
6
+ */
7
+ bounds: Bounds
8
+ /**
9
+ * 设置图层的透明度
10
+ */
11
+ opacity: number
12
+ /**
13
+ * 图层地址
14
+ */
15
+ imageURL: string
16
+ /**
17
+ * 设置图层显示的最小级别
18
+ */
19
+ displayOnMinLevel: number
20
+ /**
21
+ * 设置图层显示的最大级别
22
+ */
23
+ displayOnMaxLevel: number
24
+ }
@@ -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
+ }
@@ -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,51 @@
1
+ import { Point, Size } from './base/common'
2
+
3
+ export declare class InfoWindow {
4
+ /**
5
+ * @default false
6
+ */
7
+ show: boolean
8
+ position: Point
9
+ /**
10
+ * 信息窗标题文字,支持HTML内容
11
+ */
12
+ title: string
13
+ /**
14
+ * 信息窗宽度,单位像素。取值范围:0, 220 - 730。如果您指定宽度为0,则信息窗口的宽度将按照其内容自动调整
15
+ */
16
+ width: number
17
+ /**
18
+ * 信息窗高度,单位像素。取值范围:0, 60 - 650。如果您指定高度为0,则信息窗口的高度将按照其内容自动调整
19
+ */
20
+ height: number
21
+ /**
22
+ * 信息窗最大化时的宽度,单位像素。取值范围:220 - 730
23
+ */
24
+ maxWidth: number
25
+ /**
26
+ * 信息窗位置偏移值。默认情况下在地图上打开的信息窗底端的尖角将指向其地理坐标,
27
+ * 在标注上打开的信息窗底端尖角的位置取决于标注所用图标的infoWindowOffset属性值,您可以为信息窗添加偏移量来改变默认位置
28
+ */
29
+ offset: Size
30
+ /**
31
+ * 启用窗口最大化功能。需要设置最大化后信息窗口里的内容,该接口才生效
32
+ * @default false
33
+ */
34
+ maximize: boolean
35
+ /**
36
+ * 是否开启信息窗口打开时地图自动移动(默认开启)
37
+ * @default true
38
+ */
39
+ autoPan: boolean
40
+ /**
41
+ * 是否开启点击地图关闭信息窗口(默认开启)
42
+ * @default true
43
+ */
44
+ closeOnClick: boolean
45
+ /**
46
+ * 自定义部分的短信内容,可选项。
47
+ * 完整的短信内容包括:自定义部分+位置链接,不设置时,显示默认短信内容。
48
+ * 短信内容最长为140个字
49
+ */
50
+ message: string
51
+ }
@@ -0,0 +1,25 @@
1
+
2
+ export declare class Item {
3
+ /**
4
+ * 点击菜单时执行的回调函数,第一个参数为 {BMap, map, target, pixel, point}
5
+ */
6
+ callback (params: any): Function
7
+ /**
8
+ * 指定此菜单项的文本
9
+ */
10
+ text: string
11
+ /**
12
+ * 指定此菜单项的icon URL(大小为17px*17px)
13
+ */
14
+ iconUrl: string
15
+
16
+ id: string
17
+ /**
18
+ * 是否禁用菜单项
19
+ */
20
+ disabled: boolean
21
+ /**
22
+ * 是否是分隔线(此属性为真时,其它属性会被忽略)
23
+ */
24
+ seperator: boolean
25
+ }
@@ -0,0 +1,35 @@
1
+ import { Point, Size } from './base/common'
2
+
3
+ export declare class Label {
4
+ /**
5
+ * 设置文本标注的内容。支持HTML
6
+ */
7
+ content: string
8
+ /**
9
+ * 设置文本标注的内容。支持HTML
10
+ */
11
+ title: string
12
+ /**
13
+ * 设置文本标注的偏移值
14
+ */
15
+ offset: Size
16
+ /**
17
+ * 设置文本标注坐标。仅当通过Map.addOverlay()方法添加的文本标注有效
18
+ */
19
+ position: Point
20
+ /**
21
+ * 设置文本标注样式,该样式将作用于文本标注的容器元素上。
22
+ * 其中styles为JavaScript对象常量,比如: setStyle({ color : "red", fontSize : "12px" })
23
+ * 注意:如果css的属性名中包含连字符,需要将连字符去掉并将其后的字母进行大写处理,
24
+ * 例如:背景色属性要写成:backgroundColor
25
+ */
26
+ labelStyle: object
27
+ /**
28
+ * @default 0
29
+ */
30
+ zIndex: number
31
+ /**
32
+ * @default true
33
+ */
34
+ massClear: boolean
35
+ }
@@ -0,0 +1,62 @@
1
+ import { Point, Bounds, LocalResultPoi } from './base/common'
2
+
3
+ interface Nearby {
4
+ center: Point | string | LocalResultPoi
5
+ radius: number
6
+ }
7
+
8
+ interface CustomData {
9
+ // lbs云v2接口,可在lbs云平台上查看自己的geotableId
10
+ geotableId: number
11
+ // 空格分隔的多字符串
12
+ tags: string
13
+ // 过滤条件,参考:http://developer.baidu.com/map/index.php?title=lbscloud/api/geosearch
14
+ filter: string
15
+ }
16
+
17
+ export declare class LocalSearch {
18
+ /**
19
+ * location表示检索区域,其类型可为空、坐标点或城市名称的字符串。当参数为空时,
20
+ * 检索位置由当前地图中心点确定,且搜索结果的标注将自动加载到地图上,并支持调整地图视野层级;
21
+ * 当参数为坐标时,检索位置由该点所在位置确定;当参数为城市名称时,检索会在该城市内进行。
22
+ */
23
+ location: string | Point
24
+ /**
25
+ * 搜索关键字。当keyword为数组时将同时执行多关键字的查询,最多支持10个关键字。
26
+ */
27
+ keyword: string | string[]
28
+ /**
29
+ * 是否选展现检索结果面板。
30
+ */
31
+ panel: boolean
32
+ /**
33
+ * 表示是否将搜索范围约束在当前城市
34
+ */
35
+ forceLocal: boolean
36
+ /**
37
+ * 表示检索lbs云服务的数据
38
+ */
39
+ customData: CustomData
40
+ /**
41
+ * 限定检索的矩形区域。如果区域超出当前 location,将不会产生检索结果。当与 nearby 属性同时,以 nearby 的查询结果为准。
42
+ */
43
+ bounds: Bounds
44
+ /**
45
+ * 限定检索的圆形区域,参数为由圆心和半径组成的对象。如果区域超出当前 location,将不会产生检索结果。当与 bounds 属性同时,以 nearby 的查询结果为准。
46
+ */
47
+ nearby: Nearby
48
+ /**
49
+ * 设置每页容量,取值范围:1 - 100,
50
+ * 对于多关键字检索,容量表示每个关键字的数量,
51
+ * 如果有2个关键字,则实际检索结果数量范围为:2 - 200
52
+ */
53
+ pageCapacity: number
54
+ /**
55
+ * 检索结束后是否自动调整地图视野。
56
+ */
57
+ autoViewPort: boolean
58
+ /**
59
+ * 是否选择第一个检索结果。
60
+ */
61
+ selectFirstResult: boolean
62
+ }