getLightRhythmsCityInfo(data: CommonLonLatParams)
版本要求:
@tuya-miniapp/cloud-api≥1.0.5
描述
获取指定地理位置所在的城市信息。
参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
| 是 | 请求参数:bizId(业务 ID)、bizType(业务类型,0:设备 1:群组)、lon(经度)、lat(纬度) |
返回值
类型:Promise<GetLightRhythmsCityInfoResult>
包含 country(国家)、province(省份)、city(城市)
引用对象
interface
GetLightRhythmsCityInfoResult| 属性 | 类型 | 描述 |
|---|---|---|
country | string | 国家 |
province | string | 省份 |
city | string | 城市 |
合法值
CommonLonLatParams.bizType
| 值 | 说明 | 最低版本 |
|---|---|---|
0 | - | - |
1 | - | - |