35 lines
986 B
HTML
35 lines
986 B
HTML
<!--
|
|
How to load an image with SingleTileImageryProvider,
|
|
it is useful especially when the quality of network is so poor
|
|
-->
|
|
<!DOCTYPE html>
|
|
<head>
|
|
<title>LocalImage</title>
|
|
<link href="../Build/Cesium/Widgets/widgets.css" rel="stylesheet">
|
|
<script type="text/javascript" src="./js/require.min.js" data-main="./js/main"></script>
|
|
<style>
|
|
html, body, #cesiumContainer {
|
|
width: 100%; height: 100%; margin: 0; padding: 0; overflow: hidden;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div id="cesiumContainer"></div>
|
|
<script>
|
|
function onload(Cesium) {
|
|
|
|
var viewer = new Cesium.Viewer('cesiumContainer', {
|
|
skyBox : false,
|
|
skyAtmosphere : false,
|
|
baseLayerPicker : false,
|
|
imageryProvider :new Cesium.SingleTileImageryProvider({
|
|
url : './images/globe.jpg'
|
|
})
|
|
});
|
|
|
|
viewer.scene.backgroundColor = Cesium.Color.TRANSPARENT;
|
|
|
|
viewer.scene.globe.baseColor = Cesium.Color.TRANSPARENT;
|
|
};
|
|
</script>
|
|
</body> |