ty.createMapContext(string mapId)
基础库 2.0.12 开始支持, 低版本需做兼容处理。
创建 map 上下文 MapContext 对象。
参数
string mapId
map 组件的 id
返回值
MapContext
MapContext 实例,可通过 ty.createMapContext 获取。
MapContext 通过 id 跟一个 map 组件绑定,操作对应的 map 组件。
方法
MapContext.addMarkers
添加 marker
MapContext.removeMarkers
移除 marker
MapContext.getScale
获取当前地图的缩放级别

最低0.47元/天 解锁文章
1226

被折叠的 条评论
为什么被折叠?



