https://lbs.qq.com/webservice_v1/guide-suggestion.html
1. 通过jsonp方式使用
$.ajax({ type: "get", url: "https://apis.map.qq.com/ws/place/v1/suggestion?keyword=" + that.text + "®ion=" + that.position + "&location=" + (that.lat + "," + that.lng) + "&get_subpois=1&key=你的key&output=jsonp" dataType: "jsonp", success: res => { //返回搜索结果 console.log(res); } });
2. 如果遇到报错"请求来源未被授权, 此次请求来源域名:",不要设置域名白名单
原文地址:https://www.cnblogs.com/223zzm/p/11747012.html
时间: 2024-10-10 12:47:42