<script src="http://api.map.baidu.com/api?key=&v=2.0&ak=youkey"></script>
var map = new BMap.Map("allmap"); var point = new BMap.Point(120.948935, 31.470289); map.centerAndZoom(point, 11); map.addControl(new BMap.MapTypeControl({ mapTypes: [BMAP_NORMAL_MAP] })); map.setCurrentCity("苏州"); map.enableScrollWheelZoom(true);
地图控件类型:
map.addControl(new BMap.MapTypeControl({mapTypes: [BMAP_NORMAL_MAP,BMAP_SATELLITE_MAP,BMAP_HYBRID_MAP ]}));
BMAP_NORMAL_MAP:地图
BMAP_SATELLITE_MAP:卫星
BMAP_HYBRID_MAP :混合