谁能帮我看看为什么使用了百度地图其他的网页元素显示不出来,如红色的部分
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<style type="text/css">
body, html,#allmap {width: 300px;height: 300px;overflow: hidden;margin:0;}
#goods {
height: 300px;
width: 300px;
margin-right: auto;
margin-left: auto;
}
</style>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=70E22E63d13b99e4b96f53185676c152"></script>
<title>根据起终点名称驾车导航</title>
</head>
<body>
<div id="allmap"></div>
<div id="goods">
请输入起始地址:<input type="text" id="start1" name="start1">
请输入目的地址:<input type="text" id="end1" name="end1">
<input type="button" value="确定" id="queding">
</div>
<script type="text/javascript">
// 百度地图API功能
var map = new BMap.Map("allmap");
map.centerAndZoom(new BMap.Point(108.33, 22.84), 14);
var transit = new BMap.TransitRoute(map, {
renderOptions: {map: map}
});
document.getElementById("queding").onclick=searchit;
function searchit(){
startPoint=document.getElementById("start1");
endPoint=document.getElementById("end1");
transit.search(startPoint.value.replace('^\s*|\s*$',''),endPoint.value.replace('^\s*|\s*$',''));
}
</script>
</body>
</html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<style type="text/css">
body, html,#allmap {width: 300px;height: 300px;overflow: hidden;margin:0;}
#goods {
height: 300px;
width: 300px;
margin-right: auto;
margin-left: auto;
}
</style>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=70E22E63d13b99e4b96f53185676c152"></script>
<title>根据起终点名称驾车导航</title>
</head>
<body>
<div id="allmap"></div>
<div id="goods">
请输入起始地址:<input type="text" id="start1" name="start1">
请输入目的地址:<input type="text" id="end1" name="end1">
<input type="button" value="确定" id="queding">
</div>
<script type="text/javascript">
// 百度地图API功能
var map = new BMap.Map("allmap");
map.centerAndZoom(new BMap.Point(108.33, 22.84), 14);
var transit = new BMap.TransitRoute(map, {
renderOptions: {map: map}
});
document.getElementById("queding").onclick=searchit;
function searchit(){
startPoint=document.getElementById("start1");
endPoint=document.getElementById("end1");
transit.search(startPoint.value.replace('^\s*|\s*$',''),endPoint.value.replace('^\s*|\s*$',''));
}
</script>
</body>
</html>
...全文
相关推荐
百度地图静态地图API
通过该工具,开发者可以轻松地生成自定义地图,并复制生成的代码直接使用。#### 五、注意事项- **权限与限制**:使用百度地图静态地图API前,请确保已阅读并同意百度地图的相关使用条款和服务政策。
百度地图你不知道的功能.docx
以下是一些你可能不知道的百度地图特性:1. **实时路况**:在规划路线时,百度地图可以显示实时路况信息,帮助用户避开交通拥堵,节省出行时间。
根据企业信息自动生成百度地图红色坐标代码
根据企业信息自动生成百度地图红色坐标代码
不同颜色百度地图开发定位图标
- 在百度地图API中,这些图标可以通过设置标注的图标属性(icon)来使用,将图标URL指向这些文件,从而实现不同颜色的图标显示。3.
百度地图定位及周边信息
**离线地图** 对于网络环境不稳定或流量有限的情况,百度地图提供离线地图下载功能,用户可以在有网络时提前下载所需区域的地图数据,离线时依然可以查看地图和部分功能。


