在实现下面代码之前要先到百度地图开放平台申请一个秘钥,然后参照官方文档进行开发
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<title>自动提示</title>
<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=你的秘钥"></script>
<style type="text/css">
body{font-size:13px;margin:0px}
#container{width:600px;height:400px}
.label{margin-left:20px;font-weight:bold;font-size:14px}
.lng-lat{
margin: 0 0 3