收藏
回答

map组件的callout在小程序安卓端无法显示,开发者工具显示正常?

下面这个callout就是显示一个圆,里面有一些文字,但是在小程序安卓端看不到:<map id="areaMap" style="--mapTopOffset:{{mapTopOffset}}px" class="areaMap"

    circles="{{nearbyCircle}}" latitude="{{focusLat}}" longitude="{{focusLng}}" scale="{{mapScale}}"

    bindcallouttap="callouttap" bindmarkertap="callouttap"

    bindregionchange="mapRegionChange" markers="{{mapMarkers}}">

    <wxs module="_">

      module.exports.filter = function (arr, id) {

        return arr.filter(function (item) {

          return item.id === id;

        })[0];

      } 

    </wxs>

    <cover-view slot="callout">

      <cover-view class="customCallout" marker-id="0">111111</cover-view>

    </cover-view>

  </map>

经过验证把marker的alpha设为1就可以,但是0的时候在开发者工具是正常显示的,为什么这个marker的alpha值在真机上会影响callout的显示?因为本来的目的就是要隐藏marker的,只需要显示callout?

最后一次编辑于  2025-11-23
回答关注问题邀请回答
收藏

2 个回答

  • 社区技术运营专员--阳光
    社区技术运营专员--阳光
    2025-11-28

    请具体描述问题出现的流程,并提供能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。

    2025-11-28
    有用
    回复
  • 智能回答 智能回答 本次回答由AI生成
    2025-11-23
    有用
登录 后发表内容