<meta charset="utf-8">
<script src="https://api.map.baidu.com/api?v=2.0&ak=1a3c89ddb9bcfaf5b9dc4b62e3f2a05b"></script>
<div id="1500km" style="width:100%;height:500px"></div>
<script>
//百度地图API功能
var map = new BMap.Map("1500km");// 创建Map实例
map.centerAndZoom(new BMap.Point(116.404, 39.915), 11);//初始化地图,设置中心点坐标和地图级别
//添加地图类型控件
map.addControl(
new BMap.MapTypeControl({
mapTypes:[
BMAP_NORMAL_MAP,
BMAP_HYBRID_MAP
]
})
);
map.setCurrentCity("北京");//设置地图显示的城市 此项是必须设置的
map.enableScrollWheelZoom(true);//开启鼠标滚轮缩
</script>
对象 | 描述 |
---|---|
Array 对象 | |
Boolean 对象 | |
Date 对象 | |
Math 对象 | |
Number 对象 | |
String 对象 | |
RegExp 对象 | |
全局属性和函数 |
对象 | 描述 |
---|---|
Window 对象 | |
Navigator 对象 | |
Screen 对象 | |
History 对象 | |
Location 对象 |
对象 | 描述 |
---|---|
HTML Document | |
HTML Element | |
HTML Attributes | |
HTML Events |
对象 | 描述 |
---|---|
Anchor 对象 | |
Area 对象 | |
Base 对象 | |
Body 对象 | |
Frame/IFrame 对象 | |
Frameset 对象 | |
Link 对象 | |
Meta 对象 | |
Object 对象 |
Image 对象 | |
Option 对象 | |
Select 对象 | |
Style 对象 | |
Table 对象 | |
td / th 对象 | |
tr 对象 | |
Button 对象 | |
Form 对象 | |
Textarea 对象 |
Input Button 对象 | |
Input Checkbox 对象 | |
Input File 对象 | |
Input Hidden 对象 | |
Input Password 对象 | |
Input Radio 对象 | |
Input Reset 对象 | |
Input Submit 对象 | |
Input Text 对象 |
Input Range 对象 | |
Input Number 对象 | |
Input Date 对象 | |
Input Datetime 对象 | |
Input Datetime-local 对象 | |
Input Email 对象 | |
Input Month 对象 | |
Input Search 对象 | |
Input Tel 对象 | |
Input Time 对象 | |
Input Url 对象 | |
Input Week 对象 |