Map自定义callout
使用自定义的CustomCallout后,在slot="callout"的子组件里绑定点击事件没有用,只能执行系统带的bindcallouttap事件。 <map
id="myMap"
style="width: 100%; height: 300px;"
latitude="{{latitude}}"
longitude="{{longitude}}"
bindmarkertap="markertap"
bindcallouttap="callouttap"
bindlabeltap="labeltap"
markers="{{markers}}"
scale="16"
>
<cover-view slot="callout">
<block wx:for="{{customCalloutMarkerIds}}" wx:key="*this">
<cover-view class="customCallout" marker-id="{{item}}" catchtap="handleTap">
<cover-image class="icon" src="/image/voice.png"></cover-image>
<cover-view class="content">
{{num}}-{{item}}-{{index}}
</cover-view>
</cover-view>
</block>
</cover-view>
</map>