@heycar/heycars-map 0.3.7 → 0.3.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.
Files changed (174) hide show
  1. package/dist/business-components/AbsoluteAddressBox/AbsoluteAddressBox.d.ts +1 -2
  2. package/dist/business-components/AddressBox/AddressBox.d.ts +1 -2
  3. package/dist/business-components/BusinessQuotingMap/BusinessQuotingMap.d.ts +1 -0
  4. package/dist/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.d.ts +1 -2
  5. package/dist/business-components/BusinessTaxiEndMap/BusinessTaxiEndMap.d.ts +1 -2
  6. package/dist/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.d.ts +2 -3
  7. package/dist/business-components/DrivingLine/DrivingLine.d.ts +1 -2
  8. package/dist/business-components/DrivingRoute/DrivingRoute.d.ts +1 -2
  9. package/dist/business-components/PassengerCircle/PassengerCircle.d.ts +1 -2
  10. package/dist/business-components/PickupPoints/PickupPoints.d.ts +1 -2
  11. package/dist/business-components/PlaceCircle/PlaceCircle.d.ts +1 -2
  12. package/dist/business-components/StartEndPoint/StartEndPoint.d.ts +1 -2
  13. package/dist/business-components/TaxiCar/TaxiCar.d.ts +1 -2
  14. package/dist/business-components/WalkingLine/WalkingLine.d.ts +1 -2
  15. package/dist/business-components/WalkingRoute/WalkingRoute.d.ts +1 -2
  16. package/dist/business-components/WaveCircle/WaveCircle.d.ts +1 -2
  17. package/dist/components/Gmap/Gmap.d.ts +0 -2
  18. package/dist/components/MapProvider/MapProvider.d.ts +1 -4
  19. package/dist/hooks/useMapAutoComplete.d.ts +1 -2
  20. package/dist/hooks-business/useBusinessMapAutoComplete.d.ts +1 -2
  21. package/dist/index.cjs +55 -55
  22. package/dist/index.js +1966 -2061
  23. package/package.json +1 -1
  24. package/todo.md +16 -4
  25. package/dist/Demo/CityBound/SearchDemo.d.ts +0 -1
  26. package/dist/Demo/CityBound/country.d.ts +0 -5
  27. package/dist/Demo/CityBound/searchResult.d.ts +0 -8
  28. package/dist/hooks/useMapLog.d.ts +0 -5
  29. package/src/App.tsx +0 -27
  30. package/src/Demo/CityBound/SearchDemo.tsx +0 -142
  31. package/src/Demo/CityBound/country.ts +0 -4179
  32. package/src/Demo/CityBound/searchResult.ts +0 -21122
  33. package/src/Demo/Demo.css.ts +0 -6
  34. package/src/Demo/Demo.tsx +0 -97
  35. package/src/Demo/DemoBusinessQuoting.tsx +0 -18
  36. package/src/Demo/DemoBusinessRecomendPlace.tsx +0 -89
  37. package/src/Demo/DemoBusinessTaxiEnd.tsx +0 -38
  38. package/src/Demo/DemoBusinessTaxiService.tsx +0 -58
  39. package/src/Demo/sample.json +0 -793
  40. package/src/api/contants.ts +0 -3
  41. package/src/api/driving.ts +0 -87
  42. package/src/api/geocoder.ts +0 -88
  43. package/src/api/geometry.ts +0 -44
  44. package/src/api/place.ts +0 -105
  45. package/src/assets/icons/svg/address-locator.svg +0 -1
  46. package/src/assets/icons/svg/arrow-right.svg +0 -1
  47. package/src/assets/icons/svg/end-point.svg +0 -1
  48. package/src/assets/icons/svg/passenger-circle.svg +0 -1
  49. package/src/assets/icons/svg/place-circle.svg +0 -22
  50. package/src/assets/icons/svg/start-point.svg +0 -1
  51. package/src/assets/icons/svg/taxi-car.svg +0 -1
  52. package/src/assets/icons/svg/wave-circle.svg +0 -1
  53. package/src/business-components/AbsoluteAddressBox/AbsoluteAddressBox.css.ts +0 -68
  54. package/src/business-components/AbsoluteAddressBox/AbsoluteAddressBox.tsx +0 -50
  55. package/src/business-components/AbsoluteAddressBox/index.ts +0 -1
  56. package/src/business-components/AddressBox/AddressBox.css.ts +0 -55
  57. package/src/business-components/AddressBox/AddressBox.tsx +0 -76
  58. package/src/business-components/AddressBox/index.ts +0 -1
  59. package/src/business-components/AddressLocator/AddressLocator.css.ts +0 -7
  60. package/src/business-components/AddressLocator/AddressLocator.tsx +0 -40
  61. package/src/business-components/AddressLocator/index.ts +0 -1
  62. package/src/business-components/BusinessQuotingMap/BusinessQuotingMap.tsx +0 -49
  63. package/src/business-components/BusinessQuotingMap/index.ts +0 -1
  64. package/src/business-components/BusinessRecomendPlaceMap/BusinessRecomendPlaceMap.tsx +0 -218
  65. package/src/business-components/BusinessRecomendPlaceMap/index.ts +0 -1
  66. package/src/business-components/BusinessTaxiEndMap/BusinessTaxiEndMap.tsx +0 -43
  67. package/src/business-components/BusinessTaxiEndMap/index.ts +0 -1
  68. package/src/business-components/BusinessTaxiServiceMap/BusinessTaxiServiceMap.tsx +0 -453
  69. package/src/business-components/BusinessTaxiServiceMap/index.ts +0 -1
  70. package/src/business-components/DrivingLine/DrivingLine.css.ts +0 -10
  71. package/src/business-components/DrivingLine/DrivingLine.tsx +0 -135
  72. package/src/business-components/DrivingLine/index.ts +0 -1
  73. package/src/business-components/DrivingRoute/DrivingRoute.tsx +0 -52
  74. package/src/business-components/DrivingRoute/index.ts +0 -1
  75. package/src/business-components/FitView/FitView.tsx +0 -22
  76. package/src/business-components/FitView/index.ts +0 -1
  77. package/src/business-components/PassengerCircle/PassengerCircle.css.ts +0 -21
  78. package/src/business-components/PassengerCircle/PassengerCircle.tsx +0 -69
  79. package/src/business-components/PassengerCircle/index.ts +0 -1
  80. package/src/business-components/PickupPoints/PickupPoints.tsx +0 -38
  81. package/src/business-components/PickupPoints/index.ts +0 -1
  82. package/src/business-components/PlaceCircle/PlaceCircle.css.ts +0 -76
  83. package/src/business-components/PlaceCircle/PlaceCircle.tsx +0 -110
  84. package/src/business-components/PlaceCircle/index.ts +0 -1
  85. package/src/business-components/StartEndPoint/StartEndPoint.css.ts +0 -70
  86. package/src/business-components/StartEndPoint/StartEndPoint.tsx +0 -122
  87. package/src/business-components/StartEndPoint/index.ts +0 -1
  88. package/src/business-components/TaxiCar/TaxiCar.css.ts +0 -16
  89. package/src/business-components/TaxiCar/TaxiCar.tsx +0 -93
  90. package/src/business-components/TaxiCar/index.ts +0 -1
  91. package/src/business-components/WalkingLine/WalkingLine.tsx +0 -80
  92. package/src/business-components/WalkingLine/index.ts +0 -1
  93. package/src/business-components/WalkingRoute/WalkingRoute.tsx +0 -43
  94. package/src/business-components/WalkingRoute/index.ts +0 -1
  95. package/src/business-components/WaveCircle/WaveCircle.css.ts +0 -54
  96. package/src/business-components/WaveCircle/WaveCircle.tsx +0 -59
  97. package/src/business-components/WaveCircle/index.ts +0 -1
  98. package/src/components/Amap/Amap.css.ts +0 -5
  99. package/src/components/Amap/Amap.ts +0 -76
  100. package/src/components/Amap/index.ts +0 -1
  101. package/src/components/AmapInfoWindow/AmapInfoWindow.ts +0 -45
  102. package/src/components/AmapInfoWindow/index.ts +0 -1
  103. package/src/components/AmapLoader/AmapLoader.ts +0 -20
  104. package/src/components/AmapLoader/index.ts +0 -1
  105. package/src/components/AmapMarker/AmapMarker.ts +0 -48
  106. package/src/components/AmapMarker/index.ts +0 -1
  107. package/src/components/AmapPolygon/AmapPolygon.ts +0 -41
  108. package/src/components/AmapPolygon/index.ts +0 -1
  109. package/src/components/AmapPolyline/AmapPolyline.ts +0 -40
  110. package/src/components/AmapPolyline/index.ts +0 -1
  111. package/src/components/AmapText/AmapText.ts +0 -39
  112. package/src/components/AmapText/index.ts +0 -1
  113. package/src/components/Gmap/Gmap.css.ts +0 -10
  114. package/src/components/Gmap/Gmap.ts +0 -54
  115. package/src/components/Gmap/index.ts +0 -1
  116. package/src/components/GmapAdvancedMarkerView/GmapAdvancedMarkerView.ts +0 -63
  117. package/src/components/GmapAdvancedMarkerView/index.ts +0 -1
  118. package/src/components/GmapInfoWindow/GmapInfoWindow.ts +0 -38
  119. package/src/components/GmapInfoWindow/index.ts +0 -1
  120. package/src/components/GmapLoader/GmapLoader.ts +0 -21
  121. package/src/components/GmapLoader/index.ts +0 -1
  122. package/src/components/GmapMarker/GmapMarker.ts +0 -34
  123. package/src/components/GmapMarker/index.ts +0 -1
  124. package/src/components/GmapPolygon/GmapPolygon.ts +0 -29
  125. package/src/components/GmapPolygon/index.ts +0 -1
  126. package/src/components/GmapPolyline/GmapPolyline.ts +0 -29
  127. package/src/components/GmapPolyline/index.ts +0 -1
  128. package/src/components/MapProvider/MapProvider.tsx +0 -83
  129. package/src/components/MapProvider/index.ts +0 -1
  130. package/src/hooks/useDrivingRoute.ts +0 -106
  131. package/src/hooks/useGeoLocation.ts +0 -70
  132. package/src/hooks/useHeycarMap.ts +0 -28
  133. package/src/hooks/useMap.ts +0 -43
  134. package/src/hooks/useMapAngle.ts +0 -42
  135. package/src/hooks/useMapAutoComplete.ts +0 -130
  136. package/src/hooks/useMapCityBound.ts +0 -64
  137. package/src/hooks/useMapDrag.ts +0 -72
  138. package/src/hooks/useMapEventSource.ts +0 -20
  139. package/src/hooks/useMapFitView.ts +0 -135
  140. package/src/hooks/useMapGeometry.ts +0 -27
  141. package/src/hooks/useMapLngLatToVw.ts +0 -31
  142. package/src/hooks/useMapLoader.ts +0 -164
  143. package/src/hooks/useMapLog.ts +0 -24
  144. package/src/hooks/useMapPlace.ts +0 -138
  145. package/src/hooks/useMapRecomendPlace.ts +0 -150
  146. package/src/hooks/useMapSupplier.ts +0 -16
  147. package/src/hooks/useOverlay.ts +0 -23
  148. package/src/hooks/usePlacesLabelDirection.ts +0 -61
  149. package/src/hooks/useUdate.ts +0 -9
  150. package/src/hooks/useWaitTimer.ts +0 -25
  151. package/src/hooks/useWalkingRoute.ts +0 -87
  152. package/src/hooks-business/useBusinessMapAutoComplete.ts +0 -22
  153. package/src/hooks-business/useBusinessQuotingMap.ts +0 -11
  154. package/src/hooks-business/useBusinessRecomendPlaceMap.ts +0 -45
  155. package/src/hooks-business/useBusinessTaxiServiceMap.ts +0 -12
  156. package/src/index.ts +0 -33
  157. package/src/main.ts +0 -6
  158. package/src/style.css +0 -0
  159. package/src/types/amap/autocomplete.d.ts +0 -64
  160. package/src/types/amap/driving.d.ts +0 -170
  161. package/src/types/amap/geocoder.d.ts +0 -217
  162. package/src/types/amap/marker.ts +0 -11
  163. package/src/types/amap/place.d.ts +0 -114
  164. package/src/types/amap/plugin.d.ts +0 -27
  165. package/src/types/amap/walking.d.ts +0 -78
  166. package/src/types/global.d.ts +0 -10
  167. package/src/types/helper.ts +0 -172
  168. package/src/types/interface.ts +0 -62
  169. package/src/types/mapHelper.ts +0 -1
  170. package/src/utils/compare.ts +0 -189
  171. package/src/utils/dom.ts +0 -14
  172. package/src/utils/helper.ts +0 -5
  173. package/src/utils/transform.ts +0 -68
  174. package/src/vite-env.d.ts +0 -12
@@ -1,64 +0,0 @@
1
- export {};
2
-
3
- declare global {
4
- // eslint-disable-next-line @typescript-eslint/no-namespace
5
- namespace AMap {
6
- export interface AutoCompleteOptions {
7
- // 输入提示时限定POI类型,多个类型用“|”分隔,目前只支持Poi类型编码如“050000” 默认值:所有类别
8
- type?: string;
9
- // 输入提示时限定城市。可选值:城市名(中文或中文全拼)、citycode、adcode;默认值:“全国”
10
- city?: string;
11
- // 返回的数据类型。可选值:all-返回所有数据类型、poi-返回POI数据类型、bus-返回公交站点数据类型、busline-返回公交线路数据类型目前暂时不支持多种类型
12
- datatype?: string;
13
- // 是否强制限制在设置的城市内搜索,默认值为:false,true:强制限制设定城市,false:不强制限制设定城市
14
- citylimit?: boolean;
15
- // 可选参数,用来指定一个input输入框,设定之后,在input输入文字将自动生成下拉选择列表。支持传入输入框DOM对象的id值,或直接传入输入框的DOM对象。
16
- input?: string | HTMLDivElement;
17
- // 可选参数,指定一个现有的div的id或者元素,作为展示提示结果的容器,当指定了input的时候有效,缺省的时候将自动创建一个显示结果面板
18
- output?: string | HTMLDivElement;
19
- // 默认为true,表示是否在input位于页面较下方的时候自动将输入面板显示在input上方以避免被遮挡
20
- outPutDirAuto?: boolean;
21
- // 页面滚动时关闭搜索结果列表,默认 true
22
- closeResultOnScroll?: boolean;
23
- // 设置检索语言类型,默认中文 'zh_cn'
24
- lang?: string;
25
- }
26
-
27
- export interface Tip {
28
- id: string;
29
- // 名称
30
- name: string;
31
- // 所属区域
32
- district: string;
33
- // 区域编码
34
- adcode: string;
35
- }
36
-
37
- export interface AutocompleteResult {
38
- // 查询状态说明
39
- info: string;
40
- // 输入提示条数
41
- count: number;
42
- // 输入提示列表
43
- tips: Tip[];
44
- }
45
-
46
- export type AutoCompleteSearchCallback = (
47
- // 返回信息状态 可取值:'complete': result 为 AutocompleteResult; 'error': result为错误信息;'no_data': result 为 0
48
- status: "complete" | "error" | "no_data",
49
- result: AutocompleteResult | Error | 0
50
- ) => void;
51
-
52
- export class AutoComplete {
53
- constructor(option: AutoCompleteOptions);
54
- // 设置提示Poi类型,多个类型用“|”分隔,POI相关类型请在网站“相关下载”处下载,目前只支持Poi类型编码如“050000” 默认值:所有类别
55
- setType(type: string): void;
56
- // 设置城市
57
- setCity(city: string): void;
58
- // 设置是否强制限制城市
59
- setCityLimit(citylimit: boolean): void;
60
- // 根据输入关键字提示匹配信息,支持中文、拼音
61
- search(keyword: string, callback: AutoCompleteSearchCallback): void;
62
- }
63
- }
64
- }
@@ -1,170 +0,0 @@
1
- export {};
2
-
3
- declare global {
4
- // eslint-disable-next-line @typescript-eslint/no-namespace
5
- namespace AMap {
6
- export interface DrivingOptions {
7
- // AMap.Map对象, 展现结果的地图实例。当指定此参数后,搜索结果的标注、线路等均会自动添加到此地图上。可选
8
- map?: AMap.Map;
9
- // 驾车路线规划策略
10
- policy?: number;
11
- // 默认值:base,返回基本地址信息\n当取值为:all,返回DriveStep基本信息+DriveStep详细信息, (default 'base')
12
- extensions?: string;
13
- // 默认为0,表示可以使用轮渡,为1的时候表示不可以使用轮渡, (default 0)
14
- ferry?: number;
15
- // 结果列表的HTML容器id或容器元素,提供此参数后,结果列表将在此容器中进行展示。可选
16
- panel?: string | HTMLElement;
17
- // 设置隐藏路径规划的起始点图标 设置为true:隐藏图标;设置false:显示图标\n默认值为:false, (default false)
18
- hideMarkers?: boolean;
19
- // 设置是否显示实时路况信息,默认设置为true。 显示绿色代表畅通,黄色代表轻微拥堵,红色代表比较拥堵,灰色表示无路况信息。
20
- showTraffic?: boolean;
21
- // 车牌省份的汉字缩写,用于判断是否限行,与number属性组合使用,可选。例如:京
22
- province?: string;
23
- // 除省份之外车牌的字母和数字,用于判断限行相关,与province属性组合使用,可选。例如:NH1N11
24
- number?: string;
25
- // 使用map属性时,绘制的规划线路是否显示描边。缺省为true
26
- isOutline?: boolean;
27
- // 使用map属性时,绘制的规划线路的描边颜色。缺省为'white'
28
- outlineColor?: string;
29
- autoFitView?: boolean;
30
- }
31
- // 驾车规划路线列表元素
32
- export interface DrivingRoute {
33
- // 起点到终点的驾车距离,单位:米
34
- distance: number;
35
- // 时间预计,单位:秒
36
- time: number;
37
- // 驾车规划策略
38
- policy: string;
39
- // 此驾车路线收费金额,单位:元
40
- tolls: number;
41
- // 收费路段长度,单位:米
42
- tolls_distance: number;
43
- // 限行结果,0 代表限行已规避或未限行,即该路线没有限行路段,1 代表限行无法规避,即该线路有限行路段
44
- restriction: number;
45
- // 子路段DriveStep集合
46
- steps: (DriveStepBasic | DriveStepDetail)[];
47
- }
48
-
49
- export interface DriveStepBasic {
50
- // 此路段起点
51
- start_location: LngLat;
52
- // 此路段终点
53
- end_location: LngLat;
54
- // 此路段说明,如“沿北京南站路行驶565米右转”
55
- instruction: string;
56
- // 本驾车子路段完成后动作
57
- action: string;
58
- // 驾车子路段完成后辅助动作,一般为到达某个目的地时返回
59
- assist_action: string;
60
- // 驾车方向
61
- orientation: string;
62
- // 驾车方向
63
- road: string;
64
- // 此路段距离,单位:米
65
- distance: number;
66
- // 此段收费,单位:元
67
- tolls: number;
68
- // 收费路段长度,单位:米
69
- tolls_distance: number;
70
- // 主要收费道路
71
- toll_road: string;
72
- // 此路段预计使用时间,单位:秒
73
- time: number;
74
- // 此路段坐标集合
75
- path: LngLat[];
76
- }
77
- // 实时交通信息列表元素
78
- export interface TMC {
79
- // 路况信息对应的编码 如果direction是正向 lcode返回值大于0;否则lcode,返回值小于0; 如果返回0则说明此路段无lcode
80
- lcode: string;
81
- // 此lcode对应的路段长度,单位: 米
82
- distance: number;
83
- // 路况状态,可能的值有:未知,畅通,缓行,拥堵
84
- status: string;
85
- }
86
-
87
- export interface DriveStepDetail {
88
- // 途径城市列表
89
- cities: ViaCity[];
90
- // 实时交通信息列表
91
- tmcs: TMC[];
92
- }
93
- export interface District {
94
- // 区域名称
95
- name: string;
96
- // 区域编码
97
- adcode: string;
98
- }
99
- // 途径城市列表元素
100
- export interface ViaCity {
101
- // 途径名称
102
- name: string;
103
- // 城市编码
104
- citycode: string;
105
- // 区域编码
106
- adcode: string;
107
- // 途径行政区列表
108
- districts: District[];
109
- }
110
-
111
- export interface DrivingResult {
112
- // 成功状态说明
113
- info: string;
114
- // 驾车规划起点坐标
115
- origin: LngLat;
116
- // 驾车规划终点坐标
117
- destination: LngLat;
118
- // 驾车规划起点
119
- start: POI;
120
- // 驾车规划终点
121
- end: POI;
122
- // 驾车规划途经点
123
- waypoints: POI;
124
- // 打车费用,仅extensions为“all”时返回. 单位: 元
125
- taxi_cost: number;
126
- // 驾车规划路线列表
127
- routes: DrivingRoute[];
128
- }
129
-
130
- export type DrivingCallback = (
131
- // 返回信息状态 可取值:'complete': result 为 DrivingResult; 'error': result为错误信息;'no_data': result 为 0
132
- status: "complete" | "error" | "no_data",
133
- result: DrivingResult | Error | 0
134
- ) => void;
135
-
136
- export class Driving {
137
- constructor(option: DrivingOptions);
138
- // 根据起点、终点和途经点(可选)坐标或名称,实现驾车路线规划,途经点通过opts设定
139
- search(
140
- // 起点经纬度
141
- origin: LngLat,
142
- // 终点经纬度
143
- destination: LngLat,
144
- opts: {
145
- // 途径点,最多支持16个
146
- waypoints: LngLat[];
147
- },
148
- callback: DrivingCallback
149
- ): void;
150
- // 清除搜索结果
151
- clear(): void;
152
- // 设置避让区域,最大支持三个避让区域,参数为LngLat的二维数组
153
- setAvoidPolygons(areas: LngLatLike[][]): void;
154
- // 清除避让区域
155
- clearAvoidPolygons(): void;
156
- // 获取避让区域,返回LngLat的二维数组
157
- getAvoidPolygons(): LngLat[][];
158
- // 设置避让道路名称,只支持一条避让道路 注:避让道路和避让区域不能同时使用
159
- setAvoidRoad(value: string): void;
160
- // 清除避让道路
161
- clearAvoidRoad(): void;
162
- // 获取避让道路
163
- getAvoidRoad(): string;
164
- // 设置车牌的汉字首字符和首字后的号码,设置后路线规划的结果将考虑该车牌在当前时间的限行路段
165
- setProvinceAndNumber(province: string, number: string);
166
- // 设置驾车路线规划策略
167
- setPolicy(policy: any): void;
168
- }
169
- }
170
- }
@@ -1,217 +0,0 @@
1
- export {};
2
-
3
- declare global {
4
- // eslint-disable-next-line @typescript-eslint/no-namespace
5
- namespace AMap {
6
- export interface GeocoderOptions {
7
- // 城市,地理编码时,设置地址描述所在城市
8
- // 可选值:城市名(中文或中文全拼)、citycode、adcode
9
- // 默认值:“全国”
10
- city?: string;
11
- // 逆地理编码时,以给定坐标为中心点,单位:米
12
- // 取值范围:0 - 3000
13
- // 默认值:1000
14
- radius?: number;
15
- // 设置语言类型
16
- // 可选值:zh_cn(中文)、en(英文)
17
- // 默认值:zh_cn(中文
18
- lang?: string;
19
- // 是否批量查询
20
- // 设置为 false 时,只返回第一条记录
21
- batch?: boolean;
22
- // 逆地理编码时,返回信息的详略
23
- // 默认值:base,返回基本地址信息
24
- // 取值为:all,返回地址信息及附近poi、道路、道路交叉口等信息
25
- extensions?: string;
26
- }
27
-
28
- export interface GeocoderResult {
29
- // 查询状态说明
30
- info: string;
31
- // 输入提示条数
32
- count: number;
33
- // 地理编码信息列表
34
- geocodes: GeocodeItem[];
35
- }
36
-
37
- export interface GeocodeItem {
38
- // 国家 国内地址默认返回中国
39
- country;
40
- // 地址所在的省份名 例如:北京市。此处需要注意的是,中国的四大直辖市也算作省级单位。
41
- province;
42
- // 地址所在的城市名 例如:北京市
43
- city;
44
- // 城市编码 例如:010
45
- citycode;
46
- // 地址所在的区 例如:朝阳区
47
- district;
48
- // 街道 例如:阜通东大街
49
- street;
50
- // 门牌 例如:6号
51
- number;
52
- // 区域编码 例如:110101
53
- adcode;
54
- // 坐标点 经度,纬度
55
- location;
56
- // 匹配级别 参见下方的地理编码匹配级别列表
57
- level;
58
- }
59
-
60
- export interface ReGeocoderResult {
61
- // 查询状态说明
62
- info: string;
63
- // 输入提示条数
64
- count: number;
65
- // 逆地理编码信息
66
- regeocode: RegeocodeItem;
67
- }
68
-
69
- export interface RegeocodeItem {
70
- // 地址元素
71
- addressComponent: AddressComponent;
72
- // 道路信息列表
73
- roads: Road[];
74
- formattedAddress: string;
75
- // 道路交叉口列表
76
- roadinters: Roadinter[];
77
- // poi信息列表
78
- pois: POI[];
79
- // aoi信息列表
80
- aois: AOI[];
81
- }
82
-
83
- // 社区信息
84
- export interface Neighborhood {
85
- // 社区名称 例如:北京大学
86
- name: string;
87
- // POI类型 例如:科教文化服务;学校;高等院校
88
- type: string;
89
- }
90
- // 楼信息
91
- export interface Building {
92
- // 建筑名称 例如:万达广场
93
- name: string;
94
- // 类型 例如:科教文化服务;学校;高等院校
95
- type: string;
96
- }
97
- // 门牌信息
98
- export interface StreetNumber {
99
- // 街道名称 例如:中关村北二条
100
- street: string;
101
- // 门牌号 例如:3号
102
- number: string;
103
- // 坐标点 经纬度坐标点:经度,纬度
104
- location: string;
105
- // 方向 坐标点所处街道方位
106
- direction: string;
107
- // 门牌地址到请求坐标的距离 单位:米
108
- distance: string;
109
- }
110
- // 商圈信息
111
- export interface BusinessArea {
112
- // 商圈中心点经纬度
113
- location: string;
114
- // 商圈名称 例如:颐和园
115
- name: string;
116
- // 商圈所在区域的adcode 例如:朝阳区/海淀区
117
- id: string;
118
- }
119
- // 道路信息
120
- export interface Road {
121
- // 道路id
122
- id: string;
123
- // 道路名称
124
- name: string;
125
- // 道路到请求坐标的距离 单位:米
126
- distance: string;
127
- // 方位 输入点和此路的相对方位
128
- direction: string;
129
- // 坐标点
130
- location: string;
131
- }
132
- // 道路交叉口信息,请求参数 extensions 为 all 时返回如下内容
133
- export interface Roadinter {
134
- // 交叉路口到请求坐标的距离 单位:米
135
- distance: string;
136
- // 方位 输入点相对路口的方位
137
- direction: string;
138
- // 路口经纬度
139
- location: string;
140
- // 第一条道路id
141
- first_id: string;
142
- // 第一条道路名称
143
- first_name: string;
144
- // 第二条道路id
145
- second_id: string;
146
- // 第二条道路名称
147
- second_name: string;
148
- }
149
-
150
- export interface AOI {
151
- // 所属 aoi的id
152
- id: string;
153
- // 所属 aoi 名称
154
- name: string;
155
- // 所属 aoi 所在区域编码
156
- adcode: string;
157
- // 所属 aoi 中心点坐标
158
- location: string;
159
- // 所属aoi点面积 单位:平方米
160
- area: string;
161
- // 输入经纬度是否在aoi面之中 "0,代表在aoi内, 其余整数代表距离AOI的距离"
162
- distance: string;
163
- // 所属 aoi 类型
164
- type: string;
165
- }
166
-
167
- export interface AddressComponent {
168
- // 国家名称,例如: 日本
169
- country: string;
170
- // 坐标点所在省名称 例如:北京市
171
- province: string;
172
- // 坐标点所在城市名称 请注意:当城市是省直辖县时返回为空,以及城市为北京、上海、天津、重庆四个直辖市时,该字段返回为空;省直辖县列表
173
- city: string;
174
- // 城市编码 例如:010
175
- citycode: string;
176
- // 坐标点所在区 例如:海淀区
177
- district: string;
178
- // 行政区编码 例如:110108
179
- adcode: string;
180
- // 坐标点所在乡镇/街道(此街道为社区街道,不是道路信息) 例如:燕园街道
181
- township: string;
182
- // 乡镇街道编码 例如:110101001000
183
- towncode: string;
184
- // 社区信息
185
- neighborhood: Neighborhood;
186
- // 楼信息
187
- building: Building;
188
- // 门牌信息
189
- streetNumber: StreetNumber;
190
- // 所属海域信息
191
- seaArea: string;
192
- // 经纬度所属商圈列表
193
- businessAreas: BusinessArea[];
194
- }
195
-
196
- export type GeocoderCallback = (
197
- // 返回信息状态 可取值:'complete': result 为 AutocompleteResult; 'error': result为错误信息;'no_data': result 为 0
198
- status: "complete" | "error" | "no_data",
199
- result: GeocoderResult | Error | 0
200
- ) => void;
201
-
202
- export type ReGeocoderCallback = (
203
- status: "complete" | "error" | "no_data",
204
- result: ReGeocoderResult | Error | 0
205
- ) => void;
206
-
207
- export class Geocoder {
208
- constructor(option: GeocoderOptions);
209
- // 将地址信息转化为高德经纬度坐标信息
210
- getLocation(keyword: string, callback: GeocoderCallback): void;
211
- // 地理编码时,设置地址描述所在城市
212
- setCity(city: string);
213
- // 将高德经纬度坐标信息转化为结构化的地址信息
214
- getAddress(location: LngLat | LngLat[], callback: ReGeocoderCallback);
215
- }
216
- }
217
- }
@@ -1,11 +0,0 @@
1
- export enum AnchorType {
2
- topLeft = "top-left",
3
- topCenter = "top-center",
4
- topRight = "top-right",
5
- middleLeft = "middle-left",
6
- center = "center",
7
- middleRight = "middle-right",
8
- bottomLeft = "bottom-left",
9
- bottomCenter = "bottom-center",
10
- bottomRight = "bottom-right",
11
- }
@@ -1,114 +0,0 @@
1
- export {};
2
-
3
- declare global {
4
- // eslint-disable-next-line @typescript-eslint/no-namespace
5
- namespace AMap {
6
- export interface CityInfo {
7
- // 建议城市名称
8
- name: string;
9
- // 城市编码
10
- citycode: string;
11
- // 行政区编码
12
- adcode: string;
13
- // 该城市的建议结果数目
14
- count: string;
15
- }
16
- export interface POI {
17
- // 兴趣点id
18
- id: string;
19
- // 名称
20
- name: string;
21
- // 兴趣点类型
22
- type: string;
23
- // 兴趣点经纬度
24
- location: AMap.LngLat;
25
- // 地址
26
- address: string;
27
- // 离中心点距离,仅周边查询返回
28
- distance?: number;
29
- // 电话
30
- tel?: string;
31
- // 网址
32
- website?: string;
33
- // poi所在省份编码
34
- pcode: string;
35
- // poi所在城市编码
36
- citycode: string;
37
- // poi所在区域编码
38
- adcode: string;
39
- // 邮编
40
- postcode: string;
41
- // poi所在省份
42
- pname: string;
43
- // poi所在城市名称
44
- cityname: string;
45
- // poi所在行政区名称
46
- adname: string;
47
- // 电子邮箱
48
- email?: string;
49
- // 入口经纬度,POI点有出入口信息时返回,否则返回空字符串
50
- entr_location: string;
51
- // 出口经纬度,POI点有出入口信息时返回,否则返回空字符串
52
- exit_location: string;
53
- }
54
- export interface PlaceSearchResult {
55
- // 成功状态说明
56
- info: string;
57
- // 发生事件且查无此关键字时,返回建议关键字列表,可根据建议关键字查询
58
- keywordList?: string[];
59
- // 发生事件且查无此关键字且 city 为“全国”时,返回城市建议列表,该列表中每个城市包含一个或多个相关Poi点信息
60
- cityList?: CityInfo[];
61
- // 发生事件时返回兴趣点列表
62
- poiList: {
63
- // 页码
64
- pageIndex: number;
65
- // 单页结果数
66
- pageSize: number;
67
- // 查询结果总数
68
- count: number;
69
- // Poi列表
70
- pois: POI[];
71
- };
72
- }
73
-
74
- export type PlaceSearchCallback = (
75
- status: "complete" | "error" | "no_data",
76
- result: PlaceSearchResult | Error | 0
77
- ) => void;
78
- export interface PlaceSearchOptions {
79
- //城市
80
- city?: string;
81
- //数据类别
82
- type?: string;
83
- //每页结果数,默认10
84
- pageSize?: number;
85
- //请求页码,默认1
86
- pageIndex?: number;
87
- //返回信息详略,默认为base(基本信息)
88
- extensions?: string;
89
- }
90
- export class PlaceSearch {
91
- constructor(option: PlaceSearchOptions);
92
- // 根据输入关键字提示匹配信息,支持中文、拼音
93
- search(keyword: string, callback: PlaceSearchCallback): void;
94
- // 根据范围和关键词进行范围查询
95
- searchInBounds(
96
- // 关键词
97
- keyword: string,
98
- // 范围
99
- bounds: Bounds,
100
- // 搜索结果回调
101
- callback: PlaceSearchCallback
102
- ): void;
103
- // 根据中心点经纬度、半径以及关键字进行周边查询 radius取值范围:0-50000
104
- searchNearBy(
105
- // 关键词
106
- keyword: string,
107
- // 中心点经纬度
108
- center: LngLat,
109
- // 半径
110
- radius: number
111
- ): void;
112
- }
113
- }
114
- }
@@ -1,27 +0,0 @@
1
- export {};
2
-
3
- declare global {
4
- // eslint-disable-next-line @typescript-eslint/no-namespace
5
- namespace AMap {
6
- export type PluginName =
7
- | "PlaceSearch"
8
- | "AutoComplete"
9
- | "Driving"
10
- | "Walking"
11
- | "Transfer"
12
- | "Riding"
13
- | "Truck"
14
- | "Geocoder"
15
- | "LineSearch"
16
- | "StationSearch"
17
- | "Weather"
18
- | "ToolBar"
19
- | "Scale"
20
- | "Geolocation"
21
- | "PolylineEditor"
22
- | "PolylgonEditor"
23
- | "CircleEditor"
24
- | "MouseTool"
25
- | "RangingTool";
26
- }
27
- }
@@ -1,78 +0,0 @@
1
- export {};
2
-
3
- declare global {
4
- // eslint-disable-next-line @typescript-eslint/no-namespace
5
- namespace AMap {
6
- export interface WalkingOptions {
7
- // 展现结果的地图实例。当指定此参数后,搜索结果的标注、线路等均会自动添加到此地图上。可选
8
- map?: AMap.Map;
9
- // 结果列表的HTML容器id或容器元素,提供此参数后,结果列表将在此容器中进行展示。可选
10
- panel?: string | HTMLElement;
11
- // 设置隐藏路径规划的起始点图标 设置为true:隐藏图标;设置false:显示图标\n默认值为:false 显示绿色代表畅通,黄色代表轻微拥堵,红色代表比较拥堵,灰色表示无路况信息。(default false)
12
- hideMarkers?: boolean;
13
- // 使用map属性时,绘制的规划线路是否显示描边。缺省为true
14
- isOutline?: boolean;
15
- // 使用map属性时,绘制的规划线路的描边颜色。缺省为'white'
16
- outlineColor?: string;
17
- // 用于控制在路径规划结束后,是否自动调整地图视野使绘制的路线处于视口的可见范围
18
- autoFitView?: boolean;
19
- }
20
-
21
- export interface WalkRoute {
22
- // 起点到终点总步行距离,单位:米
23
- distance: number;
24
- // 步行时间预计,单位:秒
25
- time: number;
26
- // 路段列表,以道路名称作为分段依据,将整个步行导航方案分隔成若干路段
27
- steps: WalkStep[];
28
- }
29
-
30
- export interface WalkStep {
31
- // 步行子路段描述,规则:沿 road步行 distance 米 action,例:”沿北京站街步行351米”
32
- instruction: string;
33
- // 步行子路段距离,单位:米
34
- distance: number;
35
- // 步行子路段预计使用时间,单位:秒
36
- time: number;
37
- // 步行子路段坐标集合
38
- path: LngLat[];
39
- // 道路
40
- road: string;
41
- // 本步行子路段完成后动作
42
- action: string;
43
- // 步行子路段完成后辅助动作,一般为到达某个公交站点或目的地时返回
44
- assist_action: string;
45
- }
46
-
47
- export interface WalkingResult {
48
- // 成功状态说明
49
- info: string;
50
- // 步行规划起点坐标
51
- origin: LngLat;
52
- // 步行规划终点坐标
53
- destination: LngLat;
54
- // 步行规划起点
55
- start: POI;
56
- // 步行规划终点
57
- end: POI;
58
- // 步行导航路段数目
59
- count: number;
60
- // 步行规划路线列表
61
- routes: WalkRoute[];
62
- }
63
-
64
- export type WalkingCallback = (
65
- // 返回信息状态 可取值:'complete': result 为 WalkingResult; 'error': result为错误信息;'no_data': result 为 0
66
- status: "complete" | "error" | "no_data",
67
- result: WalkingResult | Error | 0
68
- ) => void;
69
-
70
- export class Walking {
71
- constructor(option: WalkingOptions);
72
- // 根据起点、终点坐标,实现步行路线规划
73
- search(origin: LngLat, destination: LngLat, callback: WalkingCallback): void;
74
- // 清除搜索的结果
75
- clear(): void;
76
- }
77
- }
78
- }
@@ -1,10 +0,0 @@
1
- export {};
2
-
3
- declare module "vue" {
4
- interface ComponentCustomProps {
5
- className?: string;
6
- }
7
- interface HTMLAttributes {
8
- className?: string;
9
- }
10
- }