-
Notifications
You must be signed in to change notification settings - Fork 6
/
example.html
67 lines (60 loc) · 2.41 KB
/
example.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="Cesium-1.11/Build/Cesium/Widgets/widgets.css">
<link rel="stylesheet" href="cesium-minimap.css">
<style type="text/css">
#map {
position: absolute;
left: 0;
right: 0;
top: 0;
bottom: 0;
}
</style>
</head>
<body>
<div id="map"></div>
<script type="text/javascript" src="Cesium-1.11/Build/Cesium/Cesium.js"></script>
<script type="text/javascript" src="cesium-minimap.js"></script>
<script type="text/javascript">
(function () {
'use strict';
var CESIUM_OPTS = {
animation: false,
baseLayerPicker: false,
fullscreenButton: false,
geocoder: false,
homeButton: false,
infoBox: false,
sceneModePicker: false,
selectionIndicator: false,
timeline: false,
navigationHelpButton: true,
navigationInstructionsInitiallyVisible: false,
orderIndependentTranslucency: false
};
Cesium.BingMapsApi.defaultKey = '';
var viewer = new Cesium.Viewer('map', CESIUM_OPTS);
var scene = viewer.scene;
scene.imageryLayers.removeAll();
var globe = scene.globe;
// Depth test: If this isn't on, objects will be visible through the terrain.
globe.depthTestAgainstTerrain = true;
// Add the terrain provider (AGI)
viewer.terrainProvider = new Cesium.CesiumTerrainProvider({
url : '//assets.agi.com/stk-terrain/world',
requestVertexNormals : true,
requestWaterMask: false
});
var osmProvider = new Cesium.UrlTemplateImageryProvider({
url: 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'
});
viewer.imageryLayers.addImageryProvider(osmProvider);
CesiumMiniMap(viewer);
}());
</script>
</body>
</html>