- 小程序map组件中使用了cover-view,给它添加的点击事件无效?或者不能添加点击事件?
我在map组件中使用了cover-view ,并添加了点击事件,但是无效 <map id="map" latitude="{{latitude}}" longitude="{{longitude}}" scale="{{scale}}" min-scale="{{minscale}}" enable-poi="{{enablepoi}}" polyline="{{polyline}}" polygons="{{polygons}}" scale="{{scale}}" skew="{{skew}}" enable-3D="{{setting.enable3D}}" markers="{{markers}}" bindtap="onTapMap" bindregionchange="bindregionchange" bindmarkertap="bindmarkertap"> <block wx:for="{{markers}}" wx:key="id"> <cover-view slot="callout"> <cover-view class="customCallout pr" marker-id="{{item.id}}" bindtap="clickMap"> <cover-view class="callout-warp display-f"> <cover-view class="item"> <cover-view class="text-c">问题总数</cover-view> <cover-view class="text-c count">20</cover-view> </cover-view> <cover-view class="item"> <cover-view class="text-c">未整改</cover-view> <cover-view class="text-c count">20</cover-view> </cover-view> <cover-view class="item"> <cover-view class="text-c">整改率排名</cover-view> <cover-view class="text-c count">20</cover-view> </cover-view> </cover-view> <cover-image class="icon-down pa" src="/assets/images/icon_down.png" /> <cover-image class="icon-avatar pa" src="{{item.avatar}}" /> <cover-view class="mapName pa" bindtap="clickMap">{{item.title}}</cover-view> </cover-view> </cover-view> </block> </map>
09-02 - 为什么小程序地图3D模式,在模拟器上正常显示,但是在手机上无论预览真机都没任何3D效果?
为什么我新建了一个小程序项目,上面的地图只有在模拟器上才有3D效果,用手机预览或真机都没效果,但是又在提供的代码片段上又有3D效果,代码完全一样的啊。 手机型号:IOS 17.5.1 微信版本号:8.0.50 这是模拟器上的效果: [图片] 这是我手机上的 [图片]
08-21 - 为什么小程序地图3D模式,在模拟器上正常显示,但是在安卓和IOS上预览真机都没任何3D效果?
<map id="map" polygon="{{polygon}}" longitude="{{longitude}}" latitude="{{latitude}}" scale="{{scale}}" show-location="{{showLocation}}" enable-3D="{{enable3D}}" show-compass="{{showCompass}}" enable-overlooking="{{enableOverlooking}}" enable-building="{{enablebuilding}}" enable-traffic="{{enableTraffic}}" skew="{{skew}}" markers="{{markers}}" bindregionchange="bindregionchange" bindtap="clickMap" > </map> markers:[ {id:0,latitude:'34.07813376383551',longitude:'108.84553627268303',title:"这里是点位标题",iconPath: "../../assets/images/love.png",width:36, height:36}, {id:1,latitude:'34.07845355118568',longitude:'108.97297261453014',title:"这里是点位标题2",iconPath: "../../assets/images/love2.png",width:26, height:26}, {id:1,latitude:'34.141385451306554',longitude:'108.8905864564781',title:"这里是点位标题2",iconPath: "../../assets/images/love2.png",width:26, height:26} ], longitude:'108.94878', latitude: '34.22259', scale:17,//缩放级别 //minScale:3,//最小缩放级别 min-scale //maxScale:20,//最大缩放级别 max-scale skew:45,//倾斜角度,范围 0 ~ 40 , 关于 z 轴的倾角 showLocation:true,//显示带有方向的当前定位点 //polygons:[],//多边形 subkey:'',//地图能力【个性化地图】使用的key,不支持动态修改 enable3D:true,// showCompass:true,//显示指南针 enableOverlooking:true,//开启俯视 enablebuilding:true,//是否展示建筑物 enableTraffic:true,//是否开启实时路况
08-16