使用的发布的URL,运行在页面上没有显示。
代码:
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>场景加载</title>
<script src="lib/lib_Ajax/MicrosoftAjax.js"></script>
<script src="lib/lib_Ajax/SuperMap-7.0.1-11323.js"></script>
<script src="lib/lib_Realspace/SuperMap.Web.Realspace.js"></script>
<script type="text/javascript">
var sceneControl = null;
var scene = null;
var sceneUrl = "http://localhost:8090/iserver/services/3D-osgb/rest/realspace";
//"http://localhost:8090/iserver/services/3D-Line/rest/realspace";
function onPgLoad(){
try{
sceneControl = new SuperMap.Web.UI.Controls.SceneControl($get("sceneControlDiv"),initCallback,faildCallback);
}
catch(e){
if (e.name == SuperMap.Web.Realspace.ExceptionName.PlugInNotInstalled)
{
var url = htmlUrl + "/iserver/iClient/for3D/Setup.exe";
document.write("<a href='"+url+"'>未检测到 SuperMap iClient 7C for 3D 插件,请单击此处下载并安装插件。</a>");
return;
}
//若使用非IE浏览器,则抛出该异常
else if (e.name == SuperMap.Web.Realspace.ExceptionName.BrowserNotSupport)
{
document.write("<p>SuperMap iClient 7C for 3D 目前仅支持 InternetExplorer 浏览器,请更换浏览器后重新尝试加载本页面。</p>");
return;
}
//抛出其他异常
else
{
alert(e.message);
}
}
}
function initCallback(){
scene = sceneControl.get_scene();
scene.open(sceneUrl,"scenes")
}
function faildCallback(){
alert("Realspace initialized failed!");
}
</script>
</head>
<body onLoad="onPgLoad()">
<div id="sceneControlDiv" style="widows:90%; height:80%; top:5%; left:5%"; ></div>
</body>
</html>
帮忙解决一下