收藏
回答

addGroundOverlay 安卓手机上添加后不显示 success 有回调?

 onLoad() {
    this.createSelectorQuery().select('.map').fields({
      context: true
    }, res => {
      const map = res.context
      map.setBoundary({
        southwest: {
          longitude: 119.97963924174611,
          latitude: 30.14121591038157,
        },
        northeast: {
          longitude: 119.99129504819352,
          latitude: 30.160675813723522,
        },
      });
      [
        // 'https://obs-4e41.obs.cn-south-1.myhuaweicloud.com/map/hymap/tiles/merge.jpg',
        // 'https://map.happyvalley.link/total/assets/ar.67c033c3.png',
        // 'https://www.hzsp.com/mprogram/map/tiles/18/218440_108027.png',
        // 'https://obs-4e41.obs.cn-south-1.myhuaweicloud.com/map/hymap/tiles/18/218440_108027.jpg',
        // 'https://tencent-web-1320474462.cos.ap-shanghai.myqcloud.com/lego/218440_108027.png',
        // 'https://tencent-web-1320474462.cos.ap-shanghai.myqcloud.com/lego/218440_108027.png?imageView2/w/2250/format/webp',
      ].map((e, i) => map.addGroundOverlay({
        id: 1 + i,
        zIndex: 1 + i,
        src: e,
        bounds: {
          southwest: {
            longitude: 119.97963924174611,
            latitude: 30.14121591038157,
          },
          northeast: {
            longitude: 119.99129504819352,
            latitude: 30.160675813723522,
          },
        },
        success: res =>
          console.log(res, e)
        ,
        fail: err => console.log(err, e)
      }))



      console.log(map);
    }).exec()
  },
回答关注问题邀请回答
收藏
登录 后发表内容