forked from songliuchen/cesium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.html
134 lines (129 loc) · 3.47 KB
/
main.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Cesium Demo</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="https://cesiumjs.org/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="https://cesiumjs.org/favicon.ico" type="image/x-icon"/>
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<link href="https://cesiumjs.org/releases/1.58/Build/Cesium/Widgets/widgets.css" rel="stylesheet">
<script src="https://cesiumjs.org/releases/1.58/Build/Cesium/Cesium.js"></script>
<script src="./assets/plugins/cesium.zh.js"></script>
<style>
html,body
{
padding:0;
margin:0;
height: 100%;
width: 100%;
overflow: hidden;
min-width: 1000px;
}
a{
text-decoration: none;
color:white;
}
ul
{
margin:0px;
padding:0px;
}
li
{
list-style-type:none;
}
.nav
{
position:fixed;
top:0;
left:0;
width:100%;
z-index:999;
background-color:rgba(38, 38, 38, 0.75);
line-height: 60px;
height:60px;
}
.nav .title
{
margin-left:100px;
}
.nav .title div
{
display: inline-block;
color: #fff;
font-size: 30px;
}
.nav .menu
{
float:right;
}
#cesium_container
{
width:100%;
height:100%;
}
.cesium-viewer-toolbar
{
top:70px;
}
.status_bar
{
font-size: 12px;
height: 2em;
line-height: 2em;
min-width: 900px;
width: 100%;
position: absolute;
left: 0px;
bottom: 0px;
z-index: 20;
background: rgba(38, 38, 38, 0.75);
color: #fff;
}
.status_bar .location
{
float:right;
}
.status_bar .location label
{
margin-right: 10px;
}
</style>
</head>
<body>
<div class="nav">
<a class="title" href = "./main.html">
<div>
Cesium 示例
</div>
</a>
<span class="menu">
<a></a>
</span>
</div>
<div id = "cesium_container" style="width:100%;height:100%;">
</div>
<!-- <div class= "status_bar">
<span>Copyright © 2019</span>
<span class="location">
<label id="coordinate_location">纬度:4°14’15.4369”N 经度:-19°-21’-50.5058”E</label>
<label id="coordinate_height">海拔: -4259米</label>
<label id="coordinate_cameraheight">视角海拨高度: 20729918米</label>
</span>
</div> -->
</body>
<script>
var mViewer = new Cesium.Viewer('cesium_container',{
animation: false, //是否创建动画小器件,左下角仪表
timeline: false, //是否显示时间线控件
geocoder: true, //是否显示地名查找控件
baseLayerPicker: true, //是否显示图层选择控件
shadows: false,// 阴影是否被太阳投射
shouldAnimate:true,
fullscreenButton:false
});
mViewer.cesiumWidget.creditContainer.style.display = "none";
CesiumZh.load();
</script>
</html>