当前位置: 代码迷 >> Web前端 >> 百度map
  详细解决方案

百度map

热度:331   发布时间:2012-09-02 21:00:34.0
百度地图
   <html>  
       <head>  
           <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />  
            <title>周边搜索</title>  
           <script type="text/javascript" src="http://api.map.baidu.com/api?v=1.1&services=true">  
           </script>  
        </head>  
        <body>  
            <div style="width:520px;height:340px;border:1px solid gray" id="container">  
           </div>  
       </body>  
   </html>  
   <script type="text/javascript">  
       var map = new BMap.Map("container");  
       map.centerAndZoom(new BMap.Point(112.905181, 28.220816), 13);  
         
       var local = new BMap.LocalSearch(map, {  
          renderOptions: {  
               map: map,  
               autoViewport: true  
       }  
       });  
     local.searchNearby(" 酒店", "武汉");  
        
   </script>  
  相关解决方案