106 lines
2.9 KiB
HTML
106 lines
2.9 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="zh-cn">
|
||
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<title>泾河路网</title>
|
||
<!-- 第一步:先引入相关css及js文件 -->
|
||
<link rel="stylesheet" href="/cesium/Widgets/widgets.css">
|
||
<script src="/cesium/jquery-3.0.0.min.js"></script>
|
||
<script src="/cesium/Cesium.js"></script>
|
||
<script src="/cesium/BIMGISEngine.js"></script>
|
||
<style>
|
||
/* 第三步:容器样式,根据自身业务调整,这里只做参考 */
|
||
html,
|
||
body,
|
||
#cesiumContainer {
|
||
width: 100%;
|
||
height: 100%;
|
||
margin: 0;
|
||
padding: 0;
|
||
overflow: hidden;
|
||
position: relative;
|
||
}
|
||
|
||
</style>
|
||
</head>
|
||
|
||
<body>
|
||
<!-- 第二步:创建容器 -->
|
||
<div id="cesiumContainer"></div>
|
||
|
||
<!-- 视图列表 -->
|
||
<div class="panel">
|
||
<div class="panel-heading">模型视图列表</div>
|
||
<ul class="list-group layui-form">
|
||
<input type="radio" lay-filter="view" name="view" value="house_rvt3dview4708954" title="3D视图" />
|
||
<input type="radio" lay-filter="view" name="view" value="house_rvt" title="三维视图" checked />
|
||
</ul>
|
||
</div>
|
||
|
||
<!-- 加载logo及遮罩层 -->
|
||
<div id="box"></div>
|
||
<div class="loading-shadow" id="LoadingShadow">
|
||
<div class="loading-box mobile-loading-box">
|
||
加载中....
|
||
</div>
|
||
</div>
|
||
<!-- 第四步: 初始化Api -->
|
||
<script src="initApi.js"></script>
|
||
<script>
|
||
$(function () {
|
||
// 第五步:加载模型
|
||
window.initMap();
|
||
var api=window.mapApi
|
||
window.mapApi.Model.add(
|
||
//"http://szgc.jhncidg.com:808/mapmodel/tools/output/model/202308292209049711/root.glt",
|
||
//'3a0d53cd-8774-6b32-a056-d69e2e12260e',
|
||
"http://106.12.253.67:10045/Tools/output/model/202211250957169703/root.glt",
|
||
"3a07beae-5c1c-17d4-f0c2-63cf4e4416b9",
|
||
(data) => {
|
||
console.log(data)
|
||
if (Cesium.defined(data)) {
|
||
if (Cesium.defined(data.obj) && data.obj instanceof Cesium.Cesium3DTileset) {}
|
||
}
|
||
},
|
||
function (data) {
|
||
$("#box,#LoadingShadow").hide()
|
||
});
|
||
api.Public.Event("LEFT_CLICK", function (click) {
|
||
api.Feature.GetFeatureByEvent(click.position, function (json) {
|
||
debugger
|
||
if (json != undefined) {
|
||
featureId = json.id.replace( '3a0d53cd-8774-6b32-a056-d69e2e12260e' + '^', '');
|
||
mdldetailshow(featureId, 'type')
|
||
}
|
||
});
|
||
});
|
||
})
|
||
|
||
|
||
|
||
function mdldetailshow(id, propertyTypeName) {
|
||
$.ajax({
|
||
type: 'GET',
|
||
url: 'http://szgc.jhncidg.com:808/mapmodel/api/app/model/property-data-by-externalid',
|
||
headers: {
|
||
"Token": mapDefault.secretkey,
|
||
'Content-Type': 'application/octet-stream'
|
||
},
|
||
data: {
|
||
LightweightName: '202308292209049711',
|
||
ExternalId: id
|
||
},
|
||
success: function (res) {
|
||
debugger
|
||
}});
|
||
}
|
||
|
||
</script>
|
||
|
||
</body>
|
||
|
||
</html>
|