选择应用类型
企业内部应用开发

获取当前地图中心位置(getCenterLocation)

更新于 2024-01-11使用MapContext.getCenterLocation获取当前地图中心位置。

示例代码

Loading...

入参

Object 类型,属性如下:

参数

类型

是否必填

说明

success

Function

接口调用成功的回调函数。

fail

Function

接口调用失败的回调函数。

complete

Function

接口调用结束的回调函数(调用成功、失败都会执行)。

success 返回值

Object 类型,属性如下:

属性名

类型

描述

longitude

Number

经度。

latitude

Number

纬度。

兼容性

使用 dd.canIUse('createMapContext')进行可用性判断。

这篇文档是否有帮助?
点击纠错