百度地图周边搜索最近的POI查询
<!DOCTYPE html><html><head><meta http-equiv="Content-Type" content="text/html; charset=gb2312" /><title>所有POI的查询-地址解析</title><script type="text/javascript" src="http://api.map.baidu.com/api?v=1.2"></script></head><body><input type="button" onclick="displayPOI();" value="断定" /><div style="width:600px;height:340px;border:1px solid gray;float:left;" id="container"></div><div style="width:300px;height:340px;border:1px solid gray;border-left:0;float:left;" id="panel"></div></body></html><script type="text/javascript">var map = new BMap.Map("container");var mPoint = new BMap.Point(116.404, 39.915);map.centerAndZoom(mPoint, 16);map.enableScrollWheelZoom(); //启用滚轮缩放var mOption = { poiRadius :100, //半径为1000米内的POI,默认100米 numPois :10 //列举出50个POI,默认10个}var myGeo = new BMap.Geocoder(); //创建地址解析实例function displayPOI(){ document.getElementById("panel").innerHTML = ""; map.addOverlay(new BMap.Circle(mPoint,500)); //添加一个圆形覆盖物 myGeo.getLocation(mPoint, function mCallback(rs){ var allPois = rs.surroundingPois; //获取全部POI(该点半径为100米内有6个POI点) for(i=0;i<allPois.length;++i){ document.getElementById("panel").innerHTML += "<p style=font-size:12px;>" + (i+1) + "、" + allPois[i].title + ",地址:" + allPois[i].address + ",LAT:"+ allPois[i].latitude +"</p>"; map.addOverlay(new BMap.Marker(allPois[i].point)); } },mOption );}</script>?