# dcb.getLocationCoordinate

仅获取经纬度功能。

# 参数

属性 类型 默认值 必填 说明 最低版本
mustBeAuth

boolean

false

true 必须要获取到位置信息,仅展示“去设置”的提示弹窗; false 非必须获取到位置信息,展示“去设置”与“取消”的提示弹窗。

7.3.0

# 返回值

属性 类型 说明 最低版本
latitude

string

纬度,范围为 -90~90,北纬为正数,南纬为负数。

7.3.0
longitude

string

经度,范围为 -180~180,东经为正数,西经为负数。

7.3.0
coordType

string

baidu 百度经纬度坐标gcj 经国测局加密的坐标gps gps 获取的原始坐标

7.3.0

# 示例

const res = await dcb.getLocationCoordinate();
// 结果类似:
// {
//  'latitude' : "26.624501",
//  'longitude' : "106.650275",
//  'coordType' : "baidu",
// }

# 贡献者

上次更新时间: 3/29/2023, 3:15:58 PM