猿问

关于高德地图webAPI AdvancedInfoWindow加上Key就报错!

案例地址:http://lbs.amap.com/api/javas...
加上我的开发者key 点击就有报错 无法正常使用
报错:

Uncaught TypeError: Cannot read property 'addressComponent' of undefined

    at c.eval (eval at <anonymous> (http://webapi.amap.com/maps?v=1.3&keyee0c2ec9cd719c1c0adaef80f89b5aa8&plugin=AMap.AdvancedInfoWindow:21:183), <anonymous>:138:240)

    at c.w (eval at <anonymous> (http://webapi.amap.com/maps?v=1.3&keyee0c2ec9cd719c1c0adaef80f89b5aa8&plugin=AMap.AdvancedInfoWindow:21:183), <anonymous>:32:355)

    at window.(anonymous function) (eval at Lk (eval at <anonymous> (http://webapi.amap.com/maps?v=1.3&keyee0c2ec9cd719c1c0adaef80f89b5aa8&plugin=AMap.AdvancedInfoWindow:21:183)), <anonymous>:1:1453)

    at http://restapi.amap.com/v3/geocode/regeo?&extensions=&&key=&s=rsv3&output=j…indow-has-search-function%2F&csid=C743482F-80BB-46BF-B412-7C985025F8B0:1:1

报错截图:

配置域名

https://img2.mukewang.com/5c497fd60001d98308000583.jpg

千巷猫影
浏览 1472回答 1
1回答

呼啦一阵风

是要在key所对应的域名下才生效
随时随地看视频慕课网APP

相关分类

JavaScript
我要回答