search.d.ts 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /**
  2. * 地图搜索 请求参数定义
  3. * @apiName biz.map.search
  4. */
  5. export interface IBizMapSearchParams {
  6. /** 非必须字段,需要和longitude组合成合法经纬度,高德坐标 */
  7. latitude: number;
  8. /** 非必须字段,需要和latitude组合成合法经纬度,高德坐标 */
  9. longitude: number;
  10. /** 搜索范围,建议不要设置过低,否则可能搜索不到POI */
  11. scope: number;
  12. }
  13. /**
  14. * 地图搜索 返回结果定义
  15. * @apiName biz.map.search
  16. */
  17. export interface IBizMapSearchResult {
  18. /** POI所在省会,可能为空 */
  19. province: string;
  20. /** POI所在省会编码,可能为空 */
  21. provinceCode: string;
  22. /** POI所在城市,可能为空 */
  23. city: string;
  24. /** POI所在城市的编码,可能为空 */
  25. cityCode: string;
  26. /** POI所在区,可能为空 */
  27. adName: string;
  28. /** POI所在区的编码,可能为空 */
  29. adCode: string;
  30. /** POI与设备位置的距离 */
  31. distance: string;
  32. /** POI的邮编,可能为空 */
  33. postCode: string;
  34. /** POI的街道地址,可能为空 */
  35. snippet: string;
  36. /** POI的名称 */
  37. title: string;
  38. /** POI的纬度,高德坐标 */
  39. latitude: number;
  40. /** POI的经度,高德坐标 */
  41. longitude: number;
  42. }
  43. /**
  44. * 地图搜索
  45. * 唤起地图页面,根据设备位置或者传入的经纬度搜索POI。
  46. * @apiName biz.map.search
  47. * @supportVersion ios: 2.4.0 android: 2.4.0
  48. */
  49. export declare function search$(params: IBizMapSearchParams): Promise<IBizMapSearchResult>;
  50. export default search$;