收藏
回答

marker真机不显示

wx.request网络请求的数据,动态添加到marker上不显示


for (var j = 0, carlen = carList.length; j < carlen; j++) {
        var markerInfo = {
          iconPath: "../../images/home_car_icon.png",
          id: carList[j].carId,
          latitude: 30.25961,
          longitude: 120.13026,
          width: 50,
          height: 50,
          label:{
            content:"12",
            color:"#000",
          }
        }
        that.markers.push(markerInfo)
      }
      console.log(that.markers)
      that.setData({mapMarkers: that.markers})

求解决方案

回答关注问题邀请回答
收藏

2 个回答

登录 后发表内容