开发 API 地图 MapContext MapContext.getRegion
# MapContext.getRegion
更新时间:2024-09-18 14:46:40
获取地图视野范围。
# getRegion(options?: GetRegionOptions): Promise<GetRegionOptionsSucRes>
# 参数
参数 | 类型 | 必填 |
---|---|---|
options | GetRegionOptions | 否 |
# GetRegionOptions
属性
属性 | 类型 | 必填 | 说明 |
---|---|---|---|
success | (result: GetRegionOptionsSucRes) => void | 否 | 接口调用成功的回调函数 |
fail | (error: APIError) => void | 否 | 接口调用失败的回调函数 |
complete | (resultOrError: GetRegionOptionsSucRes | APIError) => void | 否 | 接口调用结束的回调函数(调用成功、失败都会执行) |
# 返回值
# Promise<GetRegionOptionsSucRes>
GetRegionOptionsSucRes
属性
属性 | 类型 | 说明 |
---|---|---|
southwest | LngLat | 西南角经纬度 |
northeast | LngLat | 东北角经纬度 |
LngLat
属性
属性 | 类型 | 说明 |
---|---|---|
longitude | number | 经度 |
latitude | number | 纬度 |
上一篇:《MapContext.getCenterLocation》
下一篇:《MapContext.getScale》
仍有疑问? 前往社区提问