天地图--鹰眼控件
天地图-地图API-范例-鹰眼控件
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta name="keywords" content="天地图"/>
<title>天地图-地图API-范例-鹰眼控件</title>
<script type="text/javascript" src="http://api.tianditu.gov.cn/api?v=4.0"></script>
<style type="text/css">body,html{width:100%;height:100%;margin:0;font-family:"Microsoft YaHei"}#mapDiv{width:100%;height:400px}input,b,p{margin-left:5px;font-size:14px}</style>
<script>
var map;
var zoom = 12;
function onLoad() {
map = new T.Map('mapDiv');
map.centerAndZoom(new T.LngLat(116.40769, 39.89945), zoom);
var miniMap = new T.Control.OverviewMap({
isOpen: true,
size: new T.Point(150, 150)
});
map.addControl(miniMap);
}
</script>
</head>
<body onLoad="onLoad()">
<div id="mapDiv"></div>
<p>本示例演示如何向地图添加鹰眼控件。</p>
</body>
</html>