1234567891011121314151617181920212223242526272829303132333435363738 |
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
- <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
- <script type="text/javascript" src="https://api.map.baidu.com/api?type=webgl&v=1.0&ak=5uvFMzYEFZOsAIoUawGvWc5v1WvrWfPr"></script>
- <title>本地搜索的结果面板</title>
- <style type="text/css">
- body, html,#allmap {width: 100%;height: 100%; margin:0;font-family:"微软雅黑";}
- #l-map{height:100%;width:100%;}
- .anchorBL{
- display:none;
- }
-
- </style>
- </head>
- <body style="overflow:hidden">
- <div id="l-map"></div>
- <div id="r-result"></div>
- </body>
- </html>
- <script type="text/javascript">
- // 百度地图API功能
- var map = new BMapGL.Map("l-map"); // 创建Map实例
- map.centerAndZoom(new BMapGL.Point(88.245431,29.448884), 11.5);
- map.setMapStyleV2({
- styleId: '1da39f818ce462dc76ab4361834334df'
- });
- var myKeys = ["酒店",];
- var local = new BMapGL.LocalSearch(map, {
-
- renderOptions:{map: map, panel:"r-result"},
- pageCapacity:5
- });
- local.searchInBounds(myKeys, map.getBounds());
- </script>
|