首页 > javascript通过经纬度获取当前城市名?

javascript通过经纬度获取当前城市名?

在微信开发里需要获取当前城市,我用的高德地图,但有的城市定位有误,比如在深圳会定位到成都,有没有其他方法可以定位到当前城市,例如通过html5获取的经纬度获取城市


<script src="http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js"></script>
<script>
    alert(remote_ip_info.province + '\n' + remote_ip_info.city)
</script>

微信自带位置接口https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141115&token=&lang=zh_CN
可以用ip定位,链接ip库查找.
新浪接口http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js


你是不是经纬参数弄反了

【热门文章】
【热门文章】