learning_cesium/marsDemo.html

32 lines
1.2 KiB
HTML
Raw Permalink 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.

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<!--引入cesium基础lib-->
<link href="https://unpkg.com/mars3d-cesium/Build/Cesium/Widgets/widgets.css" rel="stylesheet" type="text/css" />
<script src="https://unpkg.com/mars3d-cesium/Build/Cesium/Cesium.js" type="text/javascript" ></script>
<!--引入mars3d库lib-->
<link href="https://unpkg.com/mars3d/dist/mars3d.css" rel="stylesheet" type="text/css" />
<script src="https://unpkg.com/mars3d/dist/mars3d.js" type="text/javascript" ></script>
<style>
html, body, .mars3d-container {
height: 100%;
width: 100%;
margin: 0;
padding: 0;
border: none;
overflow: hidden;
}
</style>
</head>
<body>
<!-- 为 Mars3D 准备一个定义了宽高的 DOM -->
<div id="mars3dContainer" class="mars3d-container"></div>
<script type="text/javascript">
var mapOptions = {
basemaps: [{ name: "天地图", type: "tdt", layer: "img_d", show: true }],
};
var map = new mars3d.Map("mars3dContainer", mapOptions); //支持的参数请看API文档http://mars3d.cn/api/Map.html
</script>
</body>
</html>