简单百度地图demo
<html><head><metahttp-equiv="Content-Type"content="text/html; charset=utf-8"/><metaname="viewport"content="initial-scale=1.0, user-scalable=no"/><styletype="text/css">body, html{width: 100%;height: 100%; margin:0;font-family:"微软雅黑";} #map{height:100%;width:100%;}</style><scripttype="text/javascript"src="http://api.map.baidu.com/api?v=2.0&ak=E4805d16520de693a3fe707cdc962045"></script><title>地图</title></head><body><divid="map"></div></body></html><scripttype="text/javascript">var map = new BMap.Map("map"); // 创建Map实例 map.centerAndZoom(new BMap.Point(116.3964,39.9093), 18); // 初始化地图,设置中心点坐标和地图级别 //添加地图类型控件 map.addControl(new BMap.MapTypeControl({ mapTypes:[ BMAP_NORMAL_MAP, BMAP_HYBRID_MAP ]})); map.setCurrentCity("北京"); // 设置地图显示的城市 此项是必须设置的 map.enableScrollWheelZoom(true); //开启鼠标滚轮缩放 var local = new BMap.LocalSearch(map, { renderOptions: {map: map} }); local.search("餐厅");</script>