- bindmarkertap,bindcallouttap 真机无触发事件
wxml 代码 [代码]<[代码][代码]view[代码] [代码]class[代码][代码]=[代码][代码]"page"[代码][代码]>[代码][代码] [代码][代码]<[代码][代码]map[代码] [代码]id[代码][代码]=[代码][代码]"myMap"[代码] [代码]class[代码][代码]=[代码][代码]"mapview"[代码] [代码]style[代码][代码]=[代码][代码]"height: {{mapStyle.height}};"[代码] [代码]longitude[代码][代码]=[代码][代码]"{{longitude}}"[代码][代码] [代码][代码]latitude[代码][代码]=[代码][代码]"{{latitude}}"[代码] [代码]scale[代码][代码]=[代码][代码]"{{zoom}}"[代码] [代码]show-location[代码][代码] [代码][代码]markers[代码][代码]=[代码][代码]"{{markers}}"[代码] [代码]controls[代码][代码]=[代码][代码]"{{controls}}"[代码] [代码]bindmarkertap[代码][代码]=[代码][代码]"markertap"[代码] [代码]bindcallouttap[代码][代码]=[代码][代码]"markertap"[代码][代码] [代码][代码]bindcontroltap[代码][代码]=[代码][代码]"controltop"[代码][代码]/>[代码][代码]</[代码][代码]view[代码][代码]>[代码]js 代码 [代码]datas.forEach((item, index) => {[代码][代码] [代码][代码]let point = MapUtil.bd09ToGcj02(item.latitude, item.longitude);[代码][代码] [代码][代码]temp.push({[代码][代码] [代码][代码]id: index,[代码][代码] [代码][代码]longitude: point.longitude,[代码][代码] [代码][代码]latitude: point.latitude,[代码][代码] [代码][代码]name: item.name,[代码][代码] [代码][代码]callout: {[代码][代码] [代码][代码]content: item.name,[代码][代码] [代码][代码]borderRadius: 20,[代码][代码] [代码][代码]color: [代码][代码]'#000000'[代码][代码],[代码][代码] [代码][代码]fontSize: 12,[代码][代码] [代码][代码]padding: 10,[代码][代码] [代码][代码]display: [代码][代码]'ALWAYS'[代码][代码] [代码][代码]}[代码][代码] [代码][代码]});[代码][代码] [代码][代码]});[代码] [代码] [代码][代码]this[代码][代码].setData({[代码][代码] [代码][代码]markers: datas[代码][代码] [代码][代码]})[代码][代码]markertap(e) {[代码][代码] [代码][代码]wx.showToast({[代码][代码] [代码][代码]title: [代码][代码]'测试'[代码] [代码]+ e.markerId[代码][代码] [代码][代码]});[代码][代码] [代码][代码]console.log(e);[代码][代码] [代码][代码]/**[代码][代码] [代码][代码]* 打开本地地图界面[代码][代码] [代码][代码]*/[代码][代码] [代码][代码]wx.openLocation({[代码][代码] [代码][代码]latitude: [代码][代码]this[代码][代码].data.markers[e.markerId].latitude,[代码][代码] [代码][代码]longitude: [代码][代码]this[代码][代码].data.markers[e.markerId].longitude,[代码][代码] [代码][代码]name: [代码][代码]this[代码][代码].data.markers[e.markerId].name[代码][代码] [代码][代码]})[代码][代码]},[代码] 模拟器上点击marker,气泡都能正常触发. 真机预览却没有任何响应. 因为也看不到log,所以也不知道是代码报错?还是bug. 设备 iPhone 6 , 微信版本:6.5.8 基础库版本: 1.2.3 设备 iPhone 5s , 微信版本:6.5.8 基础库版本: 1.2.2
2017-06-02 - 0.17.170800 mac 开发者工具 开启代码压缩上传后样式异常
刚更新了0.17.170800 mac. 现在预览项目时,如果勾选上‘开启代码压缩上传’. 部分页面会出现样式错误. 关闭就好了. 是因为新增的‘wxss文件代码压缩功能’ bug吗?
2017-05-09