返回首页

源代码编辑器

x
 
1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2
<html>
3
<head>
4
</head>
5
<body onload="onLoad()">
6
<div id="mapdiv"  class="map" style="width:100%;height:450px;background-color:#F4F3F0;"></div>
7
</body>
8
</html>
9
<script type="text/javascript" language="javascript"
10
    src="http://a.qqearth.com:81/SE_JSAPI?v=ol&uid=您的uid"></script>
11
<script type="text/javascript">
12
   function onLoad(){
13
       var map = new EV.Map("mapdiv",{deafultTools:false});//创建地图对象
14
        map.setCenter(new EV.LngLat(116.40969,39.89945),11); //设置地图中心点和缩放级别
15
        map.addControl(new EV.MapControl());
16
        var pan = [[-1,0],[-1,1],[1,-1],[1,-1],[-1,1]];
17
        var count = 0;
18
        var pan_dir = setInterval(function()
19
        {
20
            if (count < 5)
21
            {
22
                map.panDirection(pan[count][0],pan[count][1]);                      
23
            }
24
            else
25
            {
26
                clearInterval(pan_dir);
27
            }
28
            count++;
29
            
30
        },1500);    
31
   }
32
</script>
33