<!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>Property</title>
|
<link rel="stylesheet" href="../layui/css/layui.css">
|
<style>
|
body::-webkit-scrollbar {
|
/*滚动条整体样式*/
|
width: 8px;
|
/*高宽分别对应横竖滚动条的尺寸*/
|
height: 8px;
|
scrollbar-arrow-color: red;
|
}
|
|
body::-webkit-scrollbar-thumb {
|
border-radius: 5px;
|
-webkit-box-shadow: inset 0 0 5px rgba(218, 218, 218, 0.2);
|
box-shadow: inset 0 0 5px rgba(218, 218, 218, 0.2);
|
background: rgba(218, 218, 218, 0.5);
|
scrollbar-arrow-color: red;
|
}
|
|
body::-webkit-scrollbar-track {
|
-webkit-box-shadow: inset 0 0 5px rgba(218, 218, 218, 0.2);
|
box-shadow: inset 0 0 5px rgba(218, 218, 218, 0.2);
|
border-radius: 0;
|
background: rgba(218, 218, 218, 0.1);
|
}
|
|
html,
|
body,
|
#Attribute {
|
background-color: rgba(0, 0, 0, 0);
|
color: #fff;
|
}
|
|
.layui-form-item {
|
border: 1px #fff solid;
|
margin-bottom: 0px !important;
|
border-bottom: none;
|
}
|
|
.layui-input {
|
background-color: #fff !important;
|
height: 30px;
|
margin-top: 5px
|
}
|
|
.active {
|
border: 1px solid #fc0 !important;
|
box-shadow: 0 0 8px #ddd;
|
-moz-box-shadow: 0 0 8px #ddd;
|
-webkit-box-shadow: 0 0 8px #ddd;
|
cursor: pointer;
|
}
|
|
|
.layui-form-label {
|
width: 150px !important;
|
padding: 12px 10px !important;
|
border-right: 1px #fff solid;
|
font-weight: bold !important;
|
font-size: 14px;
|
text-align: center;
|
}
|
|
.layui-input-block {
|
width: 150px !important;
|
margin-left: 175px !important;
|
}
|
|
.mCSB_container {
|
margin-right: 17px !important;
|
}
|
|
legend {
|
text-align: center;
|
font-size: 16px;
|
font-weight: bold;
|
margin-bottom: 15px;
|
margin-top: 20px;
|
}
|
|
.removeGraphic {
|
position: absolute;
|
top: -9px;
|
right: 0;
|
}
|
|
.attrTitle {
|
position: relative;
|
}
|
|
.outline,
|
.background,
|
.topRadius {
|
display: none;
|
}
|
|
.color {
|
height: 42px;
|
}
|
|
.layui-form-select dl {
|
color: black
|
}
|
|
.layui-colorpicker-main-input input.layui-input {
|
width: 135px;
|
}
|
</style>
|
</head>
|
|
<body>
|
<div id="Attribute" style="margin:0 10px;">
|
<div class="attrTitle">
|
<legend id="styleInfo"></legend>
|
</div>
|
<!--基本点-->
|
<div class="props point" style="display: none">
|
<form class="layui-form" action="">
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelPointType"></label>
|
<div class="layui-input-block" style="line-height: 38px;" id="divPoint">
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelPointName"></label>
|
<div class="layui-input-block">
|
<input type="text" name="name" lay-verify="title" autocomplete="off" placeholder="0" value=""
|
class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelPointSize"></label>
|
<div class="layui-input-block">
|
<input type="number" name="size" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.]/g,'')" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelPointDepthText"></label>
|
<div class="layui-input-block">
|
<input type="checkbox" lay-skin="switch" id="isPointDisableDepthTest" lay-filter="isPointDisableDepthTest"
|
lay-text="">
|
</div>
|
</div>
|
<div class="layui-form-item color">
|
<label class="layui-form-label" id="labelPointFillColor"></label>
|
<div class="layui-input-block" onclick="changeLanguage()">
|
<div id="colorchk-point-fill" style="display: inline-block;margin-top: 2px;"></div>
|
</div>
|
</div>
|
<div class="layui-form-item" style="position:relative;">
|
<label class="layui-form-label" id="labelPointFillAlpha"></label>
|
<div class="layui-input-block" style="position: absolute;top: 16px">
|
<div id="opacity-point-fill" class="demo-slider"></div>
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelPointShowBorder"></label>
|
<div class="layui-input-block">
|
<input type="checkbox" lay-skin="switch" id="showPointOutline" lay-filter="showPointOutline" lay-text="">
|
</div>
|
</div>
|
<div class="layui-form-item outline">
|
<label class="layui-form-label" id="labelPointOutlineWidth"></label>
|
<div class="layui-input-block">
|
<input type="number" name="outlineWidth" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.]/g,'')" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item outline color">
|
<label class="layui-form-label" id="labelPointOutlineColor"></label>
|
<div class="layui-input-block" onclick="changeLanguage()">
|
<div id="colorchk-point-outline" style="display: inline-block;margin-top: 2px;"></div>
|
</div>
|
</div>
|
<div class="layui-form-item outline" style="position:relative;">
|
<label class="layui-form-label" id="labelPointOutlineAlpha"></label>
|
<div class="layui-input-block" style="position: absolute;top: 16px">
|
<div id="opacity-point-outline" class="demo-slider"></div>
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelPointDistanceDisplayNear"></label>
|
<div class="layui-input-block">
|
<input type="number" name="minViewDistance" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.]/g,'')" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item" style="border: 1px #fff solid">
|
<label class="layui-form-label" id="labelPointDistanceDisplayFar"></label>
|
<div class="layui-input-block">
|
<input type="number" name="maxViewDistance" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.]/g,'')" class="layui-input">
|
</div>
|
</div>
|
</form>
|
</div>
|
<!--图片点-->
|
<div class="props billboard" style="display: none">
|
<form class="layui-form" action="">
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelBillboardType"></label>
|
<div class="layui-input-block" style="line-height: 38px;" id="divBillboard">
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelBillboardName"></label>
|
<div class="layui-input-block">
|
<input type="text" name="name" lay-verify="title" autocomplete="off" placeholder="0" value=""
|
class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelBillboardImage"></label>
|
<div class="layui-input-block">
|
<input type="text" name="image" lay-verify="title" autocomplete="off" placeholder="0" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelBillboardScale"></label>
|
<div class="layui-input-block">
|
<input type="number" name="scale" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.]/g,'')" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelBillboardHAlign"></label>
|
<div class="layui-input-block">
|
<select name="horizontalOrigin" class="horizontalOrigin" lay-filter="horizontalOrigin" id="selectHAlign">
|
<option value="0"></option>
|
<option value="1"></option>
|
<option value="-1"></option>
|
</select>
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelBillboardVAlign"></label>
|
<div class="layui-input-block">
|
<select name="verticalOrigin" class="verticalOrigin" lay-filter="verticalOrigin" id="selectVAlign">
|
<option value="0"></option>
|
<option value="-1"></option>
|
<option value="1"></option>
|
<option value="2"></option>
|
</select>
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelBillboardRotate"></label>
|
<div class="layui-input-block">
|
<input type="number" name="rotation" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.\-]/g,'')" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelBillboardWidth"></label>
|
<div class="layui-input-block">
|
<input type="number" name="width" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.]/g,'')" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelBillboardHeight"></label>
|
<div class="layui-input-block">
|
<input type="number" name="height" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.]/g,'')" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelBillboardDepthText"></label>
|
<div class="layui-input-block">
|
<input type="checkbox" lay-skin="switch" id="isBillboardDisableDepthTest"
|
lay-filter="isBillboardDisableDepthTest" lay-text="">
|
</div>
|
</div>
|
<div class="layui-form-item color">
|
<label class="layui-form-label" id="labelBillboardFillColor"></label>
|
<div class="layui-input-block" onclick="changeLanguage()">
|
<div id="colorchk-billboard-fill" style="display: inline-block;margin-top: 2px;"></div>
|
</div>
|
</div>
|
<div class="layui-form-item" style="position:relative;">
|
<label class="layui-form-label" id="labelBillboardFillAlpha"></label>
|
<div class="layui-input-block" style="position: absolute;top: 16px">
|
<div id="opacity-billboard-fill" class="demo-slider"></div>
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelBillboardDistanceDisplayNear"></label>
|
<div class="layui-input-block">
|
<input type="number" name="minViewDistance" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.]/g,'')" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item" style="border: 1px #fff solid">
|
<label class="layui-form-label" id="labelBillboardDistanceDisplayFar"></label>
|
<div class="layui-input-block">
|
<input type="number" name="maxViewDistance" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.]/g,'')" class="layui-input">
|
</div>
|
</div>
|
</form>
|
</div>
|
<!--文本点-->
|
<div class="props label" style="display: none">
|
<form class="layui-form" action="">
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelTextType"></label>
|
<div class="layui-input-block" style="line-height: 38px;" id="divText">
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelTextName"></label>
|
<div class="layui-input-block">
|
<input type="text" name="name" lay-verify="title" autocomplete="off" placeholder="0" value=""
|
class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelTextContent"></label>
|
<div class="layui-input-block">
|
<input type="text" name="text" lay-verify="title" autocomplete="off" placeholder="0" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelTextFont"></label>
|
<div class="layui-input-block">
|
<input type="text" name="font" lay-verify="title" autocomplete="off" placeholder="0" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelTextHAlign"></label>
|
<div class="layui-input-block">
|
<select name="horizontalOrigin" class="horizontalOrigin" lay-filter="horizontalOrigin"
|
id="selectTextHAlign">
|
<option value="0"></option>
|
<option value="1"></option>
|
<option value="-1"></option>
|
</select>
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelTextVAlign"></label>
|
<div class="layui-input-block">
|
<select name="verticalOrigin" class="verticalOrigin" lay-filter="verticalOrigin" id="selectTextVAlign">
|
<option value="0"></option>
|
<option value="-1"></option>
|
<option value="1"></option>
|
<option value="2"></option>
|
</select>
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelTextScale"></label>
|
<div class="layui-input-block">
|
<input type="number" name="scale" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.]/g,'')" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelTextDepthTest"></label>
|
<div class="layui-input-block">
|
<input type="checkbox" lay-skin="switch" id="isLabelDisableDepthTest" lay-filter="isLabelDisableDepthTest"
|
lay-text="">
|
</div>
|
</div>
|
<div class="layui-form-item color">
|
<label class="layui-form-label" id="labelTextFillColor"></label>
|
<div class="layui-input-block" onclick="changeLanguage()">
|
<div id="colorchk-label-fill" style="display: inline-block;margin-top: 2px;"></div>
|
</div>
|
</div>
|
<div class="layui-form-item" style="position:relative;">
|
<label class="layui-form-label" id="labelTextFillAlpha"></label>
|
<div class="layui-input-block" style="position: absolute;top: 16px">
|
<div id="opacity-label-fill" class="demo-slider"></div>
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelTextShowBorder"></label>
|
<div class="layui-input-block">
|
<input type="checkbox" lay-skin="switch" id="showLabelOutline" lay-filter="showLabelOutline" lay-text="">
|
</div>
|
</div>
|
<div class="layui-form-item outline">
|
<label class="layui-form-label" id="labelTextOutlineWidth"></label>
|
<div class="layui-input-block">
|
<input type="number" name="outlineWidth" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.]/g,'')" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item outline color">
|
<label class="layui-form-label" id="labelTextOutlineColor"></label>
|
<div class="layui-input-block" onclick="changeLanguage()">
|
<div id="colorchk-label-outline" style="display: inline-block;margin-top: 2px;"></div>
|
</div>
|
</div>
|
<div class="layui-form-item outline" style="position:relative;">
|
<label class="layui-form-label" id="labelTextOutlineAlpha"></label>
|
<div class="layui-input-block" style="position: absolute;top: 16px">
|
<div id="opacity-label-outline" class="demo-slider"></div>
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelTextShowBG"></label>
|
<div class="layui-input-block">
|
<input type="checkbox" lay-skin="switch" id="showLabelBackground" lay-filter="showLabelBackground"
|
lay-text="">
|
</div>
|
</div>
|
<div class="layui-form-item background color">
|
<label class="layui-form-label" id="labelTextBGColor"></label>
|
<div class="layui-input-block" onclick="changeLanguage()">
|
<div id="colorchk-label-background" style="display: inline-block;margin-top: 2px;"></div>
|
</div>
|
</div>
|
<div class="layui-form-item background" style="position:relative;">
|
<label class="layui-form-label" id="labelTextBGAlpha"></label>
|
<div class="layui-input-block" style="position: absolute;top: 16px">
|
<div id="opacity-label-background" class="demo-slider"></div>
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelTextDistanceDisplayNear"></label>
|
<div class="layui-input-block">
|
<input type="number" name="minViewDistance" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.]/g,'')" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item" style="border: 1px #fff solid">
|
<label class="layui-form-label" id="labelTextDistanceDisplayFar"></label>
|
<div class="layui-input-block">
|
<input type="number" name="maxViewDistance" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.]/g,'')" class="layui-input">
|
</div>
|
</div>
|
</form>
|
</div>
|
<!--模型点-->
|
<div class="props model" style="display: none">
|
<form class="layui-form" action="">
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelModelType"></label>
|
<div class="layui-input-block" style="line-height: 38px;" id="divModel">
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelModelName"></label>
|
<div class="layui-input-block">
|
<input type="text" name="name" lay-verify="title" autocomplete="off" placeholder="0" value=""
|
class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelModelUrl"></label>
|
<div class="layui-input-block">
|
<input type="text" name="url" lay-verify="title" autocomplete="off" placeholder="0" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelModelHeight"></label>
|
<div class="layui-input-block">
|
<input type="number" name="height" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.\-]/g,'')" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelModelScale"></label>
|
<div class="layui-input-block">
|
<input type="number" name="scale" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.]/g,'')" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelModelMinPixelSize"></label>
|
<div class="layui-input-block">
|
<input type="number" name="minimumPixelSize" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.]/g,'')" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelModelRunAnimate"></label>
|
<div class="layui-input-block">
|
<input type="checkbox" lay-skin="switch" id="runAnimations" lay-filter="runAnimations" lay-text="">
|
</div>
|
</div>
|
<div class="layui-form-item color">
|
<label class="layui-form-label" id="labelModelFillColor"></label>
|
<div class="layui-input-block" onclick="changeLanguage()">
|
<div id="colorchk-model-fill" style="display: inline-block;margin-top: 2px;"></div>
|
</div>
|
</div>
|
<div class="layui-form-item" style="position:relative;">
|
<label class="layui-form-label" id="labelModelFillAlpha"></label>
|
<div class="layui-input-block" style="position: absolute;top: 16px">
|
<div id="opacity-model-fill" class="demo-slider"></div>
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelModelAutoRotate"></label>
|
<div class="layui-input-block">
|
<input type="checkbox" lay-skin="switch" id="autoRotate" lay-filter="autoRotate" lay-text="">
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelModelHeading"></label>
|
<div class="layui-input-block">
|
<input type="number" name="heading" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.\-]/g,'')" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelModelPitch"></label>
|
<div class="layui-input-block">
|
<input type="number" name="pitch" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.\-]/g,'')" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelModelRoll"></label>
|
<div class="layui-input-block">
|
<input type="number" name="roll" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.\-]/g,'')" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelModelDistanceDisplayNear"></label>
|
<div class="layui-input-block">
|
<input type="number" name="minViewDistance" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.]/g,'')" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item" style="border: 1px #fff solid">
|
<label class="layui-form-label" id="labelModelDistanceDisplayFar"></label>
|
<div class="layui-input-block">
|
<input type="number" name="maxViewDistance" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.]/g,'')" class="layui-input">
|
</div>
|
</div>
|
</form>
|
</div>
|
<!--线-->
|
<div class="props polyline" style="display: none">
|
<form class="layui-form" action="">
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelLineType"></label>
|
<div class="layui-input-block" style="line-height: 38px;" id="divPolyline">
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelLineName"></label>
|
<div class="layui-input-block">
|
<input type="text" name="name" lay-verify="title" autocomplete="off" placeholder="0" value=""
|
class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelPolylineLineWidth"></label>
|
<div class="layui-input-block">
|
<input type="number" name="width" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.]/g,'')" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelLineClampToGround"></label>
|
<div class="layui-input-block">
|
<input type="checkbox" lay-skin="switch" id="showClampToGround_Polyline" lay-filter="showClampToGround"
|
lay-text="">
|
</div>
|
</div>
|
<div class="layui-form-item color">
|
<label class="layui-form-label" id="labelPolylineFillColor"></label>
|
<div class="layui-input-block" onclick="changeLanguage()">
|
<div id="colorchk-polyline-fill" style="display: inline-block;margin-top: 2px;"></div>
|
</div>
|
</div>
|
<div class="layui-form-item" style="position:relative;">
|
<label class="layui-form-label" id="labelPolylineFillAlpha"></label>
|
<div class="layui-input-block" style="position: absolute;top: 16px">
|
<div id="opacity-polyline-fill" class="demo-slider"></div>
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelPolylineShowBorder"></label>
|
<div class="layui-input-block">
|
<input type="checkbox" lay-skin="switch" id="showPolylineOutline" lay-filter="showPolylineOutline"
|
lay-text="">
|
</div>
|
</div>
|
<div class="layui-form-item outline">
|
<label class="layui-form-label" id="labelPolylineOutlineWidth"></label>
|
<div class="layui-input-block">
|
<input type="number" name="outlineWidth" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.]/g,'')" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item outline color">
|
<label class="layui-form-label" id="labelPolylineOutlineColor"></label>
|
<div class="layui-input-block" onclick="changeLanguage()">
|
<div id="colorchk-polyline-outline" style="display: inline-block;margin-top: 2px;"></div>
|
</div>
|
</div>
|
<div class="layui-form-item outline" style="position:relative;">
|
<label class="layui-form-label" id="labelPolylineOutlineAlpha"></label>
|
<div class="layui-input-block" style="position: absolute;top: 16px">
|
<div id="opacity-polyline-outline" class="demo-slider"></div>
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelPolylineDistanceDisplayNear"></label>
|
<div class="layui-input-block">
|
<input type="number" name="minViewDistance" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.]/g,'')" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item" style="border: 1px #fff solid">
|
<label class="layui-form-label" id="labelPolylineDistanceDisplayFar"></label>
|
<div class="layui-input-block">
|
<input type="number" name="maxViewDistance" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.]/g,'')" class="layui-input">
|
</div>
|
</div>
|
</form>
|
</div>
|
<!--多边形-->
|
<div class="props polygon" style="display: none">
|
<form class="layui-form" action="">
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelPolygonType"></label>
|
<div class="layui-input-block" style="line-height: 38px;" id="divPolygon">
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelPolygonName"></label>
|
<div class="layui-input-block">
|
<input type="text" name="name" lay-verify="title" autocomplete="off" placeholder="0" value=""
|
class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelPolygonClampToGround"></label>
|
<div class="layui-input-block">
|
<input type="checkbox" lay-skin="switch" id="showClampToGround_Polygon" lay-filter="showClampToGround"
|
lay-text="">
|
</div>
|
</div>
|
<div class="layui-form-item color">
|
<label class="layui-form-label" id="labelPolygonFillColor"></label>
|
<div class="layui-input-block" onclick="changeLanguage()">
|
<div id="colorchk-polygon-fill" style="display: inline-block;margin-top: 2px;"></div>
|
</div>
|
</div>
|
<div class="layui-form-item" style="position:relative">
|
<label class="layui-form-label" id="labelPolygonFillAlpha"></label>
|
<div class="layui-input-block" style="position: absolute;top: 16px">
|
<div id="opacity-polygon-fill" class="demo-slider"></div>
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelPolygonShowBorder"></label>
|
<div class="layui-input-block">
|
<input type="checkbox" lay-skin="switch" id="showPolygonOutline" lay-filter="showPolygonOutline"
|
lay-text="">
|
</div>
|
</div>
|
<div class="layui-form-item outline color">
|
<label class="layui-form-label" id="labelPolygonOutlineColor"></label>
|
<div class="layui-input-block" onclick="changeLanguage()">
|
<div id="colorchk-polygon-outline" style="display: inline-block;margin-top: 2px;"></div>
|
</div>
|
</div>
|
<div class="layui-form-item outline" style="position:relative;">
|
<label class="layui-form-label" id="labelPolygonOutlineAlpha"></label>
|
<div class="layui-input-block" style="position: absolute;top: 16px">
|
<div id="opacity-polygon-outline" class="demo-slider"></div>
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelPolygonDistanceDisplayNear"></label>
|
<div class="layui-input-block">
|
<input type="number" name="minViewDistance" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.]/g,'')" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item" style="border: 1px #fff solid">
|
<label class="layui-form-label" id="labelPolygonDistanceDisplayFar"></label>
|
<div class="layui-input-block">
|
<input type="number" name="maxViewDistance" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.]/g,'')" class="layui-input">
|
</div>
|
</div>
|
</form>
|
</div>
|
<!--矩形-->
|
<div class="props rectangle" style="display: none">
|
<form class="layui-form" action="">
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelRectType"></label>
|
<div class="layui-input-block" style="line-height: 38px;" id="divRectangle">
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelRectName"></label>
|
<div class="layui-input-block">
|
<input type="text" name="name" lay-verify="title" autocomplete="off" placeholder="0" value=""
|
class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelRectClampToGround"></label>
|
<div class="layui-input-block">
|
<input type="checkbox" lay-skin="switch" id="showClampToGround_Rectangle" lay-filter="showClampToGround"
|
lay-text="">
|
</div>
|
</div>
|
<div class="layui-form-item height">
|
<label class="layui-form-label" id="labelRectHeight"></label>
|
<div class="layui-input-block">
|
<input type="number" name="height" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.\-]/g,'')" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelRectRotate"></label>
|
<div class="layui-input-block">
|
<input type="number" name="rotation" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.\-]/g,'')" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item color">
|
<label class="layui-form-label" id="labelRectFillColor"></label>
|
<div class="layui-input-block" onclick="changeLanguage()">
|
<div id="colorchk-rectangle-fill" style="display: inline-block;margin-top: 2px;"></div>
|
</div>
|
</div>
|
<div class="layui-form-item" style="position:relative">
|
<label class="layui-form-label" id="labelRectFillAlpha"></label>
|
<div class="layui-input-block" style="position: absolute;top: 16px">
|
<div id="opacity-rectangle-fill" class="demo-slider"></div>
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelRectShowBorder"></label>
|
<div class="layui-input-block">
|
<input type="checkbox" lay-skin="switch" id="showRectangleOutline" lay-filter="showRectangleOutline"
|
lay-text="">
|
</div>
|
</div>
|
<div class="layui-form-item outline color">
|
<label class="layui-form-label" id="labelRectOutlineColor"></label>
|
<div class="layui-input-block" onclick="changeLanguage()">
|
<div id="colorchk-rectangle-outline" style="display: inline-block;margin-top: 2px;"></div>
|
</div>
|
</div>
|
<div class="layui-form-item outline" style="position:relative;">
|
<label class="layui-form-label" id="labelRectOutlineAlpha"></label>
|
<div class="layui-input-block" style="position: absolute;top: 16px">
|
<div id="opacity-rectangle-outline" class="demo-slider"></div>
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelRectDistanceDisplayNear"></label>
|
<div class="layui-input-block">
|
<input type="number" name="minViewDistance" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.]/g,'')" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item" style="border: 1px #fff solid">
|
<label class="layui-form-label" id="labelRectDistanceDisplayFar"></label>
|
<div class="layui-input-block">
|
<input type="number" name="maxViewDistance" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.]/g,'')" class="layui-input">
|
</div>
|
</div>
|
</form>
|
</div>
|
<!--圆形-->
|
<div class="props ellipse" style="display: none">
|
<form class="layui-form" action="">
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelCircleType"></label>
|
<div class="layui-input-block" style="line-height: 38px;" id="divCircle">
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelCircleName"></label>
|
<div class="layui-input-block">
|
<input type="text" name="name" lay-verify="title" autocomplete="off" placeholder="0" value=""
|
class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelCircleClampToGround"></label>
|
<div class="layui-input-block">
|
<input type="checkbox" lay-skin="switch" id="showClampToGround_Ellipse" lay-filter="showClampToGround"
|
lay-text="">
|
</div>
|
</div>
|
<div class="layui-form-item height">
|
<label class="layui-form-label" id="labelCircleHeight"></label>
|
<div class="layui-input-block">
|
<input type="number" name="height" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.\-]/g,'')" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelCircleRadius"></label>
|
<div class="layui-input-block">
|
<input type="number" name="radius" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.]/g,'')" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item color">
|
<label class="layui-form-label" id="labelCircleFillColor"></label>
|
<div class="layui-input-block" onclick="changeLanguage()">
|
<div id="colorchk-ellipse-fill" style="display: inline-block;margin-top: 2px;"></div>
|
</div>
|
</div>
|
<div class="layui-form-item" style="position:relative">
|
<label class="layui-form-label" id="labelCircleFillAlpha"></label>
|
<div class="layui-input-block" style="position: absolute;top: 16px">
|
<div id="opacity-ellipse-fill" class="demo-slider"></div>
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelCircleShowBorder"></label>
|
<div class="layui-input-block">
|
<input type="checkbox" lay-skin="switch" id="showEllipseOutline" lay-filter="showEllipseOutline"
|
lay-text="">
|
</div>
|
</div>
|
<div class="layui-form-item outline color">
|
<label class="layui-form-label" id="labelCircleOutlineColor"></label>
|
<div class="layui-input-block" onclick="changeLanguage()">
|
<div id="colorchk-ellipse-outline" style="display: inline-block;margin-top: 2px;"></div>
|
</div>
|
</div>
|
<div class="layui-form-item outline" style="position:relative;">
|
<label class="layui-form-label" id="labelCircleOutlineAlpha"></label>
|
<div class="layui-input-block" style="position: absolute;top: 16px">
|
<div id="opacity-ellipse-outline" class="demo-slider"></div>
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelCircleDistanceDisplayNear"></label>
|
<div class="layui-input-block">
|
<input type="number" name="minViewDistance" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.]/g,'')" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item" style="border: 1px #fff solid">
|
<label class="layui-form-label" id="labelCircleDistanceDisplayFar"></label>
|
<div class="layui-input-block">
|
<input type="number" name="maxViewDistance" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.]/g,'')" class="layui-input">
|
</div>
|
</div>
|
</form>
|
</div>
|
<!--多边体-->
|
<div class="props ExtrudedPolygon" style="display: none">
|
<form class="layui-form" action="">
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelExtrudePolygonType"></label>
|
<div class="layui-input-block" style="line-height: 38px;" id="divExtrudePolygon">
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelExtrudePolygonName"></label>
|
<div class="layui-input-block">
|
<input type="text" name="name" lay-verify="title" autocomplete="off" placeholder="0" value=""
|
class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelExtrudePolygonHeight"></label>
|
<div class="layui-input-block">
|
<input type="number" name="height" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.]/g,'')" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelExtrudePolygonExtrudeHeight"></label>
|
<div class="layui-input-block">
|
<input type="number" name="extrudedHeight" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.]/g,'')" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item color">
|
<label class="layui-form-label" id="labelExtrudePolygonFillColor"></label>
|
<div class="layui-input-block" onclick="changeLanguage()">
|
<div id="colorchk-ExtrudedPolygon-fill" style="display: inline-block;margin-top: 2px;"></div>
|
</div>
|
</div>
|
<div class="layui-form-item" style="position:relative">
|
<label class="layui-form-label" id="labelExtrudePolygonFillAlpha"></label>
|
<div class="layui-input-block" style="position: absolute;top: 16px">
|
<div id="opacity-ExtrudedPolygon-fill" class="demo-slider"></div>
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelExtrudePolygonShowBorder"></label>
|
<div class="layui-input-block">
|
<input type="checkbox" lay-skin="switch" id="showExtrudedPolygonOutline"
|
lay-filter="showExtrudedPolygonOutline" lay-text="">
|
</div>
|
</div>
|
<div class="layui-form-item outline color">
|
<label class="layui-form-label" id="labelExtrudePolygonOutlineColor"></label>
|
<div class="layui-input-block" onclick="changeLanguage()">
|
<div id="colorchk-ExtrudedPolygon-outline" style="display: inline-block;margin-top: 2px;"></div>
|
</div>
|
</div>
|
<div class="layui-form-item outline" style="position:relative;">
|
<label class="layui-form-label" id="labelExtrudePolygonOutlineAlpha"></label>
|
<div class="layui-input-block" style="position: absolute;top: 16px">
|
<div id="opacity-ExtrudedPolygon-outline" class="demo-slider"></div>
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelExtrudePolygonDistanceDisplayNear"></label>
|
<div class="layui-input-block">
|
<input type="number" name="minViewDistance" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.]/g,'')" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item" style="border: 1px #fff solid">
|
<label class="layui-form-label" id="labelExtrudePolygonDistanceDisplayFar"></label>
|
<div class="layui-input-block">
|
<input type="number" name="maxViewDistance" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.]/g,'')" class="layui-input">
|
</div>
|
</div>
|
</form>
|
</div>
|
<!--立方体-->
|
<div class="props box" style="display: none">
|
<form class="layui-form" action="">
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelCubeType"></label>
|
<div class="layui-input-block" style="line-height: 38px;" id="divCube">
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelCubeName"></label>
|
<div class="layui-input-block">
|
<input type="text" name="name" lay-verify="title" autocomplete="off" placeholder="0" value=""
|
class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelCubeLength"></label>
|
<div class="layui-input-block">
|
<input type="number" name="long" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.]/g,'')" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelCubeWidth"></label>
|
<div class="layui-input-block">
|
<input type="number" name="width" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.]/g,'')" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelCubeHeight"></label>
|
<div class="layui-input-block">
|
<input type="number" name="height" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.]/g,'')" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item color">
|
<label class="layui-form-label" id="labelCubeFillColor"></label>
|
<div class="layui-input-block" onclick="changeLanguage()">
|
<div id="colorchk-box-fill" style="display: inline-block;margin-top: 2px;"></div>
|
</div>
|
</div>
|
<div class="layui-form-item" style="position:relative">
|
<label class="layui-form-label" id="labelCubeFillAlpha"></label>
|
<div class="layui-input-block" style="position: absolute;top: 16px">
|
<div id="opacity-box-fill" class="demo-slider"></div>
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelCubeShoBorder"></label>
|
<div class="layui-input-block">
|
<input type="checkbox" lay-skin="switch" id="showBoxOutline" lay-filter="showBoxOutline" lay-text="">
|
</div>
|
</div>
|
<div class="layui-form-item outline color">
|
<label class="layui-form-label" id="labelCubeOutlineColor"></label>
|
<div class="layui-input-block" onclick="changeLanguage()">
|
<div id="colorchk-box-outline" style="display: inline-block;margin-top: 2px;"></div>
|
</div>
|
</div>
|
<div class="layui-form-item outline" style="position:relative;">
|
<label class="layui-form-label" id="labelCubeOutlineAlpha"></label>
|
<div class="layui-input-block" style="position: absolute;top: 16px">
|
<div id="opacity-box-outline" class="demo-slider"></div>
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelCubeDistanceDisplayNear"></label>
|
<div class="layui-input-block">
|
<input type="number" name="minViewDistance" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.]/g,'')" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item" style="border: 1px #fff solid">
|
<label class="layui-form-label" id="labelCubeDistanceDisplayFar"></label>
|
<div class="layui-input-block">
|
<input type="number" name="maxViewDistance" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.]/g,'')" class="layui-input">
|
</div>
|
</div>
|
</form>
|
</div>
|
<!--圆柱/锥体-->
|
<div class="props cylinder" style="display: none">
|
<form class="layui-form" action="">
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelCylinderType"></label>
|
<div class="layui-input-block cylinderType" style="line-height: 38px;" id="divCylinder">
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelCylinderName"></label>
|
<div class="layui-input-block">
|
<input type="text" name="name" lay-verify="title" autocomplete="off" placeholder="0" value=""
|
class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelCylinderRadius"></label>
|
<div class="layui-input-block">
|
<input type="number" name="radius" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.]/g,'')" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item topRadius">
|
<label class="layui-form-label" id="labelCylinderTopRadius"></label>
|
<div class="layui-input-block">
|
<input type="number" name="topRadius" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.]/g,'')" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelCylinderHeight"></label>
|
<div class="layui-input-block">
|
<input type="number" name="height" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.]/g,'')" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item color">
|
<label class="layui-form-label" id="labelCylinderFillColor"></label>
|
<div class="layui-input-block" onclick="changeLanguage()">
|
<div id="colorchk-cylinder-fill" style="display: inline-block;margin-top: 2px;"></div>
|
</div>
|
</div>
|
<div class="layui-form-item" style="position:relative">
|
<label class="layui-form-label" id="labelCylinderFillAlpha"></label>
|
<div class="layui-input-block" style="position: absolute;top: 16px">
|
<div id="opacity-cylinder-fill" class="demo-slider"></div>
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelCylinderShowBorder"></label>
|
<div class="layui-input-block">
|
<input type="checkbox" lay-skin="switch" id="showCylinderOutline" lay-filter="showCylinderOutline"
|
lay-text="">
|
</div>
|
</div>
|
<div class="layui-form-item outline color">
|
<label class="layui-form-label" id="labelCylinderOutlineColor"></label>
|
<div class="layui-input-block" onclick="changeLanguage()">
|
<div id="colorchk-cylinder-outline" style="display: inline-block;margin-top: 2px;"></div>
|
</div>
|
</div>
|
<div class="layui-form-item outline" style="position:relative;">
|
<label class="layui-form-label" id="labelCylinderOutlineAlpha"></label>
|
<div class="layui-input-block" style="position: absolute;top: 16px">
|
<div id="opacity-cylinder-outline" class="demo-slider"></div>
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelCylinderDistanceDisplayNear"></label>
|
<div class="layui-input-block">
|
<input type="number" name="minViewDistance" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.]/g,'')" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item" style="border: 1px #fff solid">
|
<label class="layui-form-label" id="labelCylinderDistanceDisplayFar"></label>
|
<div class="layui-input-block">
|
<input type="number" name="maxViewDistance" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.]/g,'')" class="layui-input">
|
</div>
|
</div>
|
</form>
|
</div>
|
<!--球体-->
|
<div class="props ellipsoid" style="display: none">
|
<form class="layui-form" action="">
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelSphereType"></label>
|
<div class="layui-input-block" style="line-height: 38px;" id="divSphere">
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelSphereName"></label>
|
<div class="layui-input-block">
|
<input type="text" name="name" lay-verify="title" autocomplete="off" placeholder="0" value=""
|
class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelSphereRadius"></label>
|
<div class="layui-input-block">
|
<input type="number" name="radius" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.]/g,'')" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item color">
|
<label class="layui-form-label" id="labelSphereFillColor"></label>
|
<div class="layui-input-block" onclick="changeLanguage()">
|
<div id="colorchk-ellipsoid-fill" style="display: inline-block;margin-top: 2px;"></div>
|
</div>
|
</div>
|
<div class="layui-form-item" style="position:relative">
|
<label class="layui-form-label" id="labelSphereFillAlpha"></label>
|
<div class="layui-input-block" style="position: absolute;top: 16px">
|
<div id="opacity-ellipsoid-fill" class="demo-slider"></div>
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelSphereShowBorder"></label>
|
<div class="layui-input-block">
|
<input type="checkbox" lay-skin="switch" id="showEllipsoidOutline" lay-filter="showEllipsoidOutline"
|
lay-text="">
|
</div>
|
</div>
|
<div class="layui-form-item outline color">
|
<label class="layui-form-label" id="labelSphereOutlineColor"></label>
|
<div class="layui-input-block" onclick="changeLanguage()">
|
<div id="colorchk-ellipsoid-outline" style="display: inline-block;margin-top: 2px;"></div>
|
</div>
|
</div>
|
<div class="layui-form-item outline" style="position:relative;">
|
<label class="layui-form-label" id="labelSphereOutlineAlpha"></label>
|
<div class="layui-input-block" style="position: absolute;top: 16px">
|
<div id="opacity-ellipsoid-outline" class="demo-slider"></div>
|
</div>
|
</div>
|
<div class="layui-form-item">
|
<label class="layui-form-label" id="labelSphereDistanceDisplayNear"></label>
|
<div class="layui-input-block">
|
<input type="number" name="minViewDistance" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.]/g,'')" class="layui-input">
|
</div>
|
</div>
|
<div class="layui-form-item" style="border: 1px #fff solid">
|
<label class="layui-form-label" id="labelSphereDistanceDisplayFar"></label>
|
<div class="layui-input-block">
|
<input type="number" name="maxViewDistance" lay-verify="title" autocomplete="off" placeholder="0"
|
onkeyup="value=value.replace(/[^\d\.]/g,'')" class="layui-input">
|
</div>
|
</div>
|
</form>
|
</div>
|
</div>
|
<script src="../layui/layui.js"></script>
|
<script>
|
var Viewer = parent.Viewer;
|
var Cesium = parent.Cesium;
|
var PopupData = parent.SmartEarthPopupData;
|
var type = PopupData.propType;
|
var editGraphic = PopupData.editGraphic;
|
!editGraphic && (editGraphic = {});
|
|
function changeLanguage () {
|
var elementClear = document.getElementsByClassName("layui-btn layui-btn-sm")
|
if (elementClear.length === 2) {
|
elementClear[0].innerText = `${Viewer.language.COMMON_CLEAR}`
|
elementClear[1].innerText = `${Viewer.language.COMMON_CONFIRM}`
|
}
|
}
|
|
document.getElementById("styleInfo").innerText = `${Viewer.language.SG_STYLE_INFO}`
|
//基本点
|
document.getElementById("labelPointType").innerText = `${Viewer.language.SG_PROP_TYPE}`
|
document.getElementById("labelPointName").innerText = `${Viewer.language.SG_PROP_NAME}`
|
document.getElementById("divPoint").innerText = `${Viewer.language.SG_PROP_POINT}`
|
document.getElementById("labelPointSize").innerText = `${Viewer.language.SG_PROP_SIZE}`
|
document.getElementById("isPointDisableDepthTest").setAttribute("lay-text", `${Viewer.language.SG_ON_OR_OFF}`)
|
document.getElementById("showPointOutline").setAttribute("lay-text", `${Viewer.language.SG_ON_OR_OFF}`)
|
document.getElementById("labelPointDepthText").innerText = `${Viewer.language.SG_PROP_DEPTH_TEST}`
|
document.getElementById("labelPointFillColor").innerText = `${Viewer.language.SG_PROP_FILL_COLOR}`
|
document.getElementById("labelPointFillAlpha").innerText = `${Viewer.language.SG_PROP_FILL_ALPHA}`
|
document.getElementById("labelPointShowBorder").innerText = `${Viewer.language.SG_PROP_SHOW_BORDER}`
|
document.getElementById("labelPointOutlineWidth").innerText = `${Viewer.language.SG_PROP_OUTLINE_WIDTH}`
|
document.getElementById("labelPointOutlineColor").innerText = `${Viewer.language.SG_PROP_BORDER_COLOR}`
|
document.getElementById("labelPointOutlineAlpha").innerText = `${Viewer.language.SG_PROP_BORDER_ALPHA}`
|
document.getElementById("labelPointDistanceDisplayNear").innerText = `${Viewer.language.SG_PROP_DISTANCE_DISPLAY_NEAR}`
|
document.getElementById("labelPointDistanceDisplayFar").innerText = `${Viewer.language.SG_PROP_DISTANCE_DISPLAY_FAR}`
|
//图片点
|
document.getElementById("labelBillboardType").innerText = `${Viewer.language.SG_PROP_TYPE}`
|
document.getElementById("labelBillboardName").innerText = `${Viewer.language.SG_PROP_NAME}`
|
document.getElementById("isBillboardDisableDepthTest").setAttribute("lay-text", `${Viewer.language.SG_ON_OR_OFF}`)
|
document.getElementById("labelBillboardDepthText").innerText = `${Viewer.language.SG_PROP_DEPTH_TEST}`
|
document.getElementById("labelBillboardFillColor").innerText = `${Viewer.language.SG_PROP_FILL_COLOR}`
|
document.getElementById("labelBillboardFillAlpha").innerText = `${Viewer.language.SG_PROP_FILL_ALPHA}`
|
document.getElementById("labelBillboardDistanceDisplayNear").innerText = `${Viewer.language.SG_PROP_DISTANCE_DISPLAY_NEAR}`
|
document.getElementById("labelBillboardDistanceDisplayFar").innerText = `${Viewer.language.SG_PROP_DISTANCE_DISPLAY_FAR}`
|
document.getElementById("divBillboard").innerText = `${Viewer.language.SG_PROP_BILLBOARD}`
|
document.getElementById("labelBillboardImage").innerText = `${Viewer.language.SG_PROP_IMAGE_URL}`
|
document.getElementById("labelBillboardScale").innerText = `${Viewer.language.SG_PROP_SCALE}`
|
document.getElementById("labelBillboardHAlign").innerText = `${Viewer.language.SG_PROP_H_ALIGNMENT}`
|
document.getElementById("labelBillboardVAlign").innerText = `${Viewer.language.SG_PROP_V_ALIGNMENT}`
|
var selectH = document.getElementById("selectHAlign");
|
selectH.options[0].innerText = `${Viewer.language.SG_PROP_ALIGN_CENTER}`
|
selectH.options[1].innerText = `${Viewer.language.SG_PROP_ALIGN_LEFT}`
|
selectH.options[2].innerText = `${Viewer.language.SG_PROP_ALIGN_RIGHT}`
|
var selectV = document.getElementById("selectVAlign");
|
selectV.options[0].innerText = `${Viewer.language.SG_PROP_ALIGN_CENTER}`
|
selectV.options[1].innerText = `${Viewer.language.SG_PROP_ALIGN_TOP}`
|
selectV.options[2].innerText = `${Viewer.language.SG_PROP_ALIGN_BOTTOM}`
|
selectV.options[3].innerText = `${Viewer.language.SG_PROP_ALIGN_BASE}`
|
document.getElementById("labelBillboardRotate").innerText = `${Viewer.language.SG_PROP_ROTATE}`
|
document.getElementById("labelBillboardWidth").innerText = `${Viewer.language.SG_PROP_WIDTH}`
|
document.getElementById("labelBillboardHeight").innerText = `${Viewer.language.SG_PROP_HEIGHT}`
|
//文本点
|
document.getElementById("labelTextType").innerText = `${Viewer.language.SG_PROP_TYPE}`
|
document.getElementById("labelTextName").innerText = `${Viewer.language.SG_PROP_NAME}`
|
document.getElementById("isLabelDisableDepthTest").setAttribute("lay-text", `${Viewer.language.SG_ON_OR_OFF}`)
|
document.getElementById("showLabelOutline").setAttribute("lay-text", `${Viewer.language.SG_ON_OR_OFF}`)
|
document.getElementById("showLabelBackground").setAttribute("lay-text", `${Viewer.language.SG_ON_OR_OFF}`)
|
document.getElementById("labelTextDepthTest").innerText = `${Viewer.language.SG_PROP_DEPTH_TEST}`
|
document.getElementById("labelTextFillColor").innerText = `${Viewer.language.SG_PROP_FILL_COLOR}`
|
document.getElementById("labelTextFillAlpha").innerText = `${Viewer.language.SG_PROP_FILL_ALPHA}`
|
document.getElementById("labelTextShowBorder").innerText = `${Viewer.language.SG_PROP_SHOW_BORDER}`
|
document.getElementById("labelTextOutlineWidth").innerText = `${Viewer.language.SG_PROP_OUTLINE_WIDTH}`
|
document.getElementById("labelTextOutlineColor").innerText = `${Viewer.language.SG_PROP_BORDER_COLOR}`
|
document.getElementById("labelTextOutlineAlpha").innerText = `${Viewer.language.SG_PROP_BORDER_ALPHA}`
|
document.getElementById("labelTextDistanceDisplayNear").innerText = `${Viewer.language.SG_PROP_DISTANCE_DISPLAY_NEAR}`
|
document.getElementById("labelTextDistanceDisplayFar").innerText = `${Viewer.language.SG_PROP_DISTANCE_DISPLAY_FAR}`
|
document.getElementById("labelTextScale").innerText = `${Viewer.language.SG_PROP_SCALE}`
|
document.getElementById("labelTextHAlign").innerText = `${Viewer.language.SG_PROP_H_ALIGNMENT}`
|
document.getElementById("labelTextVAlign").innerText = `${Viewer.language.SG_PROP_V_ALIGNMENT}`
|
document.getElementById("divText").innerText = `${Viewer.language.SG_PROP_TEXT}`
|
document.getElementById("labelTextContent").innerText = `${Viewer.language.SG_PROP_CONTENT}`
|
document.getElementById("labelTextFont").innerText = `${Viewer.language.SG_PROP_FONT}`
|
var selectTextH = document.getElementById("selectTextHAlign");
|
selectTextH.options[0].innerText = `${Viewer.language.SG_PROP_ALIGN_CENTER}`
|
selectTextH.options[1].innerText = `${Viewer.language.SG_PROP_ALIGN_LEFT}`
|
selectTextH.options[2].innerText = `${Viewer.language.SG_PROP_ALIGN_RIGHT}`
|
var selectTextV = document.getElementById("selectTextVAlign");
|
selectTextV.options[0].innerText = `${Viewer.language.SG_PROP_ALIGN_CENTER}`
|
selectTextV.options[1].innerText = `${Viewer.language.SG_PROP_ALIGN_TOP}`
|
selectTextV.options[2].innerText = `${Viewer.language.SG_PROP_ALIGN_BOTTOM}`
|
selectTextV.options[3].innerText = `${Viewer.language.SG_PROP_ALIGN_BASE}`
|
document.getElementById("labelTextShowBG").innerText = `${Viewer.language.SG_PROP_SHOW_BG}`
|
document.getElementById("labelTextBGColor").innerText = `${Viewer.language.SG_PROP_BG_COLOR}`
|
document.getElementById("labelTextBGAlpha").innerText = `${Viewer.language.SG_PROP_BG_ALPHA}`
|
//模型点
|
document.getElementById("labelModelType").innerText = `${Viewer.language.SG_PROP_TYPE}`
|
document.getElementById("labelModelName").innerText = `${Viewer.language.SG_PROP_NAME}`
|
document.getElementById("runAnimations").setAttribute("lay-text", `${Viewer.language.SG_ON_OR_OFF}`)
|
document.getElementById("autoRotate").setAttribute("lay-text", `${Viewer.language.SG_ON_OR_OFF}`)
|
document.getElementById("labelModelFillColor").innerText = `${Viewer.language.SG_PROP_FILL_COLOR}`
|
document.getElementById("labelModelFillAlpha").innerText = `${Viewer.language.SG_PROP_FILL_ALPHA}`
|
document.getElementById("labelModelDistanceDisplayNear").innerText = `${Viewer.language.SG_PROP_DISTANCE_DISPLAY_NEAR}`
|
document.getElementById("labelModelDistanceDisplayFar").innerText = `${Viewer.language.SG_PROP_DISTANCE_DISPLAY_FAR}`
|
document.getElementById("labelModelScale").innerText = `${Viewer.language.SG_PROP_SCALE}`
|
document.getElementById("divModel").innerText = `${Viewer.language.EARTH_CTRL_POSITION_MODEL}`
|
document.getElementById("labelModelUrl").innerText = `${Viewer.language.SG_PROP_MODEL_URL}`
|
document.getElementById("labelModelHeight").innerText = `${Viewer.language.EARTH_CTRL_POSITION_HEIGHT}`
|
document.getElementById("labelModelMinPixelSize").innerText = `${Viewer.language.SG_PROP_MIN_PIXEL_SIZE}`
|
document.getElementById("labelModelRunAnimate").innerText = `${Viewer.language.SG_PROP_RUN_ANIMATE}`
|
document.getElementById("labelModelHeading").innerText = `${Viewer.language.CREATOR_HEADING}`
|
document.getElementById("labelModelPitch").innerText = `${Viewer.language.CREATOR_PITCH}`
|
document.getElementById("labelModelRoll").innerText = `${Viewer.language.SG_PROP_ROLL}`
|
document.getElementById("labelModelAutoRotate").innerText = `${Viewer.language.SG_PROP_AUTO_ROTATE}`
|
//线
|
document.getElementById("labelLineType").innerText = `${Viewer.language.SG_PROP_TYPE}`
|
document.getElementById("labelLineName").innerText = `${Viewer.language.SG_PROP_NAME}`
|
document.getElementById("showClampToGround_Polyline").setAttribute("lay-text", `${Viewer.language.SG_ON_OR_OFF}`)
|
document.getElementById("showPolylineOutline").setAttribute("lay-text", `${Viewer.language.SG_ON_OR_OFF}`)
|
document.getElementById("labelPolylineFillColor").innerText = `${Viewer.language.SG_PROP_FILL_COLOR}`
|
document.getElementById("labelPolylineFillAlpha").innerText = `${Viewer.language.SG_PROP_FILL_ALPHA}`
|
document.getElementById("labelPolylineShowBorder").innerText = `${Viewer.language.SG_PROP_SHOW_BORDER}`
|
document.getElementById("labelPolylineOutlineWidth").innerText = `${Viewer.language.SG_PROP_OUTLINE_WIDTH}`
|
document.getElementById("labelPolylineOutlineColor").innerText = `${Viewer.language.SG_PROP_BORDER_COLOR}`
|
document.getElementById("labelPolylineOutlineAlpha").innerText = `${Viewer.language.SG_PROP_BORDER_ALPHA}`
|
document.getElementById("labelPolylineDistanceDisplayNear").innerText = `${Viewer.language.SG_PROP_DISTANCE_DISPLAY_NEAR}`
|
document.getElementById("labelPolylineDistanceDisplayFar").innerText = `${Viewer.language.SG_PROP_DISTANCE_DISPLAY_FAR}`
|
document.getElementById("labelLineClampToGround").innerText = `${Viewer.language.SG_PROP_CLAMP_TO_GROUND}`
|
document.getElementById("divPolyline").innerText = `${Viewer.language.CREATOR_POLYLINE}`
|
document.getElementById("labelPolylineLineWidth").innerText = `${Viewer.language.SG_PROP_LINE_WIDTH}`
|
//面
|
document.getElementById("labelPolygonType").innerText = `${Viewer.language.SG_PROP_TYPE}`
|
document.getElementById("labelPolygonName").innerText = `${Viewer.language.SG_PROP_NAME}`
|
document.getElementById("showClampToGround_Polygon").setAttribute("lay-text", `${Viewer.language.SG_ON_OR_OFF}`)
|
document.getElementById("showPolygonOutline").setAttribute("lay-text", `${Viewer.language.SG_ON_OR_OFF}`)
|
document.getElementById("labelPolygonFillColor").innerText = `${Viewer.language.SG_PROP_FILL_COLOR}`
|
document.getElementById("labelPolygonFillAlpha").innerText = `${Viewer.language.SG_PROP_FILL_ALPHA}`
|
document.getElementById("labelPolygonShowBorder").innerText = `${Viewer.language.SG_PROP_SHOW_BORDER}`
|
document.getElementById("labelPolygonOutlineColor").innerText = `${Viewer.language.SG_PROP_BORDER_COLOR}`
|
document.getElementById("labelPolygonOutlineAlpha").innerText = `${Viewer.language.SG_PROP_BORDER_ALPHA}`
|
document.getElementById("labelPolygonDistanceDisplayNear").innerText = `${Viewer.language.SG_PROP_DISTANCE_DISPLAY_NEAR}`
|
document.getElementById("labelPolygonDistanceDisplayFar").innerText = `${Viewer.language.SG_PROP_DISTANCE_DISPLAY_FAR}`
|
document.getElementById("labelPolygonClampToGround").innerText = `${Viewer.language.SG_PROP_CLAMP_TO_GROUND}`
|
document.getElementById("divPolygon").innerText = `${Viewer.language.TOOLS_SUBMERGENCE_POLYGON_NAME}`
|
//矩形
|
document.getElementById("labelRectType").innerText = `${Viewer.language.SG_PROP_TYPE}`
|
document.getElementById("labelRectName").innerText = `${Viewer.language.SG_PROP_NAME}`
|
document.getElementById("showClampToGround_Rectangle").setAttribute("lay-text", `${Viewer.language.SG_ON_OR_OFF}`)
|
document.getElementById("showRectangleOutline").setAttribute("lay-text", `${Viewer.language.SG_ON_OR_OFF}`)
|
document.getElementById("labelRectFillColor").innerText = `${Viewer.language.SG_PROP_FILL_COLOR}`
|
document.getElementById("labelRectFillAlpha").innerText = `${Viewer.language.SG_PROP_FILL_ALPHA}`
|
document.getElementById("labelRectShowBorder").innerText = `${Viewer.language.SG_PROP_SHOW_BORDER}`
|
document.getElementById("labelRectOutlineColor").innerText = `${Viewer.language.SG_PROP_BORDER_COLOR}`
|
document.getElementById("labelRectOutlineAlpha").innerText = `${Viewer.language.SG_PROP_BORDER_ALPHA}`
|
document.getElementById("labelRectDistanceDisplayNear").innerText = `${Viewer.language.SG_PROP_DISTANCE_DISPLAY_NEAR}`
|
document.getElementById("labelRectDistanceDisplayFar").innerText = `${Viewer.language.SG_PROP_DISTANCE_DISPLAY_FAR}`
|
document.getElementById("labelRectRotate").innerText = `${Viewer.language.SG_PROP_ROTATE}`
|
document.getElementById("labelRectHeight").innerText = `${Viewer.language.EARTH_CTRL_POSITION_HEIGHT}`
|
document.getElementById("labelRectClampToGround").innerText = `${Viewer.language.SG_PROP_CLAMP_TO_GROUND}`
|
document.getElementById("divRectangle").innerText = `${Viewer.language.CREATOR_RECTANGLE}`
|
//圆形
|
document.getElementById("labelCircleType").innerText = `${Viewer.language.SG_PROP_TYPE}`
|
document.getElementById("labelCircleName").innerText = `${Viewer.language.SG_PROP_NAME}`
|
document.getElementById("showClampToGround_Ellipse").setAttribute("lay-text", `${Viewer.language.SG_ON_OR_OFF}`)
|
document.getElementById("showEllipseOutline").setAttribute("lay-text", `${Viewer.language.SG_ON_OR_OFF}`)
|
document.getElementById("labelCircleFillColor").innerText = `${Viewer.language.SG_PROP_FILL_COLOR}`
|
document.getElementById("labelCircleFillAlpha").innerText = `${Viewer.language.SG_PROP_FILL_ALPHA}`
|
document.getElementById("labelCircleShowBorder").innerText = `${Viewer.language.SG_PROP_SHOW_BORDER}`
|
document.getElementById("labelCircleOutlineColor").innerText = `${Viewer.language.SG_PROP_BORDER_COLOR}`
|
document.getElementById("labelCircleOutlineAlpha").innerText = `${Viewer.language.SG_PROP_BORDER_ALPHA}`
|
document.getElementById("labelCircleDistanceDisplayNear").innerText = `${Viewer.language.SG_PROP_DISTANCE_DISPLAY_NEAR}`
|
document.getElementById("labelCircleDistanceDisplayFar").innerText = `${Viewer.language.SG_PROP_DISTANCE_DISPLAY_FAR}`
|
document.getElementById("labelCircleHeight").innerText = `${Viewer.language.EARTH_CTRL_POSITION_HEIGHT}`
|
document.getElementById("labelCircleRadius").innerText = `${Viewer.language.UNIT_RADIUS}`
|
document.getElementById("labelCircleClampToGround").innerText = `${Viewer.language.SG_PROP_CLAMP_TO_GROUND}`
|
document.getElementById("divCircle").innerText = `${Viewer.language.SG_PROP_CIRCLE}`
|
//多边体
|
document.getElementById("labelExtrudePolygonType").innerText = `${Viewer.language.SG_PROP_TYPE}`
|
document.getElementById("labelExtrudePolygonName").innerText = `${Viewer.language.SG_PROP_NAME}`
|
document.getElementById("showExtrudedPolygonOutline").setAttribute("lay-text", `${Viewer.language.SG_ON_OR_OFF}`)
|
document.getElementById("labelExtrudePolygonFillColor").innerText = `${Viewer.language.SG_PROP_FILL_COLOR}`
|
document.getElementById("labelExtrudePolygonFillAlpha").innerText = `${Viewer.language.SG_PROP_FILL_ALPHA}`
|
document.getElementById("labelExtrudePolygonShowBorder").innerText = `${Viewer.language.SG_PROP_SHOW_BORDER}`
|
document.getElementById("labelExtrudePolygonOutlineColor").innerText = `${Viewer.language.SG_PROP_BORDER_COLOR}`
|
document.getElementById("labelExtrudePolygonOutlineAlpha").innerText = `${Viewer.language.SG_PROP_BORDER_ALPHA}`
|
document.getElementById("labelExtrudePolygonDistanceDisplayNear").innerText = `${Viewer.language.SG_PROP_DISTANCE_DISPLAY_NEAR}`
|
document.getElementById("labelExtrudePolygonDistanceDisplayFar").innerText = `${Viewer.language.SG_PROP_DISTANCE_DISPLAY_FAR}`
|
document.getElementById("labelExtrudePolygonHeight").innerText = `${Viewer.language.EARTH_CTRL_POSITION_HEIGHT}`
|
document.getElementById("divExtrudePolygon").innerText = `${Viewer.language.CREATOR_POLYGON_WITH_HEIGHT}`
|
document.getElementById("labelExtrudePolygonExtrudeHeight").innerText = `${Viewer.language.SG_EXTRUDE_HEIGHT}`
|
//立方体
|
document.getElementById("labelCubeType").innerText = `${Viewer.language.SG_PROP_TYPE}`
|
document.getElementById("labelCubeName").innerText = `${Viewer.language.SG_PROP_NAME}`
|
document.getElementById("showBoxOutline").setAttribute("lay-text", `${Viewer.language.SG_ON_OR_OFF}`)
|
document.getElementById("labelCubeFillColor").innerText = `${Viewer.language.SG_PROP_FILL_COLOR}`
|
document.getElementById("labelCubeFillAlpha").innerText = `${Viewer.language.SG_PROP_FILL_ALPHA}`
|
document.getElementById("labelCubeShoBorder").innerText = `${Viewer.language.SG_PROP_SHOW_BORDER}`
|
document.getElementById("labelCubeOutlineColor").innerText = `${Viewer.language.SG_PROP_BORDER_COLOR}`
|
document.getElementById("labelCubeOutlineAlpha").innerText = `${Viewer.language.SG_PROP_BORDER_ALPHA}`
|
document.getElementById("labelCubeDistanceDisplayNear").innerText = `${Viewer.language.SG_PROP_DISTANCE_DISPLAY_NEAR}`
|
document.getElementById("labelCubeDistanceDisplayFar").innerText = `${Viewer.language.SG_PROP_DISTANCE_DISPLAY_FAR}`
|
document.getElementById("labelCubeWidth").innerText = `${Viewer.language.SG_PROP_WIDTH}`
|
document.getElementById("labelCubeHeight").innerText = `${Viewer.language.SG_PROP_HEIGHT}`
|
document.getElementById("labelCubeLength").innerText = `${Viewer.language.SG_PROP_LENGTH}`
|
document.getElementById("divCube").innerText = `${Viewer.language.CREATOR_CUBE}`
|
//圆柱体
|
document.getElementById("labelCylinderType").innerText = `${Viewer.language.SG_PROP_TYPE}`
|
document.getElementById("labelCylinderName").innerText = `${Viewer.language.SG_PROP_NAME}`
|
document.getElementById("showCylinderOutline").setAttribute("lay-text", `${Viewer.language.SG_ON_OR_OFF}`)
|
document.getElementById("labelCylinderFillColor").innerText = `${Viewer.language.SG_PROP_FILL_COLOR}`
|
document.getElementById("labelCylinderFillAlpha").innerText = `${Viewer.language.SG_PROP_FILL_ALPHA}`
|
document.getElementById("labelCylinderShowBorder").innerText = `${Viewer.language.SG_PROP_SHOW_BORDER}`
|
document.getElementById("labelCylinderOutlineColor").innerText = `${Viewer.language.SG_PROP_BORDER_COLOR}`
|
document.getElementById("labelCylinderOutlineAlpha").innerText = `${Viewer.language.SG_PROP_BORDER_ALPHA}`
|
document.getElementById("labelCylinderDistanceDisplayNear").innerText = `${Viewer.language.SG_PROP_DISTANCE_DISPLAY_NEAR}`
|
document.getElementById("labelCylinderDistanceDisplayFar").innerText = `${Viewer.language.SG_PROP_DISTANCE_DISPLAY_FAR}`
|
document.getElementById("labelCylinderHeight").innerText = `${Viewer.language.SG_PROP_HEIGHT}`
|
document.getElementById("labelCylinderRadius").innerText = `${Viewer.language.UNIT_BOTTOM_RADIUS}`
|
document.getElementById("labelCylinderTopRadius").innerText = `${Viewer.language.UNIT_TOP_RADIUS}`
|
document.getElementById("divCylinder").innerText = `${Viewer.language.CREATOR_CYLINDER}`
|
//球体
|
document.getElementById("labelSphereType").innerText = `${Viewer.language.SG_PROP_TYPE}`
|
document.getElementById("labelSphereName").innerText = `${Viewer.language.SG_PROP_NAME}`
|
document.getElementById("showEllipsoidOutline").setAttribute("lay-text", `${Viewer.language.SG_ON_OR_OFF}`)
|
document.getElementById("labelSphereFillColor").innerText = `${Viewer.language.SG_PROP_FILL_COLOR}`
|
document.getElementById("labelSphereFillAlpha").innerText = `${Viewer.language.SG_PROP_FILL_ALPHA}`
|
document.getElementById("labelSphereShowBorder").innerText = `${Viewer.language.SG_PROP_SHOW_BORDER}`
|
document.getElementById("labelSphereOutlineColor").innerText = `${Viewer.language.SG_PROP_BORDER_COLOR}`
|
document.getElementById("labelSphereOutlineAlpha").innerText = `${Viewer.language.SG_PROP_BORDER_ALPHA}`
|
document.getElementById("labelSphereDistanceDisplayNear").innerText = `${Viewer.language.SG_PROP_DISTANCE_DISPLAY_NEAR}`
|
document.getElementById("labelSphereDistanceDisplayFar").innerText = `${Viewer.language.SG_PROP_DISTANCE_DISPLAY_FAR}`
|
document.getElementById("labelSphereRadius").innerText = `${Viewer.language.UNIT_RADIUS}`
|
document.getElementById("divSphere").innerText = `${Viewer.language.CREATOR_SPHERE}`
|
|
layui.use(['element', 'form', 'slider', 'colorpicker'], function() {
|
window.$ = layui.jquery;
|
window.element = layui.element; //Tab的切换功能,切换事件监听等,需要依赖element模块
|
window.form = layui.form;
|
window.slider = layui.slider;
|
window.colorpicker = layui.colorpicker;
|
|
|
//多边体
|
if (type === 'polygon' && editGraphic.getValue('extrudedHeight')) {
|
type = 'ExtrudedPolygon';
|
}
|
//圆锥体
|
if (type === 'cylinder' && !editGraphic.entity.changeTop) {
|
$('.cylinder input[name="topRadius"]').val(editGraphic.getValue('topRadius').toFixed(2));
|
$('.cylinder .topRadius').show();
|
$('.cylinder .cylinderType').html(`${Viewer.language.CREATOR_CONE}`);
|
}
|
$('#Attribute').find("." + type).show();
|
|
$('.props input[name="name"]').val(editGraphic.getValue('name'));
|
|
let distanceDisplayCondition = editGraphic.getValue('distanceDisplayCondition');
|
$('.props input[name="minViewDistance"]').val(distanceDisplayCondition.near);
|
$('.props input[name="minViewDistance"]').on('input propertychange', function(event) {
|
var value = $(this).val();
|
distanceDisplayCondition.near = value;
|
if (editGraphic.setValue) {
|
editGraphic.setValue('distanceDisplayCondition', distanceDisplayCondition);
|
}
|
});
|
|
$('.props input[name="maxViewDistance"]').val(distanceDisplayCondition.far);
|
$('.props input[name="maxViewDistance"]').on('input propertychange', function(event) {
|
var value = $(this).val();
|
distanceDisplayCondition.far = value;
|
if (editGraphic.setValue) {
|
editGraphic.setValue('distanceDisplayCondition', distanceDisplayCondition);
|
}
|
});
|
|
switch (type) {
|
case 'point':
|
$('.point input[name="size"]').val(editGraphic.getValue('pixelSize'));
|
$('.point input[name="outlineWidth"]').val(editGraphic.getValue('outlineWidth'));
|
pointProp();
|
break;
|
case 'billboard':
|
$('.billboard input[name="scale"]').val(editGraphic.getValue('scale'));
|
$('.billboard input[name="image"]').val(editGraphic.getValue('image'));
|
$('.billboard input[name="rotation"]').val(editGraphic.getValue('rotation'));
|
$('.billboard input[name="width"]').val(editGraphic.getValue('width'));
|
$('.billboard input[name="height"]').val(editGraphic.getValue('height'));
|
billboardProp();
|
break;
|
case 'label':
|
$('.label input[name="scale"]').val(editGraphic.getValue('scale'));
|
$('.label input[name="text"]').val(editGraphic.getValue('text'));
|
$('.label input[name="font"]').val(editGraphic.getValue('font'));
|
$('.label input[name="outlineWidth"]').val(editGraphic.getValue('outlineWidth'));
|
labelProp();
|
break;
|
case 'model':
|
$('.model input[name="height"]').val(editGraphic.getValue('pHeight').toFixed(2));
|
$('.model input[name="scale"]').val(editGraphic.getValue('scale'));
|
$('.model input[name="url"]').val(editGraphic.getValue('uri'));
|
$('.model input[name="minimumPixelSize"]').val(editGraphic.getValue('minimumPixelSize'));
|
$('.model input[name="heading"]').val(editGraphic.getValue('heading'));
|
$('.model input[name="pitch"]').val(editGraphic.getValue('pitch'));
|
$('.model input[name="roll"]').val(editGraphic.getValue('roll'));
|
modelProp();
|
break;
|
case 'polyline':
|
polylineProp();
|
$('.polyline input[name="width"]').val(editGraphic.getValue('width'));
|
$('.polyline input[name="outlineWidth"]').val(editGraphic.getValue('material').outlineWidth);
|
break;
|
case 'polygon':
|
polygonProp();
|
break;
|
case 'rectangle':
|
$('.rectangle input[name="height"]').val(editGraphic.getValue('height') && editGraphic.getValue('height').toFixed(2));
|
$('.rectangle input[name="rotation"]').val(editGraphic.getValue('rotation'));
|
rectangleProp();
|
break;
|
case 'ellipse':
|
$('.ellipse input[name="height"]').val(editGraphic.getValue('height') && editGraphic.getValue('height').toFixed(2));
|
$('.ellipse input[name="radius"]').val(editGraphic.getValue('radius') && editGraphic.getValue('radius').toFixed(2));
|
ellipseProp();
|
break;
|
case 'box':
|
boxProp();
|
let dimensions = editGraphic.getValue('dimensions');
|
$('.box input[name="long"]').val(dimensions.x.toFixed(2));
|
$('.box input[name="width"]').val(dimensions.y.toFixed(2));
|
$('.box input[name="height"]').val(dimensions.z.toFixed(2));
|
break;
|
case 'cylinder':
|
cylinderProp();
|
$('.cylinder input[name="radius"]').val(editGraphic.getValue('radius').toFixed(2));
|
$('.cylinder input[name="height"]').val(editGraphic.getValue('length').toFixed(2));
|
break;
|
case 'ellipsoid':
|
ellipsoidProp();
|
$('.ellipsoid input[name="radius"]').val(editGraphic.getValue('radius').toFixed(2));
|
break;
|
case 'ExtrudedPolygon':
|
ExtrudedPolygonProp();
|
$('.ExtrudedPolygon input[name="height"]').val(editGraphic.getValue('height').toFixed(2));
|
$('.ExtrudedPolygon input[name="extrudedHeight"]').val((editGraphic.getValue('extrudedHeight') - editGraphic.getValue('height')).toFixed(2));
|
break;
|
}
|
});
|
|
//基本点属性
|
function pointProp () {
|
// 名称
|
$('.point input[name="name"]').on('input propertychange', function(event) {
|
var value = $(this).val()
|
if (value === '') return;
|
if (editGraphic.setValue) {
|
editGraphic.setValue('name', value);
|
}
|
});
|
//大小
|
$('.point input[name="size"]').on('input propertychange', function(event) {
|
var value = $(this).val().replace(/[^\d\.]/g, '');
|
if (value === '' || value === '.') return;
|
if (editGraphic.setValue) {
|
editGraphic.setValue('pixelSize', parseFloat(value));
|
}
|
});
|
//边框宽
|
$('.props input[name="outlineWidth"]').on('input propertychange', function(event) {
|
var value = $(this).val().replace(/[^\d\.]/g, '');
|
if (value === '' || value === '.') return;
|
if (editGraphic.setValue) {
|
editGraphic.setValue('outlineWidth', parseFloat(value));
|
}
|
});
|
|
//填充色透明度
|
slider.render({
|
elem: '#opacity-point-fill'
|
, min: 0 //最小值
|
, max: 100 //最大值
|
, value: editGraphic.alpha
|
, change: function(value) {
|
editGraphic.alpha = value;
|
editGraphic.setValue('alpha', value / 100);
|
}
|
});
|
|
//边框透明度
|
slider.render({
|
elem: '#opacity-point-outline'
|
, min: 0 //最小值
|
, max: 100 //最大值
|
, value: editGraphic.outlineAlpha
|
, change: function(value) {
|
editGraphic.outlineAlpha = value;
|
editGraphic.setValue('outlineAlpha', value / 100);
|
}
|
});
|
|
//填充色
|
colorpicker.render({
|
elem: '#colorchk-point-fill'
|
, color: editGraphic.fillColor //设置默认色
|
, done: function(color) {
|
editGraphic.fillColor = color;
|
editGraphic.graphic.color.setValue(new Cesium.Color.fromCssColorString(editGraphic.fillColor).withAlpha(editGraphic.alpha / 100));
|
}
|
});
|
|
//边框色
|
colorpicker.render({
|
elem: '#colorchk-point-outline'
|
, color: editGraphic.outlineColor //设置默认色
|
, done: function(color) {
|
editGraphic.outlineColor = color;
|
editGraphic.graphic.outlineColor.setValue(new Cesium.Color.fromCssColorString(editGraphic.outlineColor).withAlpha(editGraphic.outlineAlpha / 100));
|
}
|
});
|
|
//是否显示边框
|
form.on('switch(showPointOutline)', function(data) {
|
var isShow = this.checked;
|
if (isShow) {
|
$('.outline').show();
|
|
let value = $('.point input[name="outlineWidth"]').val();
|
value = parseFloat(value);
|
value == 0 && (value = 1, $('.point input[name="outlineWidth"]').val(1));
|
editGraphic.setValue('outlineWidth', value);
|
} else {
|
$('.outline').hide();
|
editGraphic.setValue('outlineWidth', 0);
|
}
|
});
|
if (editGraphic.getValue('outlineWidth') != 0) {
|
$('#showPointOutline').next().click();
|
$('#showPointOutline').attr('value', 'on')
|
}
|
//是否显示边框
|
form.on('switch(isPointDisableDepthTest)', function(data) {
|
var isShow = this.checked;
|
if (isShow) {
|
editGraphic.setValue('disableDepthTestDistance', Number.POSITIVE_INFINITY);
|
} else {
|
editGraphic.setValue('disableDepthTestDistance', undefined);
|
}
|
});
|
if (editGraphic.getValue('disableDepthTestDistance') === Number.POSITIVE_INFINITY) {
|
$('#isPointDisableDepthTest').next().click();
|
$('#isPointDisableDepthTest').attr('value', 'on')
|
}
|
}
|
|
//图片点属性
|
function billboardProp () {
|
// 名称
|
$('.billboard input[name="name"]').on('input propertychange', function(event) {
|
var value = $(this).val()
|
if (value === '') return;
|
if (editGraphic.setValue) {
|
editGraphic.setValue('name', value);
|
}
|
});
|
//图片
|
$('.billboard input[name="image"]').on('blur', function(event) {
|
var value = $(this).val();
|
if (value === '') return;
|
if (editGraphic.setValue) {
|
editGraphic.setValue('image', value);
|
}
|
});
|
//大小
|
$('.billboard input[name="scale"]').on('input propertychange', function(event) {
|
var value = $(this).val().replace(/[^\d\.]/g, '');
|
if (value === '' || value === '.') return;
|
if (editGraphic.setValue) {
|
editGraphic.setValue('scale', parseFloat(value));
|
}
|
});
|
|
//旋转
|
$('.billboard input[name="rotation"]').on('input propertychange', function(event) {
|
var value = $(this).val().replace(/[^\d\.\-]/g, '');
|
if (value === '.') return;
|
if (value === '') value = undefined;
|
if (editGraphic.setValue) {
|
editGraphic.setValue('rotation', -parseFloat(value) * Math.PI / 180);
|
}
|
});
|
|
//宽
|
$('.billboard input[name="width"]').on('input propertychange', function(event) {
|
var value = $(this).val().replace(/[^\d\.]/g, '');
|
if (value === '' || value === '.') return;
|
if (editGraphic.setValue) {
|
editGraphic.setValue('width', parseFloat(value));
|
}
|
});
|
|
//高
|
$('.billboard input[name="height"]').on('input propertychange', function(event) {
|
var value = $(this).val().replace(/[^\d\.]/g, '');
|
if (value === '' || value === '.') return;
|
if (editGraphic.setValue) {
|
editGraphic.setValue('height', parseFloat(value));
|
}
|
});
|
|
let horizontalOrigin = editGraphic.getValue('horizontalOrigin');
|
$(`.billboard .horizontalOrigin option[value="${horizontalOrigin}"]`).attr('selected', true);
|
|
//水平对齐
|
form.on('select(horizontalOrigin)', function(data) {
|
var value = parseInt(data.value);
|
if (editGraphic.setValue) {
|
editGraphic.setValue('horizontalOrigin', value);
|
}
|
});
|
|
let verticalOrigin = editGraphic.getValue('verticalOrigin');
|
$(`.billboard .verticalOrigin option[value="${verticalOrigin}"]`).attr('selected', true);
|
form.render('select');
|
|
//垂直对齐
|
form.on('select(verticalOrigin)', function(data) {
|
var value = parseInt(data.value);
|
if (editGraphic.setValue) {
|
editGraphic.setValue('verticalOrigin', value);
|
}
|
});
|
|
//填充色透明度
|
slider.render({
|
elem: '#opacity-billboard-fill'
|
, min: 0 //最小值
|
, max: 100 //最大值
|
, value: editGraphic.alpha
|
, change: function(value) {
|
editGraphic.alpha = value;
|
editGraphic.setValue('alpha', value / 100);
|
}
|
});
|
|
//填充色
|
colorpicker.render({
|
elem: '#colorchk-billboard-fill'
|
, color: editGraphic.fillColor //设置默认色
|
, done: function(color) {
|
editGraphic.fillColor = color;
|
editGraphic.graphic.color.setValue(new Cesium.Color.fromCssColorString(editGraphic.fillColor).withAlpha(editGraphic.alpha / 100));
|
}
|
});
|
|
//是否不被遮挡
|
form.on('switch(isBillboardDisableDepthTest)', function(data) {
|
var isShow = this.checked;
|
if (isShow) {
|
editGraphic.setValue('disableDepthTestDistance', Number.POSITIVE_INFINITY);
|
} else {
|
editGraphic.setValue('disableDepthTestDistance', undefined);
|
}
|
});
|
if (editGraphic.getValue('disableDepthTestDistance') === Number.POSITIVE_INFINITY) {
|
$('#isBillboardDisableDepthTest').next().click();
|
$('#isBillboardDisableDepthTest').attr('value', 'on')
|
}
|
}
|
|
//文本点属性
|
function labelProp () {
|
//字体
|
$('.label input[name="font"]').on('blur', function(event) {
|
var value = $(this).val();
|
if (value === '') return;
|
if (editGraphic.setValue) {
|
editGraphic.setValue('font', value);
|
}
|
});
|
|
//内容
|
$('.label input[name="text"]').on('input propertychange', function(event) {
|
var value = $(this).val();
|
if (editGraphic.setValue) {
|
editGraphic.setValue('text', value);
|
}
|
});
|
|
//比例
|
$('.label input[name="scale"]').on('input propertychange', function(event) {
|
var value = $(this).val().replace(/[^\d\.]/g, '');
|
if (value === '' || value === '.') return;
|
if (editGraphic.setValue) {
|
editGraphic.setValue('scale', parseFloat(value));
|
}
|
});
|
//边框宽
|
$('.label input[name="outlineWidth"]').on('input propertychange', function(event) {
|
var value = $(this).val().replace(/[^\d\.]/g, '');
|
if (value === '' || value === '.') return;
|
if (editGraphic.setValue) {
|
editGraphic.setValue('outlineWidth', parseFloat(value));
|
}
|
});
|
|
let horizontalOrigin = editGraphic.getValue('horizontalOrigin');
|
$(`.label .horizontalOrigin option[value="${horizontalOrigin}"]`).attr('selected', true);
|
|
//水平对齐
|
form.on('select(horizontalOrigin)', function(data) {
|
var value = parseInt(data.value);
|
if (editGraphic.setValue) {
|
editGraphic.setValue('horizontalOrigin', value);
|
}
|
});
|
|
let verticalOrigin = editGraphic.getValue('verticalOrigin');
|
$(`.label .verticalOrigin option[value="${verticalOrigin}"]`).attr('selected', true);
|
form.render('select');
|
|
//垂直对齐
|
form.on('select(verticalOrigin)', function(data) {
|
var value = parseInt(data.value);
|
if (editGraphic.setValue) {
|
editGraphic.setValue('verticalOrigin', value);
|
}
|
});
|
|
//填充色透明度
|
slider.render({
|
elem: '#opacity-label-fill'
|
, min: 0 //最小值
|
, max: 100 //最大值
|
, value: editGraphic.alpha
|
, change: function(value) {
|
editGraphic.alpha = value;
|
editGraphic.setValue('alpha', value / 100);
|
}
|
});
|
|
//边框透明度
|
slider.render({
|
elem: '#opacity-label-outline'
|
, min: 0 //最小值
|
, max: 100 //最大值
|
, value: editGraphic.outlineAlpha
|
, change: function(value) {
|
editGraphic.outlineAlpha = value;
|
editGraphic.setValue('outlineAlpha', value / 100);
|
}
|
});
|
|
//背景透明度
|
slider.render({
|
elem: '#opacity-label-background'
|
, min: 0 //最小值
|
, max: 100 //最大值
|
, value: editGraphic.backgroundAlpha
|
, change: function(value) {
|
editGraphic.backgroundAlpha = value;
|
editGraphic.setValue('backgroundAlpha', value / 100);
|
}
|
});
|
|
//填充色
|
colorpicker.render({
|
elem: '#colorchk-label-fill'
|
, color: editGraphic.fillColor //设置默认色
|
, done: function(color) {
|
editGraphic.fillColor = color;
|
editGraphic.graphic.fillColor.setValue(new Cesium.Color.fromCssColorString(editGraphic.fillColor).withAlpha(editGraphic.alpha / 100));
|
}
|
});
|
|
//边框色
|
colorpicker.render({
|
elem: '#colorchk-label-outline'
|
, color: editGraphic.outlineColor //设置默认色
|
, done: function(color) {
|
editGraphic.outlineColor = color;
|
editGraphic.graphic.outlineColor.setValue(new Cesium.Color.fromCssColorString(editGraphic.outlineColor).withAlpha(editGraphic.outlineAlpha / 100));
|
}
|
});
|
|
//背景色
|
colorpicker.render({
|
elem: '#colorchk-label-background'
|
, color: editGraphic.backgroundColor //设置默认色
|
, done: function(color) {
|
editGraphic.backgroundColor = color;
|
editGraphic.graphic.backgroundColor.setValue(new Cesium.Color.fromCssColorString(editGraphic.backgroundColor).withAlpha(editGraphic.backgroundAlpha / 100));
|
}
|
});
|
|
//是否显示边框
|
form.on('switch(showLabelOutline)', function(data) {
|
var isShow = this.checked;
|
if (isShow) {
|
$('.outline').show();
|
|
let value = $('.label input[name="outlineWidth"]').val();
|
value = parseFloat(value);
|
value == 0 && (value = 1, $('.label input[name="outlineWidth"]').val(1));
|
editGraphic.setValue('outlineWidth', value);
|
} else {
|
$('.outline').hide();
|
editGraphic.setValue('outlineWidth', 0);
|
}
|
});
|
if (editGraphic.getValue('outlineWidth') != 0) {
|
$('#showLabelOutline').next().click();
|
$('#showLabelOutline').attr('value', 'on')
|
}
|
|
//是否显示背景
|
form.on('switch(showLabelBackground)', function(data) {
|
var isShow = this.checked;
|
if (isShow) {
|
$('.background').show();
|
} else {
|
$('.background').hide();
|
}
|
editGraphic.setValue('showBackground', isShow);
|
});
|
if (editGraphic.getValue('showBackground')) {
|
$('#showLabelBackground').next().click();
|
$('#showLabelBackground').attr('value', 'on')
|
}
|
|
//是否不被遮挡
|
form.on('switch(isLabelDisableDepthTest)', function(data) {
|
var isShow = this.checked;
|
if (isShow) {
|
editGraphic.setValue('disableDepthTestDistance', Number.POSITIVE_INFINITY);
|
} else {
|
editGraphic.setValue('disableDepthTestDistance', undefined);
|
}
|
});
|
if (editGraphic.getValue('disableDepthTestDistance') === Number.POSITIVE_INFINITY) {
|
$('#isLabelDisableDepthTest').next().click();
|
$('#isLabelDisableDepthTest').attr('value', 'on')
|
}
|
}
|
|
//模型点属性
|
function modelProp () {
|
//模型链接
|
$('.model input[name="url"]').on('blur', function(event) {
|
var value = $(this).val();
|
if (value === '') return;
|
if (editGraphic.setValue) {
|
editGraphic.setValue('uri', value);
|
}
|
});
|
|
//高度
|
$('.model input[name="height"]').on('input propertychange', function(event) {
|
var value = $(this).val().replace(/[^\d\.\-]/g, '');
|
if (value === '' || value === '.') return;
|
if (editGraphic.setValue) {
|
editGraphic.setValue('pHeight', parseFloat(value));
|
}
|
});
|
|
//比例
|
$('.model input[name="scale"]').on('input propertychange', function(event) {
|
var value = $(this).val().replace(/[^\d\.]/g, '');
|
if (value === '' || value === '.') return;
|
if (editGraphic.setValue) {
|
editGraphic.setValue('scale', parseFloat(value));
|
}
|
});
|
|
//最小显示尺寸
|
$('.model input[name="minimumPixelSize"]').on('input propertychange', function(event) {
|
var value = $(this).val().replace(/[^\d\.]/g, '');
|
if (value === '' || value === '.') return;
|
if (editGraphic.setValue) {
|
editGraphic.setValue('minimumPixelSize', parseFloat(value));
|
}
|
});
|
|
//方向
|
$('.model input[name="heading"]').on('input propertychange', function(event) {
|
var value = $(this).val().replace(/[^\d\.\-]/g, '');
|
if (value === '' || value === '.') return;
|
if (editGraphic.setValue) {
|
editGraphic.setValue('heading', parseFloat(value));
|
}
|
});
|
|
//俯仰
|
$('.model input[name="pitch"]').on('input propertychange', function(event) {
|
var value = $(this).val().replace(/[^\d\.\-]/g, '');
|
if (value === '' || value === '.') return;
|
if (editGraphic.setValue) {
|
editGraphic.setValue('pitch', parseFloat(value));
|
}
|
});
|
|
//翻滚
|
$('.model input[name="roll"]').on('input propertychange', function(event) {
|
var value = $(this).val().replace(/[^\d\.\-]/g, '');
|
if (value === '' || value === '.') return;
|
if (editGraphic.setValue) {
|
editGraphic.setValue('roll', parseFloat(value));
|
}
|
});
|
|
//填充色透明度
|
slider.render({
|
elem: '#opacity-model-fill'
|
, min: 0 //最小值
|
, max: 100 //最大值
|
, value: editGraphic.alpha
|
, change: function(value) {
|
editGraphic.alpha = value;
|
editGraphic.setValue('alpha', value / 100);
|
}
|
});
|
|
//填充色
|
colorpicker.render({
|
elem: '#colorchk-model-fill'
|
, color: editGraphic.fillColor //设置默认色
|
, done: function(color) {
|
editGraphic.fillColor = color;
|
editGraphic.graphic.color.setValue(new Cesium.Color.fromCssColorString(editGraphic.fillColor).withAlpha(editGraphic.alpha / 100));
|
}
|
});
|
|
//是否执行动画
|
form.on('switch(runAnimations)', function(data) {
|
var isShow = this.checked;
|
editGraphic.setValue('runAnimations', isShow);
|
});
|
if (editGraphic.getValue('runAnimations')) {
|
$('#runAnimations').next().click();
|
$('#runAnimations').attr('value', 'on')
|
}
|
|
//是否自旋转
|
form.on('switch(autoRotate)', function(data) {
|
var isShow = this.checked;
|
if (isShow) {
|
if (!editGraphic.entity.autoRotate) {
|
editGraphic.setValue('autoRotate', 2);
|
}
|
} else {
|
editGraphic.setValue('autoRotate', false);
|
}
|
editGraphic.entity.autoRotate = isShow;
|
});
|
if (editGraphic.entity.autoRotate) {
|
$('#autoRotate').next().click();
|
$('#autoRotate').attr('value', 'on')
|
}
|
}
|
|
//拉伸面属性
|
function ExtrudedPolygonProp () {
|
$('.ExtrudedPolygon input[name="height"]').on('input propertychange', function(event) {
|
var value = $(this).val().replace(/[^\d\.]/g, '');
|
if (value === '' || value === '.') return;
|
if (editGraphic.setValue) {
|
editGraphic.setValue('height', parseFloat(value));
|
|
let extrudedHeight = $('.ExtrudedPolygon input[name="extrudedHeight"]').val();
|
editGraphic.setValue('extrudedHeight', parseFloat(extrudedHeight) + parseFloat(value));
|
}
|
});
|
$('.ExtrudedPolygon input[name="extrudedHeight"]').on('input propertychange', function(event) {
|
var value = $(this).val().replace(/[^\d\.]/g, '');
|
if (value === '' || value === '.') return;
|
if (editGraphic.setValue) {
|
editGraphic.setValue('extrudedHeight', parseFloat(value) + editGraphic.getValue('height'));
|
}
|
});
|
|
//填充色透明度
|
slider.render({
|
elem: '#opacity-ExtrudedPolygon-fill'
|
, min: 0 //最小值
|
, max: 100 //最大值
|
, value: editGraphic.alpha
|
, change: function(value) {
|
editGraphic.alpha = value;
|
editGraphic.setValue('alpha', value / 100);
|
}
|
});
|
|
//边框透明度
|
slider.render({
|
elem: '#opacity-ExtrudedPolygon-outline'
|
, min: 0 //最小值
|
, max: 100 //最大值
|
, value: editGraphic.outlineAlpha
|
, change: function(value) {
|
editGraphic.outlineAlpha = value;
|
editGraphic.setValue('outlineAlpha', value / 100);
|
}
|
});
|
|
//填充色
|
colorpicker.render({
|
elem: '#colorchk-ExtrudedPolygon-fill'
|
, color: editGraphic.fillColor //设置默认色
|
, done: function(color) {
|
editGraphic.fillColor = color;
|
editGraphic.graphic.material.color.setValue(new Cesium.Color.fromCssColorString(editGraphic.fillColor).withAlpha(editGraphic.alpha / 100));
|
}
|
});
|
|
//边框色
|
colorpicker.render({
|
elem: '#colorchk-ExtrudedPolygon-outline'
|
, color: editGraphic.outlineColor //设置默认色
|
, done: function(color) {
|
editGraphic.outlineColor = color;
|
editGraphic.graphic.outlineColor.setValue(new Cesium.Color.fromCssColorString(editGraphic.outlineColor).withAlpha(editGraphic.outlineAlpha / 100));
|
}
|
});
|
|
//是否显示边框
|
form.on('switch(showExtrudedPolygonOutline)', function(data) {
|
let isShow = this.checked;
|
if (isShow) {
|
$('.outline').show();
|
} else {
|
$('.outline').hide();
|
}
|
editGraphic.setValue('outline', isShow);
|
});
|
if (editGraphic.getValue('outline')) {
|
$('#showExtrudedPolygonOutline').next().click();
|
$('#showExtrudedPolygonOutline').attr('value', 'on')
|
}
|
}
|
|
//多边形属性
|
function polygonProp () {
|
//填充色透明度
|
slider.render({
|
elem: '#opacity-polygon-fill'
|
, min: 0 //最小值
|
, max: 100 //最大值
|
, value: editGraphic.alpha
|
, change: function(value) {
|
editGraphic.alpha = value;
|
editGraphic.setValue('alpha', value / 100);
|
}
|
});
|
|
//边框透明度
|
slider.render({
|
elem: '#opacity-polygon-outline'
|
, min: 0 //最小值
|
, max: 100 //最大值
|
, value: editGraphic.outlineAlpha
|
, change: function(value) {
|
editGraphic.outlineAlpha = value;
|
editGraphic.setValue('outlineAlpha', value / 100);
|
}
|
});
|
|
//填充色
|
colorpicker.render({
|
elem: '#colorchk-polygon-fill'
|
, color: editGraphic.fillColor //设置默认色
|
, done: function(color) {
|
editGraphic.fillColor = color;
|
editGraphic.graphic.material.color.setValue(new Cesium.Color.fromCssColorString(editGraphic.fillColor).withAlpha(editGraphic.alpha / 100));
|
}
|
});
|
|
//边框色
|
colorpicker.render({
|
elem: '#colorchk-polygon-outline'
|
, color: editGraphic.outlineColor //设置默认色
|
, done: function(color) {
|
editGraphic.outlineColor = color;
|
editGraphic.graphic.outlineColor.setValue(new Cesium.Color.fromCssColorString(editGraphic.outlineColor).withAlpha(editGraphic.outlineAlpha / 100));
|
}
|
});
|
|
//是否显示边框
|
form.on('switch(showPolygonOutline)', function(data) {
|
let isShow = this.checked;
|
if (isShow) {
|
$('.outline').show();
|
} else {
|
$('.outline').hide();
|
}
|
editGraphic.setValue('outline', isShow);
|
});
|
if (editGraphic.getValue('outline')) {
|
$('#showPolygonOutline').next().click();
|
$('#showPolygonOutline').attr('value', 'on')
|
}
|
|
//是否贴地
|
form.on('switch(showClampToGround)', function(data) {
|
editGraphic.setValue('clampToGround', this.checked);
|
});
|
if (editGraphic.getValue('heightReference') === Cesium.HeightReference.CLAMP_TO_GROUND) {
|
$('#showClampToGround_Polygon').next().click();
|
$('#showClampToGround_Polygon').attr('value', 'on')
|
}
|
}
|
|
//矩形属性
|
function rectangleProp () {
|
//旋转
|
$('.rectangle input[name="rotation"]').on('input propertychange', function(event) {
|
var value = $(this).val().replace(/[^\d\.\-]/g, '');
|
if (value === '' || value === '.') return;
|
if (editGraphic.setValue) {
|
editGraphic.setValue('rotation', -parseFloat(value) * Math.PI / 180);
|
}
|
});
|
|
//高度
|
$('.rectangle input[name="height"]').on('input propertychange', function(event) {
|
var value = $(this).val().replace(/[^\d\.\-]/g, '');
|
if (value === '' || value === '.') return;
|
if (editGraphic.setValue) {
|
editGraphic.setValue('height', parseFloat(value));
|
}
|
});
|
|
//填充色透明度
|
slider.render({
|
elem: '#opacity-rectangle-fill'
|
, min: 0 //最小值
|
, max: 100 //最大值
|
, value: editGraphic.alpha
|
, change: function(value) {
|
editGraphic.alpha = value;
|
editGraphic.setValue('alpha', value / 100);
|
}
|
});
|
|
//边框透明度
|
slider.render({
|
elem: '#opacity-rectangle-outline'
|
, min: 0 //最小值
|
, max: 100 //最大值
|
, value: editGraphic.outlineAlpha
|
, change: function(value) {
|
editGraphic.outlineAlpha = value;
|
editGraphic.setValue('outlineAlpha', value / 100);
|
}
|
});
|
|
//填充色
|
colorpicker.render({
|
elem: '#colorchk-rectangle-fill'
|
, color: editGraphic.fillColor //设置默认色
|
, done: function(color) {
|
editGraphic.fillColor = color;
|
editGraphic.graphic.material.color.setValue(new Cesium.Color.fromCssColorString(editGraphic.fillColor).withAlpha(editGraphic.alpha / 100));
|
}
|
});
|
|
//边框色
|
colorpicker.render({
|
elem: '#colorchk-rectangle-outline'
|
, color: editGraphic.outlineColor //设置默认色
|
, done: function(color) {
|
editGraphic.outlineColor = color;
|
editGraphic.graphic.outlineColor.setValue(new Cesium.Color.fromCssColorString(editGraphic.outlineColor).withAlpha(editGraphic.outlineAlpha / 100));
|
}
|
});
|
|
//是否显示边框
|
form.on('switch(showRectangleOutline)', function(data) {
|
let isShow = this.checked;
|
if (isShow) {
|
$('.outline').show();
|
} else {
|
$('.outline').hide();
|
}
|
editGraphic.setValue('outline', isShow);
|
});
|
if (editGraphic.getValue('outline')) {
|
$('#showRectangleOutline').next().click();
|
$('#showRectangleOutline').attr('value', 'on')
|
}
|
|
let isRenderCheck;
|
//是否贴地
|
form.on('switch(showClampToGround)', function(data) {
|
if (isRenderCheck) {
|
isRenderCheck = false;
|
return;
|
}
|
editGraphic.setValue('clampToGround', this.checked);
|
editGraphic.getValue('height') && $('.rectangle input[name="height"]').val(editGraphic.getValue('height'))
|
this.checked ? $('.rectangle .height').hide() : $('.rectangle .height').show();
|
});
|
if (editGraphic.getValue('heightReference') === Cesium.HeightReference.CLAMP_TO_GROUND) {
|
isRenderCheck = true;
|
$('#showClampToGround_Rectangle').next().click();
|
$('#showClampToGround_Rectangle').attr('value', 'on');
|
$('.rectangle .height').hide();
|
}
|
}
|
|
//圆形属性
|
function ellipseProp () {
|
//高度
|
$('.ellipse input[name="height"]').on('input propertychange', function(event) {
|
var value = $(this).val().replace(/[^\d\.\-]/g, '');
|
if (value === '' || value === '.') return;
|
if (editGraphic.setValue) {
|
editGraphic.setValue('height', parseFloat(value));
|
}
|
});
|
|
//半径
|
$('.ellipse input[name="radius"]').on('input propertychange', function(event) {
|
var value = $(this).val().replace(/[^\d\.]/g, '');
|
if (value === '' || value === '.') return;
|
if (editGraphic.setValue) {
|
editGraphic.setValue('radius', parseFloat(value));
|
}
|
});
|
|
//填充色透明度
|
slider.render({
|
elem: '#opacity-ellipse-fill'
|
, min: 0 //最小值
|
, max: 100 //最大值
|
, value: editGraphic.alpha
|
, change: function(value) {
|
editGraphic.alpha = value;
|
editGraphic.setValue('alpha', value / 100);
|
}
|
});
|
|
//边框透明度
|
slider.render({
|
elem: '#opacity-ellipse-outline'
|
, min: 0 //最小值
|
, max: 100 //最大值
|
, value: editGraphic.outlineAlpha
|
, change: function(value) {
|
editGraphic.outlineAlpha = value;
|
editGraphic.setValue('outlineAlpha', value / 100);
|
}
|
});
|
|
//填充色
|
colorpicker.render({
|
elem: '#colorchk-ellipse-fill'
|
, color: editGraphic.fillColor //设置默认色
|
, done: function(color) {
|
editGraphic.fillColor = color;
|
editGraphic.graphic.material.color.setValue(new Cesium.Color.fromCssColorString(editGraphic.fillColor).withAlpha(editGraphic.alpha / 100));
|
}
|
});
|
|
//边框色
|
colorpicker.render({
|
elem: '#colorchk-ellipse-outline'
|
, color: editGraphic.outlineColor //设置默认色
|
, done: function(color) {
|
editGraphic.outlineColor = color;
|
editGraphic.graphic.outlineColor.setValue(new Cesium.Color.fromCssColorString(editGraphic.outlineColor).withAlpha(editGraphic.outlineAlpha / 100));
|
}
|
});
|
|
//是否显示边框
|
form.on('switch(showEllipseOutline)', function(data) {
|
let isShow = this.checked;
|
if (isShow) {
|
$('.outline').show();
|
} else {
|
$('.outline').hide();
|
}
|
editGraphic.setValue('outline', isShow);
|
});
|
if (editGraphic.getValue('outline')) {
|
$('#showEllipseOutline').next().click();
|
$('#showEllipseOutline').attr('value', 'on')
|
}
|
|
let isRenderCheck;
|
//是否贴地
|
form.on('switch(showClampToGround)', function(data) {
|
if (isRenderCheck) {
|
isRenderCheck = false;
|
return;
|
}
|
editGraphic.setValue('clampToGround', this.checked);
|
editGraphic.getValue('height') && $('.ellipse input[name="height"]').val(editGraphic.getValue('height'))
|
this.checked ? $('.ellipse .height').hide() : $('.ellipse .height').show();
|
});
|
if (editGraphic.getValue('heightReference') === Cesium.HeightReference.CLAMP_TO_GROUND) {
|
isRenderCheck = true;
|
$('.ellipse .height').hide();
|
$('#showClampToGround_Ellipse').next().click();
|
$('#showClampToGround_Ellipse').attr('value', 'on')
|
}
|
}
|
|
//线属性
|
function polylineProp () {
|
//线宽
|
$('.props input[name="width"]').on('input propertychange', function(event) {
|
var value = $(this).val().replace(/[^\d\.]/g, '');
|
if (value === '' || value === '.') return;
|
if (editGraphic.setValue) {
|
editGraphic.setValue('width', parseFloat(value));
|
}
|
});
|
|
//边框宽
|
$('.props input[name="outlineWidth"]').on('input propertychange', function(event) {
|
var value = $(this).val().replace(/[^\d\.]/g, '');
|
if (value === '' || value === '.') return;
|
if (editGraphic.setValue) {
|
editGraphic.setValue('outlineWidth', parseFloat(value));
|
}
|
});
|
|
//填充色
|
slider.render({
|
elem: '#opacity-polyline-fill'
|
, min: 0 //最小值
|
, max: 100 //最大值
|
, value: editGraphic.alpha
|
, change: function(value) {
|
editGraphic.alpha = value;
|
editGraphic.setValue('alpha', value / 100);
|
}
|
});
|
|
//边框色
|
slider.render({
|
elem: '#opacity-polyline-outline'
|
, min: 0 //最小值
|
, max: 100 //最大值
|
, value: editGraphic.outlineAlpha
|
, change: function(value) {
|
editGraphic.outlineAlpha = value;
|
editGraphic.setValue('outlineAlpha', value / 100);
|
}
|
});
|
|
//填充色透明度
|
colorpicker.render({
|
elem: '#colorchk-polyline-fill'
|
, color: editGraphic.fillColor //设置默认色
|
, done: function(color) {
|
editGraphic.fillColor = color;
|
editGraphic.graphic.material.color.setValue(new Cesium.Color.fromCssColorString(editGraphic.fillColor).withAlpha(editGraphic.alpha / 100));
|
}
|
});
|
|
//边框透明度
|
colorpicker.render({
|
elem: '#colorchk-polyline-outline'
|
, color: editGraphic.outlineColor //设置默认色
|
, done: function(color) {
|
editGraphic.outlineColor = color;
|
editGraphic.graphic.material.outlineColor.setValue(new Cesium.Color.fromCssColorString(editGraphic.outlineColor).withAlpha(editGraphic.outlineAlpha / 100));
|
}
|
});
|
|
//是否显示边框
|
form.on('switch(showPolylineOutline)', function(data) {
|
var isShow = this.checked;
|
if (isShow) {
|
$('.outline').show();
|
|
let value = $('.polyline input[name="outlineWidth"]').val();
|
value = parseFloat(value);
|
value == 0 && (value = 1, $('.polyline input[name="outlineWidth"]').val(1));
|
editGraphic.setValue('outlineWidth', value);
|
} else {
|
$('.outline').hide();
|
editGraphic.setValue('outlineWidth', 0);
|
}
|
});
|
if (editGraphic.getValue('material') && editGraphic.getValue('material').outlineWidth != 0) {
|
$('#showPolylineOutline').next().click();
|
$('#showPolylineOutline').attr('value', 'on')
|
}
|
|
//是否贴地
|
form.on('switch(showClampToGround)', function(data) {
|
editGraphic.setValue('clampToGround', this.checked);
|
});
|
if (editGraphic.getValue('clampToGround')) {
|
$('#showClampToGround_Polyline').next().click();
|
$('#showClampToGround_Polyline').attr('value', 'on')
|
}
|
}
|
|
//立方体属性
|
function boxProp () {
|
//长
|
$('.box input[name="long"]').on('input propertychange', function(event) {
|
var value = $(this).val().replace(/[^\d\.]/g, '');
|
if (value === '' || value === '.') return;
|
if (editGraphic.setValue) {
|
editGraphic.setValue('long', parseFloat(value));
|
}
|
});
|
|
//宽
|
$('.box input[name="width"]').on('input propertychange', function(event) {
|
var value = $(this).val().replace(/[^\d\.]/g, '');
|
if (value === '' || value === '.') return;
|
if (editGraphic.setValue) {
|
editGraphic.setValue('width', parseFloat(value));
|
}
|
});
|
|
//高
|
$('.box input[name="height"]').on('input propertychange', function(event) {
|
var value = $(this).val().replace(/[^\d\.]/g, '');
|
if (value === '' || value === '.') return;
|
if (editGraphic.setValue) {
|
editGraphic.setValue('height', parseFloat(value));
|
}
|
});
|
|
//填充色透明度
|
slider.render({
|
elem: '#opacity-box-fill'
|
, min: 0 //最小值
|
, max: 100 //最大值
|
, value: editGraphic.alpha
|
, change: function(value) {
|
editGraphic.alpha = value;
|
editGraphic.setValue('alpha', value / 100);
|
}
|
});
|
|
//边框透明度
|
slider.render({
|
elem: '#opacity-box-outline'
|
, min: 0 //最小值
|
, max: 100 //最大值
|
, value: editGraphic.outlineAlpha
|
, change: function(value) {
|
editGraphic.outlineAlpha = value;
|
editGraphic.setValue('outlineAlpha', value / 100);
|
}
|
});
|
|
//填充色
|
colorpicker.render({
|
elem: '#colorchk-box-fill'
|
, color: editGraphic.fillColor //设置默认色
|
, done: function(color) {
|
editGraphic.fillColor = color;
|
editGraphic.graphic.material.color.setValue(new Cesium.Color.fromCssColorString(editGraphic.fillColor).withAlpha(editGraphic.alpha / 100));
|
}
|
});
|
|
//边框色
|
colorpicker.render({
|
elem: '#colorchk-box-outline'
|
, color: editGraphic.outlineColor //设置默认色
|
, done: function(color) {
|
editGraphic.outlineColor = color;
|
editGraphic.graphic.outlineColor.setValue(new Cesium.Color.fromCssColorString(editGraphic.outlineColor).withAlpha(editGraphic.outlineAlpha / 100));
|
}
|
});
|
|
//是否显示边框
|
form.on('switch(showBoxOutline)', function(data) {
|
let isShow = this.checked;
|
if (isShow) {
|
$('.outline').show();
|
} else {
|
$('.outline').hide();
|
}
|
editGraphic.setValue('outline', isShow);
|
});
|
if (editGraphic.getValue('outline')) {
|
$('#showBoxOutline').next().click();
|
$('#showBoxOutline').attr('value', 'on')
|
}
|
}
|
|
//圆柱体属性
|
function cylinderProp () {
|
//半径
|
$('.cylinder input[name="radius"]').on('input propertychange', function(event) {
|
var value = $(this).val().replace(/[^\d\.]/g, '');
|
if (value === '' || value === '.') return;
|
if (editGraphic.setValue) {
|
editGraphic.setValue('radius', parseFloat(value));
|
}
|
});
|
|
if (!editGraphic.entity.changeTop) {
|
//顶部半径
|
$('.cylinder input[name="topRadius"]').on('input propertychange', function(event) {
|
var value = $(this).val().replace(/[^\d\.]/g, '');
|
if (value === '' || value === '.') return;
|
if (editGraphic.setValue) {
|
editGraphic.setValue('topRadius', parseFloat(value));
|
}
|
});
|
}
|
|
//高
|
$('.cylinder input[name="height"]').on('input propertychange', function(event) {
|
var value = $(this).val().replace(/[^\d\.]/g, '');
|
if (value === '' || value === '.') return;
|
if (editGraphic.setValue) {
|
editGraphic.setValue('length', parseFloat(value));
|
}
|
});
|
|
//填充色透明度
|
slider.render({
|
elem: '#opacity-cylinder-fill'
|
, min: 0 //最小值
|
, max: 100 //最大值
|
, value: editGraphic.alpha
|
, change: function(value) {
|
editGraphic.alpha = value;
|
editGraphic.setValue('alpha', value / 100);
|
}
|
});
|
|
//边框透明度
|
slider.render({
|
elem: '#opacity-cylinder-outline'
|
, min: 0 //最小值
|
, max: 100 //最大值
|
, value: editGraphic.outlineAlpha
|
, change: function(value) {
|
editGraphic.outlineAlpha = value;
|
editGraphic.setValue('outlineAlpha', value / 100);
|
}
|
});
|
|
//填充色
|
colorpicker.render({
|
elem: '#colorchk-cylinder-fill'
|
, color: editGraphic.fillColor //设置默认色
|
, done: function(color) {
|
editGraphic.fillColor = color;
|
editGraphic.graphic.material.color.setValue(new Cesium.Color.fromCssColorString(editGraphic.fillColor).withAlpha(editGraphic.alpha / 100));
|
}
|
});
|
|
//边框色
|
colorpicker.render({
|
elem: '#colorchk-cylinder-outline'
|
, color: editGraphic.outlineColor //设置默认色
|
, done: function(color) {
|
editGraphic.outlineColor = color;
|
editGraphic.graphic.outlineColor.setValue(new Cesium.Color.fromCssColorString(editGraphic.outlineColor).withAlpha(editGraphic.outlineAlpha / 100));
|
}
|
});
|
|
//是否显示边框
|
form.on('switch(showCylinderOutline)', function(data) {
|
let isShow = this.checked;
|
if (isShow) {
|
$('.outline').show();
|
} else {
|
$('.outline').hide();
|
}
|
editGraphic.setValue('outline', isShow);
|
});
|
if (editGraphic.getValue('outline')) {
|
$('#showCylinderOutline').next().click();
|
$('#showCylinderOutline').attr('value', 'on')
|
}
|
}
|
|
//球体属性
|
function ellipsoidProp () {
|
//半径
|
$('.ellipsoid input[name="radius"]').on('input propertychange', function(event) {
|
var value = $(this).val().replace(/[^\d\.]/g, '');
|
if (value === '' || value === '.') return;
|
if (editGraphic.setValue) {
|
editGraphic.setValue('radius', parseFloat(value));
|
}
|
});
|
|
//填充色透明度
|
slider.render({
|
elem: '#opacity-ellipsoid-fill'
|
, min: 0 //最小值
|
, max: 100 //最大值
|
, value: editGraphic.alpha
|
, change: function(value) {
|
editGraphic.alpha = value;
|
editGraphic.setValue('alpha', value / 100);
|
}
|
});
|
|
//边框透明度
|
slider.render({
|
elem: '#opacity-ellipsoid-outline'
|
, min: 0 //最小值
|
, max: 100 //最大值
|
, value: editGraphic.outlineAlpha
|
, change: function(value) {
|
editGraphic.outlineAlpha = value;
|
editGraphic.setValue('outlineAlpha', value / 100);
|
}
|
});
|
|
//填充色
|
colorpicker.render({
|
elem: '#colorchk-ellipsoid-fill'
|
, color: editGraphic.fillColor //设置默认色
|
, done: function(color) {
|
editGraphic.fillColor = color;
|
editGraphic.graphic.material.color.setValue(new Cesium.Color.fromCssColorString(editGraphic.fillColor).withAlpha(editGraphic.alpha / 100));
|
}
|
});
|
|
//边框色
|
colorpicker.render({
|
elem: '#colorchk-ellipsoid-outline'
|
, color: editGraphic.outlineColor //设置默认色
|
, done: function(color) {
|
editGraphic.outlineColor = color;
|
editGraphic.graphic.outlineColor.setValue(new Cesium.Color.fromCssColorString(editGraphic.outlineColor).withAlpha(editGraphic.outlineAlpha / 100));
|
}
|
});
|
|
//是否显示边框
|
form.on('switch(showEllipsoidOutline)', function(data) {
|
let isShow = this.checked;
|
if (isShow) {
|
$('.outline').show();
|
} else {
|
$('.outline').hide();
|
}
|
editGraphic.setValue('outline', isShow);
|
});
|
if (editGraphic.getValue('outline')) {
|
$('#showEllipsoidOutline').next().click();
|
$('#showEllipsoidOutline').attr('value', 'on')
|
}
|
}
|
|
function removeGraphic () {
|
if (editGraphic.entity) {
|
Viewer.entities.remove(editGraphic.entity);
|
}
|
}
|
|
function getFillColor (rgba) {
|
editGraphic.fillColor = colorHex('rgb(' + rgba.red * 255 + ',' + rgba.green * 255 + ',' + rgba.blue * 255 + ')');
|
editGraphic.alpha = rgba.alpha * 100;
|
}
|
|
function getOutlineColor (rgba) {
|
editGraphic.outlineColor = colorHex('rgb(' + rgba.red * 255 + ',' + rgba.green * 255 + ',' + rgba.blue * 255 + ')');
|
editGraphic.outlineAlpha = rgba.alpha * 100;
|
}
|
|
function colorHex (rgb) {
|
var _this = rgb;
|
var reg = /^#([0-9a-fA-f]{3}|[0-9a-fA-f]{6})$/;
|
if (/^(rgb|RGB)/.test(_this)) {
|
var str = _this.replace(/(rgb|RGB)*/g, "");
|
str = str.replace("(", "").replace(")", "");
|
var aColor = str.split(",");
|
var strHex = "#";
|
for (var i = 0; i < aColor.length; i++) {
|
var hex = Number(aColor[i]).toString(16);
|
hex = hex.length === 1 ? 0 + '' + hex : hex;// 保证每个rgb的值为2位
|
if (hex === "0") {
|
hex += hex;
|
}
|
strHex += hex;
|
}
|
if (strHex.length !== 7) {
|
strHex = _this;
|
}
|
return strHex;
|
} else if (reg.test(_this)) {
|
var aNum = _this.replace(/#/, "").split("");
|
if (aNum.length === 6) {
|
return _this;
|
} else if (aNum.length === 3) {
|
var numHex = "#";
|
for (var i = 0; i < aNum.length; i += 1) {
|
numHex += (aNum[i] + aNum[i]);
|
}
|
return numHex;
|
}
|
} else {
|
return _this;
|
}
|
}
|
</script>
|
|
|
</body>
|
|
</html>
|