1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
| <!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&tk=079300b89bce333ead2df1476c43ecb0"></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', {
| projection: 'EPSG:4326'
| });
| map.centerAndZoom(new T.LngLat(116.40769, 39.89945), zoom);
| }
| </script>
| </head>
| <body onLoad="onLoad()">
| <div id="mapDiv"></div>
| <p>本示例演示如何显示经纬度直投地图。</p>
| </body>
| </html>
|
|