<html>
<head>
<title>Virtual Earth 3D Mashup</title>
<script src="http://dev.virtualearth.net/mapcontrol/v4/mapcontrol.js"></script>
<script>
var map = null;
var timer = null;
function VirtualEarth3DScene(title, lat, lon, alt, view, heading)
{
this.Title = title;
this.ViewSpec = new VEMapViewSpecification(new VELatLong(lat, lon), null, alt, view, heading);
}
var scenes = new Array();
scenes.push( new VirtualEarth3DScene("San Francisco, California", 37.794008, -122.394352, 202.916620191187, -7.57928192941064, 284.330758577285) );
scenes.push( new VirtualEarth3DScene("Seattle, Washington", 47.619498, -122.347999, 212.752614734694, -13.4638485035358, 131.77967769793) );
var numScenes = scenes.length;
var sceneIndex = -1;
var updateInterval = 2000;
function GetMap()
{
map = new VEMap("myMap");
map.onLoadMap = MapLoadCp;
map.LoadMap(null, 2, VEMapStyle.Aerial);
}
function MapLoadCp()
{
map.SetMapMode(VEMapMode.Mode3D);
map.HideDashboard();
timer = setInterval('IncrScene();ShowNextScene()', updateInterval);
}
function ShowNextScene()
{
if ( sceneIndex == 0)
{
updateInterval = 20000;
clearInterval(timer);
timer = setInterval('IncrScene();ShowNextScene();', updateInterval);
}
var scene = scenes[sceneIndex];
document.getElementById("myTitle").innerHTML = scene.Title;
map.SetMapView(scene.ViewSpec);
}
function IncrScene()
{
++sceneIndex;
sceneIndex = sceneIndex % numScenes;
}
</script>
</head>
<body onload="GetMap();" bgcolor=#000000>
<div id="myTitle" style="FONT: 100% Arial bold; TEXT-ALIGN: center; FONT-WEIGHT: bold; COLOR: #fff; POSITION: relative;">Virtual Earth 3D</div>
<div id="myMap" style="position:relative; width=100% height:500px;"></div>
</body>
</html>
一个基于纯js实现的VirtualEarth三维显示例子源码程序
需积分: 9 28 浏览量
2008-12-18
17:45:45
上传
评论
收藏 1KB ZIP 举报
领君2018
- 粉丝: 204
- 资源: 1527
最新资源
- LS416 高性能DSP的声控处理芯片语音识别模块AD设计硬件(原理图+PCB)+L2416-M-26P模块封装库+器件手册
- 基于tensorflow实现LSTM, CNN, SVM, MLP语音情感识别源码.zip
- 基于JSP在线学生选课管理系统源码.zip
- 基于JSP在线学生信息管理系统源码.zip
- 常用DHT11 MIC SHT11 VS1838B CHT8305 MQ-3 温湿度气体等传感元件2D3D封装库.PcbLib
- 基于JSP在线新闻管理系统包含前后台源码.zip
- 基于JSP在线文具销售平台商城源码.zip
- tiamo软件教程.doc
- nvm管理Nodejs多版本工具
- Unit1Howcanwebecomegoodlearners知识点整理(良心出品必属精品).doc
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈