Cesium-Examples/examples/cesiumEx/00.html
2025-05-06 11:29:34 +08:00

42 lines
1.5 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!--********************************************************************
* by jiawanlong
*********************************************************************-->
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<link rel="stylesheet" href="./../../libs/cesium/Cesium1.98/Widgets/widgets.css">
<script type="text/javascript" src="./../../libs/cesium/Cesium1.98/Cesium.js"></script>
</head>
<body style="margin: 0; overflow: hidden; background: #fff; width: 100%; height: 100%; position: absolute; top: 0">
<div id="map" style="margin: 0 auto; width: 100%; height: 100%"></div>
<script type="text/javascript">
// -----------------------重要---------------------
// 截至2024官方底图时长会加载不出来导致底图卡顿影像操作。
// 所以需要绕过defaultAccessToken避免勇官网底图。
const viewer = new Cesium.Viewer('map', {
// 添加这两行就不会找烦人的defaultAccessToken了也不会找在线底图了
imageryProvider: false,
baseLayerPicker: false,
});
viewer.scene.primitives.add(new Cesium.DebugModelMatrixPrimitive({
length: 16668666.8,
width: 2
}))
// 自定义底图
var imageryProvider = new Cesium.SingleTileImageryProvider({
"url": "./_.png",
})
viewer.imageryLayers.addImageryProvider(imageryProvider)
</script>
</body>
</html>