收藏
回答

加载腾讯位置服务SDK,服务器域名已经添加https://apis.map.qq.com,还是报错?

使用腾讯位置服务SDK,报错fail url not in domain list,已经在服务器域名中添加了https://apis.map.qq.com,但是还是不行

const qqmapsdk = new QQMapWX({

      key: 'asdfasdf'

    });

    // wx.showToast({ title: JSON.stringify(qqmapsdk.test()), icon: 'none' });return;

    qqmapsdk.geocoder({

      address: `${that.data.data.carOwnerInfo.areaTxt}`, //地址参数,例:固定地址,address: '北京市海淀区彩和坊路海淀西大街74号'

      success: res=>{

        wx.showToast({ title: JSON.stringify(res), icon: 'none' }) 

        wx.chooseLocation({

            latitude:res.result.location.lat,

            longitude:res.result.location.lng,

            success (resp) {

                console.error(resp)

              that.setData({

                specificPlace:resp.name,

                lat:resp.latitude,

                lng:resp.longitude,

                meetAddressName:resp.address

              })

            },

            fail(e){

              wx.showToast({ title: JSON.stringify(e), icon: 'none' }) 

            }

        })

      },

      fail(e){

        wx.showToast({ title: JSON.stringify(e), icon: 'none' }) 

      }

    })

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

1 个回答

  • w stephen.
    w stephen.
    2021-03-21

    楼主解决了吗

    2021-03-21
    有用
    回复 1
    • w stephen.
      w stephen.
      2021-03-21
      重启一下ide解决了
      2021-03-21
      回复
登录 后发表内容
问题标签