mc.openLocation(Object object)

使用手机内置地图查看位置

Object object 参数

属性 类型 默认值 必填 说明
subKey String 地图使用的key,可前往各地图厂商开发者网站申请。
latitude Number 纬度,范围为-90~90,负数表示南纬。
longitude Number 经度,范围为-180~180,负数表示西经。
name String 位置名
address String 地址的详细说明
success Function 接口调用成功的回调函数
fail Function 接口调用失败的回调函数
complete Function 接口调用结束的回调函数(调用成功、失败都会执行)

示例代码:

mc.openLocation({
  subKey: 'xxxx-xxxx-xxxx',
  latitude: 32,
  longitude: 120,
  name: '位置名',
  address: '详细地址',
  complete: function(res){

  }
})

results matching ""

    No results matching ""

    results matching ""

      No results matching ""