当前位置:首页 > Windows程序 > 正文

使用腾讯地图WebService API进行地点搜索

标签:url   class   ebs   www   请求   guide   ext   hat   mic   

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  
        "&region="   that.position   
"&location=" (that.lat "," that.lng) "&get_subpois=1&key=你的key&output=jsonp" dataType: "jsonp", success: res => { //返回搜索结果 console.log(res); } });

2.  如果遇到报错"请求来源未被授权, 此次请求来源域名:",不要设置域名白名单

技术图片

 

使用腾讯地图WebService API进行地点搜索

标签:url   class   ebs   www   请求   guide   ext   hat   mic   

温馨提示: 本文由杰米博客推荐,转载请保留链接: https://www.jmwww.net/file/14656.html