<!DOCTYPE html>
|
<html lang="en">
|
<head>
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta name="viewport"
|
content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
|
<title>视域分析</title>
|
<link href="../SmartEarthSDK/Workers/layui/css/layui.css" rel="stylesheet" />
|
<link href="./css/AnalysisContour.css" rel="stylesheet" />
|
|
<style type="text/css">
|
.layui-btn {
|
margin: 0.08rem 0 0 0.4rem;
|
}
|
.layui-input{
|
/* display: inline-block; */
|
/* height: 0.2rem; */
|
line-height: 1.3;
|
margin-right: 0.3rem !important;
|
/* margin-top: 0.1rem; */
|
}
|
.layui-form-item{
|
width: 80% !important;
|
}
|
.layui-btn+.layui-btn {
|
margin-left: 0.2rem;
|
}
|
|
.demo-slider {
|
display: inline-block !important;
|
width: 1.7rem !important;
|
|
}
|
|
.color {
|
width: 100%;
|
float: left;
|
}
|
|
.top {
|
margin-top: 0.1rem;
|
}
|
|
.layui-form-label {
|
font-size: 0.1rem;
|
color: white;
|
}
|
|
.lab {
|
margin-right: 0.4rem;
|
}
|
|
label {
|
font-weight: normal;
|
}
|
|
.layui-input-block {
|
margin-left: 1rem;
|
min-height: 0.36rem;
|
margin-top: -0.24rem;
|
}
|
.smallbtn {
|
display: inline-block;
|
position: absolute;
|
right: 0;
|
top: 0px;
|
}
|
|
</style>
|
|
</head>
|
|
<body onload="test()">
|
<div class="layui-form-item" style="margin-top:0.1rem !important;">
|
<label class="layui-form-label ">相对高度</label>
|
<div class="layui-input-inline">
|
<input id="height" value="0" type="text" lay-verify="pass" autocomplete="off" placeholder="请输入相对高度"
|
onkeyup="value=value.replace(/[^\d\.]/g,'')" class="layui-input ">
|
<span class="iptline" style="color: white;">(米)</span>
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label ">可见颜色</label>
|
<div class="layui-input-inline">
|
<input type="text" value="" placeholder="请选择颜色" class="layui-input" id="visibleArea-input">
|
<div id="visibleArea" class="smallbtn"></div>
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label ">不可见颜色</label>
|
<div class="layui-input-inline">
|
<!--//style="width: 120px;"-->
|
<input type="text" value="" placeholder="请选择颜色" class="layui-input" id="unVisibleArea-input">
|
<div id="unVisibleArea" class="smallbtn"></div>
|
</div>
|
|
</div>
|
|
<div class="layui-item" style=" width: 96%; margin: 0 auto 20px;text-align: center;">
|
<button type="button" class=" layui-btn layui-btn-normal " onclick="addViewshed()">添加视点</button>
|
<button type="button" class=" layui-btn layui-btn-normal " onclick="clearViewshed()">清除视域</button>
|
</div>
|
<script src="../jquery-2.0.3.js"></script>
|
<script src="../SmartEarthSDK/Workers/layui/layui.js"></script>
|
<script src="./js/layuiAnalysis.js"></script>
|
<script>
|
function test() {
|
let htmlDom = document.getElementsByTagName('html')[0]
|
htmlDom.style.fontSize = window.screen.availWidth / 3.75 + 'px';
|
console.log(htmlDom.style.fontSize)
|
}
|
var height = 0;
|
$('#height').on('input propertychange', function (event) {
|
var value = this.value;
|
if (value === '') {
|
height = 0;
|
} else {
|
value = value.replace(/[^\d\.]/g, '');
|
height = parseFloat(value);
|
}
|
});
|
|
function addViewshed() {
|
parent.SmartEarthPopupData.layerContainer && parent.SmartEarthPopupData.layerContainer.hide();
|
parent.addViewshed(height);
|
}
|
function clearViewshed() {
|
parent.clearnViewshed();
|
}
|
</script>
|
|
</body>
|
|
</html>
|