function getXYbyIP() {
var url="https://api.map.baidu.com/location/ip?ak=HQi0eHpVOLlRuIFlsTZNGlYvqLO56un3&coor=bd09ll";//百度
$.ajax({
url:url,
type: 'POST',
dataType: 'JSONP',
async: false,
cache: true, //是否缓存 可以为false
success: function (data) {
alert(JSON.stringify(data));
},
error: function (data) {
// alert(JSON.stringify(data));
}
});
}
---------------------
作者:qq_36026721
来源:CSDN
原文:https://blog.csdn.net/qq_36026721/article/details/55098079
版权声明:本文为博主原创文章,转载请附上博文链接!
根据IP地址获取经纬度-(只能获取到市级,高精度定位接口已经关闭,无法使用)
猜你喜欢
转载自blog.csdn.net/A873054267/article/details/86300088
今日推荐
周排行