如题 用的是iserver9d 官网上的教学视频,三维服务已经发布了,然后在浏览器输入访问地址中只能显示球体,我在notepdd++自带的显示在浏览器中的功能提示了以下错误:
代码如下:
<!DOCTYPE html>
<html >
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1,minimum-scale=1, user-scalable=no">
<title>3DViewer</title>
<link href="./css/widgets.css" rel="stylesheet">
<script type="text/javascript" src="./js/require.min.js" data-main="js/main"></script>
</head>
<body>
<div id="cesiumContainer"></div>
<script type="text/javascript">
var viewer;
function onload(Cesium) {
var viewer = new Cesium.Viewer('cesiumContainer');
var scene = viewer.scene;
var promise = scene.open('http://localhost:8090/iserver/services/3D-12-28-CBD/rest/realspace');
cesium.when(promise,function(layer){
scene.camera.setView({
destination: Cesium.Cartesian3.fromDegrees(116.460,39.914,1400)
});
})
}
</script>
</body>
</html>