wechat/location

location module provides location API bindings details in wechat document

Values

pub fn choose_location(
  latitude lat: Float,
  longitude lon: Float,
  complete cb: fn() -> Nil,
) -> promise.Promise(Result(object.JsObject, object.WechatError))

wx.chooseLocation Open map to select location

pub fn get_location(
  altitude a: Bool,
  complete cb: fn() -> Nil,
) -> promise.Promise(Result(object.JsObject, object.WechatError))

wx.getLocation Get current geographic location

pub fn open_location(
  latitude lat: Float,
  longitude lon: Float,
  scale s: Int,
  name n: String,
  address a: String,
  complete cb: fn() -> Nil,
) -> promise.Promise(Result(object.JsObject, object.WechatError))

wx.openLocation Use built-in map to view location

Search Document