Skip to content

Commit fbb8274

Browse files
authored
Create index.html
1 parent d4fe8ff commit fbb8274

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed

solcelle/index.html

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="utf-8">
6+
<script src="https://cesium.com/downloads/cesiumjs/releases/1.63.1/Build/Cesium/Cesium.js"></script>
7+
<link href="https://cesium.com/downloads/cesiumjs/releases/1.63.1/Build/Cesium/Widgets/widgets.css"
8+
rel="stylesheet">
9+
10+
<style>
11+
html,
12+
body {
13+
margin: 0;
14+
padding: 0;
15+
}
16+
</style>
17+
</head>
18+
19+
<body>
20+
<div id="cesiumContainer" style="width: 100vw; height:100vh"></div>
21+
22+
<script>
23+
24+
25+
// Grant CesiumJS access to your ion assets
26+
Cesium.Ion.defaultAccessToken = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiI2NGM3NDNkYy0yZWM0LTQ0ODQtYjFmNS0zMDY4MGIxNDVmYmQiLCJpZCI6MTgyMzEsInNjb3BlcyI6WyJhc3IiLCJnYyJdLCJpYXQiOjE1NzM1MDc5NTd9.VF54ufCrlaAEna_iHaCn47njpuMz1qgjrone4WnuCuA';
27+
28+
var viewer = new Cesium.Viewer('cesiumContainer', {
29+
terrainProvider: new Cesium.CesiumTerrainProvider({
30+
url: Cesium.IonResource.fromAssetId(74171)
31+
}),
32+
shadows: true,
33+
terrainShadows: Cesium.ShadowMode.ENABLED,
34+
});
35+
36+
var shadowMap = viewer.shadowMap;
37+
//shadowMap.maxmimumDistance = 10000.0;
38+
39+
var promise = Cesium.IonResource.fromAssetId(74176)
40+
.then(function (resource) {
41+
return Cesium.GeoJsonDataSource.load(resource, {
42+
stroke: Cesium.Color.HOTPINK,
43+
fill: Cesium.Color.PINK,
44+
strokeWidth: 3,
45+
markerSymbol: '?'
46+
});
47+
})
48+
.then(function (dataSource) {
49+
return viewer.dataSources.add(dataSource);
50+
})
51+
.then(function (dataSource) {
52+
return viewer.zoomTo(dataSource);
53+
})
54+
.otherwise(function (error) {
55+
console.log(error);
56+
});
57+
58+
</script>
59+
</body>
60+
61+
</html>

0 commit comments

Comments
 (0)