Created
August 23, 2020 06:40
-
-
Save smellman/2a3d692ae20c713b466828a38bc20a3d to your computer and use it in GitHub Desktop.
Kakegawa Castle on Cesium
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Kakegawa Castle on Cesium</title> | |
<script src="https://cesium.com/downloads/cesiumjs/releases/1.72/Build/Cesium/Cesium.js"></script> | |
<link href="https://cesium.com/downloads/cesiumjs/releases/1.72/Build/Cesium/Widgets/widgets.css" rel="stylesheet"> | |
<style> | |
#cesiumContainer { | |
position: absolute; | |
top: 0; | |
left: 0; | |
height: 100%; | |
width: 100%; | |
margin: 0; | |
overflow: hidden; | |
padding: 0; | |
font-family: sans-serif; | |
} | |
html { | |
height: 100%; | |
} | |
body { | |
padding: 0; | |
margin: 0; | |
overflow: hidden; | |
height: 100%; | |
} | |
</style> | |
</head> | |
<body> | |
<div id="cesiumContainer"></div> | |
<script> | |
const raster_tile = new Cesium.OpenStreetMapImageryProvider({ | |
url: 'https://cyberjapandata.gsi.go.jp/xyz/std/', | |
credit: new Cesium.Credit('地理院タイル', '', 'https://maps.gsi.go.jp/development/ichiran.html'), | |
maximumLevel: 18, | |
}) | |
const viewer = new Cesium.Viewer('cesiumContainer', { | |
imageryProvider: raster_tile, | |
baseLayerPicker: false, | |
geocoder: false, | |
homeButton: false | |
}) | |
viewer.camera.setView({ | |
destination : Cesium.Cartesian3.fromDegrees(140.00, 36.14, 20000000.0) | |
}) | |
const tileset = viewer.scene.primitives.add( | |
new Cesium.Cesium3DTileset({ | |
url: './ept-tileset/tileset.json' | |
}) | |
) | |
tileset.style = new Cesium.Cesium3DTileStyle({ | |
pointSize: 5 | |
}) | |
viewer.zoomTo(tileset) | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment