首先也去百度地图申请下密钥 ####密钥删除写成自己的即可用
<!DOCTYPE html>
<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">
#allmap {width: 800px;height: 500px}
/*body, html,#allmap {width: 800px;height: 500px;overflow: hidden;margin:0;font-family:"微软雅黑";}*/
#result{
width:200px;
height:50px;
}
</style>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=#########密钥"></script>
<!--加载鼠标绘制工具-->
<script type="text/javascript" src="http://api.map.baidu.com/library/DrawingManager/1.4/src/DrawingManager_min.js"></script>
<link rel="stylesheet" href="http://api.map.baidu.