收藏
回答

marker 上的气泡 label与Icon重叠导致Label显示不出来

回答关注问题邀请回答
收藏

5 个回答

  • 禾店短剧系统
    禾店短剧系统
    2021-06-02

    marker = new SimpleMarker({


          //直接使用dom节点
          iconStyle: '<div style="background:gray;width:50px;height:20px;border-radius:10px;"></div>',
          //图标文字
          iconLabel: {
            innerHTML: realName,
          },
    
          map: map,
    
          position: [lng, lat],
    
          showPositionPoint: false,
    
          // 以 icon 的 [center bottom] 为原点
          offset: new AMap.Pixel(-30, -10)
        });
          marker.setLabel({
            //修改label相对于maker的位置
            offset: new AMap.Pixel(-15, -23),
    
            content: "<div style='width:80px;'><div class='direction' style='float:left;-webkit-transform:rotate(" + direction + "deg);'></div><div style='float:left;'>&nbsp;&nbsp;&nbsp;&nbsp;"  + stayTime + "min" + "</div></div>"
          });
        }
    


    2021-06-02
    有用 1
    回复
  • magic
    magic
    2019-12-10

    修复了吗,我是点击icon,然后icon上边的文字就没了

    2019-12-10
    有用
    回复 1
    • 黄粱
      黄粱
      2020-03-04
      我也是这个问题,请问你解决了吗
      2020-03-04
      回复
  • hi~
    hi~
    2018-10-30

    遇到一样的问题,有解决方案么

    2018-10-30
    有用
    回复 1
    • 2018-10-30

      这个问题早就有了,官方一直视而不见。已经看到好多帖子了。

      2018-10-30
      回复
  • Hellen
    Hellen
    2018-10-25

    marker 上的气泡 label与Icon重叠导致Label显示不出来,我也是这个问题,在开发工具中可以,真机上有的能显示,有的不能显示。现在这个问题有跟进吗


    2018-10-25
    有用
    回复
  • 是小白啊
    是小白啊
    2018-09-18

    你好,请提供一下出现问题的机型和微信版本,以及能复现问题的简单代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)。

    2018-09-18
    有用
    回复 1
    • waylee
      waylee
      2018-10-16

      我也遇到这个问题,某些机型不显示marker中label的content

      2018-10-16
      回复
登录 后发表内容