<script type="text/javascript">
// 百度地图API功能
var map = new BMap.Map('allmap');
var poi = new BMap.Point(116.387426,39.938945);
map.centerAndZoom(poi, 17);
map.enableScrollWheelZoom();
var content = '<div style="margin:0;line-height:20px;padding:2px;">' +
'<img src="/Content/Areas/News/images/logo.jpg" alt="" style="float:right;zoom:1;overflow:hidden;width:90px;height:90px;margin:3px;"/>' +
'地址:西什库大街8号西门<br/>电话:(010)62246743<br/>简介:北京大学第一医院...' +
'</div>';
//创建检索信息窗口对象
var searchInfoWindow = null;
searchInfoWindow = new BMapLib.SearchInfoWindow(map, content, {
title : "北京大学第一医院", //标题
width : 290, //宽度
height : 105, //高度
panel : "panel", //检索结果面板
enableAutoPan : true, //自动平移
searchTypes :[
BMAPLIB_TAB_SEARCH, //周边检索
BMAPLIB_TAB_TO_HERE, //到这里去
BMAPLIB_TAB_FROM_HERE //从这里出发
]
});
var marker = new BMap.Marker(poi); //创建marker对象
searchInfoWindow.open(marker);
map.addOverlay(marker); //在地图中添加marker
</script>