// Marker初始化参数
let markerOptions: mapCommon.MarkerOptions = {
position: {
latitude: this.attendListItemInfo.lat,
longitude: this.attendListItemInfo.lng
},
rotation: 0,
visible: true,
zIndex: 0,
alpha: 1,
anchorU: 0.5,
anchorV: 1,
clickable: true,
draggable: true,
flat: false,
title: '地址标题'
};
// 创建Marker
this.marker = await this.mapController.addMarker(markerOptions);
相关地图组件 addMarker 及 自定义信息窗 的用法可参考官网示例 MarkerDemo ,链接如下:
https://developer.huawei.com/consumer/cn/doc/harmonyos-references-V5/map-mapcomponent-V5\#section01728713016