-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHelloWorld.html
47 lines (45 loc) · 1.56 KB
/
HelloWorld.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Use correct character set. -->
<meta charset="utf-8">
<!-- Tell IE to use the latest, best version (or Chrome Frame if pre-IE11). -->
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<!-- Make the application on mobile take up the full browser screen and disable user scaling. -->
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
<title>Hello World!</title>
<script src="../Build/Cesium/Cesium_reformat.js"></script>
<style>
@import url(../Build/Cesium/Widgets/widgets.css);
html, body, #cesiumContainer {
width: 100%; height: 100%; margin: 0; padding: 0; overflow: hidden;
}
</style>
</head>
<body>
<div id="cesiumContainer"></div>
<script>
var viewer = new Cesium.Viewer('cesiumContainer', {
baseLayerPicker : true,//图层控制
animation:true,
geocoder:true,
homeButton:true,
infoBox:true,
timeline: true,
navigationHelpButton:true,
navigationInstructionsInitiallyVisible:true,
//creditContainer:"test"
});
function getcamera()
{
var destination = viewer.camera.position;//.toString();
var orientation =
{heading : viewer.camera.heading,
pitch : viewer.camera.pitch,
roll : viewer.camera.roll};
alert(destination.toString()+";"+orientation.heading+";"+orientation.pitch+";"+orientation.roll);
}
</script>
<!--<div id="test"><button type="button" onclick="getcamera()">Click Me!</button></div>
</body>
</html>