<!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>