88 lines
3.3 KiB
HTML
88 lines
3.3 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<title>咸宁市三维底板</title>
|
||
<link rel="stylesheet" href="http://172.18.130.6:8080/webframe/lib/Cesium/Widgets/widgets.css" />
|
||
<style>
|
||
*{
|
||
margin: 0;
|
||
padding: 0;
|
||
}
|
||
|
||
html, body, #cesiumContainer {
|
||
width: 100%;
|
||
height: 100%;
|
||
}
|
||
.cesium-infoBox-iframe{ height: 100px !important; }
|
||
.cesium-viewer-navigationContainer {
|
||
top: 15px;
|
||
}
|
||
</style>
|
||
</head>
|
||
<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%;position: absolute;top: 0;">
|
||
<div id="cesiumContainer"></div>
|
||
<script type="text/javascript" src="http://172.18.130.6:8080/webframe/lib/jquery/jquery-1.10.2.min.js"></script>
|
||
<script type="text/javascript" src="http://172.18.130.6:8080/webframe/lib/Cesium/Cesium.js"></script>
|
||
|
||
<script type="text/javascript">
|
||
var gislist = JSON.parse(localStorage.getItem('gisjw'))
|
||
var _jd = gislist.jd;
|
||
var _wd= gislist.wd;
|
||
const strArr = [
|
||
{id:0,propfield:'dangNo',value:gislist.dangNo,chinName:'档号:'},
|
||
{id:1,propfield:'maintitle',value:gislist.maintitle,chinName:'<br>题名:'},
|
||
{id:2,propfield:'tdzl',value:gislist.tdzl,chinName:'<br>土地坐落位置:'},
|
||
{id:3,propfield:'syqmj',value:gislist.syqmj,chinName:'<br>使用权面积:'},
|
||
{id:4,propfield:'dzjgh',value:gislist.dzjgh,chinName:'<br>电子监管号:'},
|
||
{id:5,propfield:'zpgh',value:gislist.zpgh,chinName:'<br>招拍挂号:'},
|
||
];
|
||
|
||
const depStr = strArr
|
||
.filter(item => item.value !== undefined && item.value !== "")
|
||
.map(item => `${item.chinName}${item.value}`)
|
||
.join('');
|
||
console.log(depStr)
|
||
console.log(_jd,_wd,"11111111111111111111111111");
|
||
var sceneUrl = "http://172.18.130.7:8090/iserver/services/3D-XN_sanwei_XAQ/rest/realspace"
|
||
var viewer = new Cesium.Viewer('cesiumContainer');
|
||
var widget = viewer.cesiumWidget;
|
||
var scene = viewer.scene;
|
||
//关闭cesium logo
|
||
viewer._cesiumWidget._creditContainer.style.display = 'none';
|
||
try {
|
||
//新版本cesium会自动定位,且无法用参数控制,所以这里不对视角做处理
|
||
var promise = scene.open(sceneUrl);
|
||
var promise2 = scene.open('http://172.18.130.7:8090/iserver/services/3D-sanwei_max/rest/realspace');
|
||
//定位
|
||
viewer.camera.flyTo({
|
||
destination: Cesium.Cartesian3.fromDegrees(parseFloat(_jd),parseFloat(_wd), 1500.0)
|
||
});
|
||
} catch (e) {
|
||
if (widget._showRenderLoopErrors) {
|
||
var title = '渲染时发生错误,已停止渲染。请联系管理员!';
|
||
widget.showErrorPanel(title, undefined, e);
|
||
}
|
||
}
|
||
console.log(_jd,_wd,"222222222222222222222222222");
|
||
//添加mark
|
||
viewer.entities.add({
|
||
position: Cesium.Cartesian3.fromDegrees(parseFloat(_jd), parseFloat(_wd), parseFloat(100)),
|
||
billboard: {
|
||
image: "a.png",
|
||
width: 30,
|
||
height: 40,
|
||
},
|
||
name: "该档案的位置:"+_wd+","+_jd,
|
||
id: 1,
|
||
props: {
|
||
a: 1,
|
||
b: 1
|
||
},
|
||
description: depStr
|
||
});
|
||
console.log(_jd,_wd,"3333333333333333333333333333");
|
||
</script>
|
||
</body>
|
||
</html>
|