地图组件。当markers 比较多的时候目前测试发现超过300个,IOS就会闪退。
地图组件。当markers 比较多的时候目前测试发现超过300个,IOS就会闪退。 ios软件版本13.5.1 8plus 和ipnonex都会闪退。安卓和开发工具都没问题。 let markers=[]; let that = this let nID =0; let schoolData = app.globalData.markAll for (let item of schoolData) { let latitude = item.fshopLatitude; let longitude = item.fshopLongtitude; let marker = { iconPath: (item.bAuthoright == 1) ? "/image/point.png" :"/image/point-1.png", id: nID , name: item.strCustomName, latitude: latitude, longitude: longitude, width: 40, height: 40, callout: { content: item.strShopName + '\n' + item.strCustomName + '\n点击查看>>'|| '', color: "#ffffff", fontSize: "12", borderRadius: "7", bgColor: "#ffc773", padding: "7", display: "BYCLICK", textAlign: "center" } }; nID++ //if(nID>300) 大概260 都不会有问题。但是超过300就会闪退。 // continue markers.push(marker) } return markers;