收藏
回答

使用map的过程中 callout 开发者工具和真机上的区别

markers: [{
   iconPath: "/images/icon/map_point.png",
   id: 0,
   latitude: 31.296970,
   longitude: 121.300510,
   width: 20,
   height: 20,
   callout: {
     content: "111111111",
     padding: 10,
     display: 'BYCLICK',
     textAlign: 'center',
   }
 }, {
   iconPath: "/images/icon/map_point.png",
   id: 1,
   latitude: 31.297511,
   longitude: 121.302816,
   width: 20,
   height: 20,
   callout: {
     content: "2222222222",
     padding: 10,
     display: 'BYCLICK',
     textAlign: 'center',
   }
 }, {
   iconPath: "/images/icon/map_point.png",
   id: 2,
   latitude: 31.298483,
   longitude: 121.305230,
   width: 20,
   height: 20,
   callout: {
     content: "33333333333",
     padding: 10,
     display: 'BYCLICK',
     textAlign: 'center',
   }
 }],

 

<map longitude="121.303685" latitude="31.297593" style='width:100%;height:100vh' polyline='{{polyline}}' markers='{{markers}}' bindmarkertap="makertap">
 
</map>

一共有三个点  我在开发者工具上面 点击第一个后 显示 再点第二个点 第一个点的callout 就消失了  但是 换到真机上面 我点第二个点 第一个点的callout并没有消失 请问 有没有大神遇到过这种问题呢

最后一次编辑于  2019-06-28
回答关注问题邀请回答
收藏

2 个回答

  • 鸿宇
    鸿宇
    2020-03-10

    这个问题1年多了吧 还没解决么


    2020-03-10
    有用
    回复
  • 是小白啊
    是小白啊
    2019-06-28

    安卓还是iOS呢?麻烦提供出现问题的具体机型、微信版本号、系统版本号,以及能复现问题的代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)

    2019-06-28
    有用
    回复 5
    • =_=
      =_=
      2019-06-28
      Page({
       
        /**
         * 页面的初始数据
         */
        data: {
          polyline: [{
              points: [{
                longitude: 121.300510,
                latitude: 31.296970
              }, {
                longitude: 121.302816,
                latitude: 31.297511
              }],
              color: "#FF0000DD",
              width: 2,
              dottedLine: false
            },
            {
              points: [{
                longitude: 121.302816,
                latitude: 31.297511
              }, {
                longitude: 121.305230,
                latitude: 31.298483
              }],
              color: "#000000DD",
              width: 2,
              dottedLine: false
       
            }
          ],
       
          markers: [{
            iconPath: "/images/icon/map_point.png",
            id: 0,
            latitude: 31.296970,
            longitude: 121.300510,
            width: 20,
            height: 20,
            callout: {
              content: "111111111",
              padding: 10,
              display: 'BYCLICK',
              textAlign: 'center',
              bgColor: '',
            }
          }, {
            iconPath: "/images/icon/map_point.png",
            id: 1,
            latitude: 31.297511,
            longitude: 121.302816,
            width: 20,
            height: 20,
            callout: {
              content: "2222222222",
              padding: 10,
              display: 'BYCLICK',
              textAlign: 'center',
              bgColor: '',
            }
          }, {
            iconPath: "/images/icon/map_point.png",
            id: 2,
            latitude: 31.298483,
            longitude: 121.305230,
            width: 20,
            height: 20,
            callout: {
              content: "33333333333",
              padding: 10,
              display: 'BYCLICK',
              textAlign: 'center',
              bgColor:'',
            }
          }],
       
          isshowMark: true,
          islineshow: true,
          iscenter:true,
        },
       
        makertap: function(e) {
       
        },
       
        
      })
      <!--index.wxml-->
      <map longitude="{{iscenter ? '121.303685' : '' }}" latitude="{{iscenter? '31.297593' :''}}" style='width:100%;height:100vh' polyline="{{islineshow?polyline:''}}" markers="{{isshowMark ? markers:''}}" bindmarkertap="makertap">
        <cover-view bindtap='add'>增加</cover-view>
        <cover-view bindtap='showpoint'> 隐藏/显示监测点</cover-view>
        <cover-view bindtap='showline'>隐藏/显示航线</cover-view>
        <cover-view bindtap='center'>置不置中</cover-view>
      </map>

      android 机器  手机是realme X RMX1901  微信版本7.0.4 android 9.0

      2019-06-28
      回复
    • 是小白啊
      是小白啊
      2019-06-28回复=_=

      代码片段(https://developers.weixin.qq.com/miniprogram/dev/devtools/minicode.html)这个格式

      2019-06-28
      回复
    • =_=
      =_=
      2019-06-28回复是小白啊

      https://developers.weixin.qq.com/s/6AGGYsmb7o9J    

      2019-06-28
      回复
    • =_=
      =_=
      2019-07-04回复是小白啊

      你们那边能复现这个问题么

      2019-07-04
      回复
    • 晨风
      晨风
      2020-02-14
      请问解决了么?我也遇到这个问题
      2020-02-14
      回复
登录 后发表内容