高性能的城市定位API接口

如果不需要精准的定位,还有一种通过IP地址获取当前城市的方法,采用新浪的api接口。

<script src="http://int.dpool.sina.com.cn/iplookup/iplookup.php?format=js"></script>
<script>
    var city = remote_ip_info['city'];
    alert(city)
</script>
posted @ 2018-02-15 13:09  万隆  阅读(501)  评论(0编辑  收藏  举报