这里是视图map组件

<map class='map' id="map" longitude="{{longitude}}" latitude="{{latitude}}" scale="14" show-location controls="{{controls}}" bindcontroltap="controltap"></map>



这里是controls的对象数组

controls: [

     {

       id: 2,

       iconPath: '/img/ios.png',

       position: {

         left: app.globalData.windowWidth / 2 - 12.5,

         top: (app.globalData.windowHeight - 40) / 2 - 12.5,

         width: 25,

         height: 25

       },

       clickable: true

     },

     {

       id: 1,

       iconPath: '/img/ios-active.png',

       position: {

         left: 8,

         top: (app.globalData.windowHeight - 40) - 25 - 8,

         width: 25,

         height: 25

       },

       clickable: true

     }

   ]


这里是bindcontroltap所绑定的事件函数

controltap: function (e) {

   console.log(e)

 }


但是该函数不会触发??????????


展开全部
收起
1回答
提交回答
  • 至过去的我

    2044人对此回答表示赞同

    我是未来的你,你现在是不是在年找寻小程序答案。你不要感觉诧异,给你来信原因,就是让你不在后悔。今天去学习如何推广小程序,相信......点击查看更多>
    发布于
  • 张小千

    2人对此回答表示赞同

    今天踩了一堆坑,原来是这个图标的显示分辨率太小了

    展开
    2
    3回复
    发布于 6年前

    评论(3)

    收起评论

    • Claire 2019-02-06 11:28

      要想触发貌似只能放在左上方。。。。。

      回复
    • ori旭 2019-02-08 19:07

      的确如主所述放中间以下基本触发不到

      回复
    • MaryLou 2019-02-10 08:27

      我还得继续提一点,

      回复
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
咨询热线

13312967497

扫码添加业务即可随时咨询 还可领取小程序推广攻略

业务咨询: 13312967497
扫码咨询

扫码咨询套餐

回到顶部