产品服务
解决方案
文档与支持
定价

方向图层

下载开发文档

可通过调用CompassLayer类方法或者属性进行定位位置、显示隐藏等控制,通过点击图标可重置地图方向。

MapComponent({ onReady: async (err, mapController) => {
if (!err) {
// 获取地图的控制器类,用来操作地图
this.mapController= mapController;
this.compass = this.mapController.getLayerByTag(SysEnum.LayerTag.COMPASS) as CompassLayer;
this.compass.x = 64;
this.compass.y = 64;
}
}, mapOptions: new MapOptions(null)}).width('100%').height('100%')

上一篇

位置短地址分享

下一篇

请求状态码说明

本篇文章对您是否有帮助?