zhizhi/node_modules/dingtalk-jsapi/api/device/geolocation/get.d.ts

69 lines
3.3 KiB
TypeScript
Raw Normal View History

/**
*
* @apiName device.geolocation.get
*/
export interface IDeviceGeolocationGetParams {
/**
*
* accuracy
* 200m
*
*/
targetAccuracy: number;
/** 1获取高德坐标 0获取标准坐标推荐使用高德坐标标准坐标没有address字段 */
coordinate: number;
/** 是否需要带有逆地理编码信息;该功能需要网络请求,请更具自己的业务场景使用 */
withReGeocode: boolean;
/** 是否缓存地理位置信息。默认是true。如果true客户端会对定位的地理位置信息缓存在缓存期内2分钟再次定位会返回旧的定位 */
useCache: boolean;
}
/**
*
* @apiName device.geolocation.get
*/
export interface IDeviceGeolocationGetResult {
/** 经度 */
longitude: number;
/** 纬度 */
latitude: number;
/** 实际的定位精度半径(单位米) */
accuracy: number;
/** 格式化地址,如:北京市朝阳区南磨房镇北京国家广告产业园区 */
address: string;
/** 省份,如:北京市 */
province: string;
/** 城市,直辖市会返回空 */
city: string;
/** 行政区,如:朝阳区 */
district: string;
/** 街道西大望路甲12-2号楼 */
road: string;
/** 当前设备网络类型wifi、3g等 */
netType: string;
/** 当前设备使用移动运营商CMCC等 */
operatorType: string;
/** 对错误码的描述 */
errorMessage?: string;
/** 错误码 */
errorCode?: number;
/** 仅Android支持wifi设置是否开启不保证已连接上 */
isWifiEnabled?: boolean;
/** 仅Android支持gps设置是否开启不保证已经连接上 */
isGpsEnabled?: boolean;
/** 仅Android支持定位返回的经纬度是否是模拟的结果 */
isFromMock?: boolean;
/** 仅Android支持我们使用的是混合定位具体定位提供者有wifi/lbs/gps" 这三种 */
provider?: 'wifi' | 'lbs' | 'gps';
/** 仅Android支持移动网络是设置是否开启不保证已经连接上 */
isMobileEnabled: boolean;
}
/**
* ()
* Android客户端返回坐标是高德坐标iOS客户端2.7.6IOS客户端低于2.7.6使APIDemo演示页面
* Android客户端2.1iOS客户端多嵌套一层location字段2.2iOS客户端一致location
* @apiName device.geolocation.get
* @supportVersion ios: 2.4.0 android: 2.4.0
*/
export declare function get$(params: IDeviceGeolocationGetParams): Promise<IDeviceGeolocationGetResult>;
export default get$;