首页 > 其他 > 详细

根据经纬度输出(获取)位置名称

时间:2015-04-02 18:06:16      阅读:244      评论:0      收藏:0      [点我收藏+]

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"/>
<title>反地址解析</title>
<style type="text/css">
*{
    margin:0px;
    padding:0px;
}
body, button, input, select, textarea {
    font: 12px/16px Verdana, Helvetica, Arial, sans-serif;
}
p{
    width:603px;
    padding-top:3px;
    margin-top:10px;
    overflow:hidden;
}
</style>

<script charset="utf-8" src="http://map.qq.com/api/js?v=2.exp"></script>
<script>
get_address = function() {
    geocoder = new qq.maps.Geocoder({
        complete : function(result){
            console.log(result.detail.address);
        }
    });
    var latLng = new qq.maps.LatLng(39.98174,116.30631);
    geocoder.getAddress(latLng);    
}();
</script>
</head>
<body >
<div>
<input id="latLng" type="textbox" value="39.98174,116.30631">
<input type="button" value="search" onclick="get_address()">
</div>
<div style="width:603px;height:300px" id="container"></div>
<p>输入坐标,点击search进行反地址解释,点击marker会弹出反查结果。</p>
</body>
</html>

根据经纬度输出(获取)位置名称

原文:http://www.cnblogs.com/langxi/p/4387365.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!