| <!DOCTYPE html> | 
| <html> | 
|   | 
| <head> | 
|     <meta charset="UTF-8"> | 
|     <title>轨迹飞行</title> | 
|     <link href="../../libs/layui/css/layui.css" rel="stylesheet"> | 
|     <script type="text/javascript" src="../../libs/jquery/jquery-3.5.1.min.js"></script> | 
|     <script type="text/javascript" src="../../libs/layui/layui.js"></script> | 
|     <link rel="stylesheet" href="//at.alicdn.com/t/font_2599272_671fgrsk7ev.css"> | 
|     <style> | 
|         .romadiv { | 
|             overflow-x: hidden; | 
|             overflow-y: auto; | 
|             padding: 0; | 
|         } | 
|   | 
|         .mt-content-head { | 
|             width: 240px; | 
|             height: 30px; | 
|             line-height: 30px; | 
|             text-align: center; | 
|             margin-top: 10px; | 
|         } | 
|   | 
|         .mt-table-content { | 
|             /* margin-top: 10px; */ | 
|             height: 200px; | 
|             color: white; | 
|             width: 240px; | 
|             border: 1px white solid; | 
|             border-radius: 15px; | 
|             /* width: 250px; */ | 
|             float: left; | 
|             /* margin-left: 10px; */ | 
|         } | 
|   | 
|         .mt-table-head { | 
|             width: 240px; | 
|             /* height: 50px; */ | 
|             /* margin-top: 15px; */ | 
|             /* font-size: 24px; */ | 
|         } | 
|   | 
|         .mt-table-row { | 
|             height: 30px; | 
|             width: 100%; | 
|             /* margin-top: 15px; */ | 
|         } | 
|   | 
|         .mt-table-row-left { | 
|             margin: 0px; | 
|             padding-left: 10px; | 
|             width: 100px; | 
|             float:left; | 
|             display: inline; | 
|             border-bottom: solid 1px white; | 
|             border-right: solid 1px white; | 
|         } | 
|   | 
|         .mt-table-row-right { | 
|             margin: 0px; | 
|             padding-left: 10px; | 
|             float:left; | 
|             display: inline; | 
|             width:118px; | 
|             border-bottom: solid 1px white; | 
|             overflow: hidden; | 
|             text-overflow:ellipsis; | 
|             white-space: nowrap; | 
|         } | 
|   | 
|         .mt-table-row-label { | 
|             color: white; | 
|             line-height: 30px; | 
|             font-size: 12px; | 
|         } | 
|         .form-control { | 
|             /* display: block; */ | 
|             width: 110px; | 
|             height: 30px; | 
|             font-size: 12px; | 
|             line-height: 1.6; | 
|             background-color: #2c3238; | 
|             opacity: 0.8; | 
|             color: #fff; | 
|             background-image: none; | 
|             border: 0px solid #e4eaec; | 
|             border-radius: 3px; | 
|             -webkit-box-shadow: inset 0 1px 1px rgb(0 0 0 / 8%); | 
|             box-shadow: inset 0 1px 1px rgb(0 0 0 / 8%); | 
|             -webkit-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; | 
|             -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s; | 
|             -o-transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; | 
|             transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s; | 
|             transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s; | 
|             transition: border-color ease-in-out .15s, box-shadow ease-in-out .15s, -webkit-box-shadow ease-in-out .15s; | 
|         } | 
|         .iconfont { | 
|             font-size: 13px; | 
|         } | 
|   | 
|         .mybtn { | 
|             color: #fff; | 
|             background-color: rgba(32, 160, 255, .2); | 
|             border-color: #4db3ff; | 
|         } | 
|     </style> | 
| </head> | 
|   | 
| <body> | 
|     <!-- 让IE8/9支持媒体查询,从而兼容栅格 --> | 
|     <!--[if lt IE 9]> | 
|             <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script> | 
|             <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script> | 
|         <![endif]--> | 
|     <div class="romadiv" action=""> | 
|         <div class="mt-row"> | 
|             <div class="mt-content-head"> | 
|                 <button type="button" class="layui-btn mybtn  layui-btn-sm" onclick="roamStop()">停止漫游</button> | 
|             </div> | 
|         </div> | 
|         <div class="mt-table-content"> | 
|             <div class="mt-table-head"> | 
|                 <div class="mt-table-row-left mt-table-row-label">名称</div> | 
|                 <div class="mt-table-row-right mt-table-row-label ">操作</div> | 
|             </div> | 
|             <div class="mt-table-row"> | 
|                 <div class="mt-table-row-left mt-table-row-label">路线名称</div> | 
|                 <div class="mt-table-row-right mt-table-row-label" id = "name">预设轨迹</div> | 
|             </div> | 
|             <div class="mt-table-row"> | 
|                 <div class="mt-table-row-left mt-table-row-label">视角模式</div> | 
|                 <div class="mt-table-row-right mt-table-row-label"> | 
|                     <select id="viewModel" name="size" class="form-control" onchange="viewChange()"> | 
|                         <option value="2">跟随视角</option> | 
|                         <option value="1">自由视角</option> | 
|                         <option value="3">第一人称</option> | 
|                         <option value="4">鸟瞰视角</option> | 
|                     </select> | 
|                 </div> | 
|             </div> | 
|             <div class="mt-table-row" id="distance"> | 
|                 <div class="mt-table-row-left mt-table-row-label">视角距离</div> | 
|                 <div class="mt-table-row-right mt-table-row-label"> | 
|                     <input type="number" class="form-control" autocomplete="off" id="viewDistance" max="99999" min="0" | 
|                         value="50"  onchange="viewChange()" /> | 
|                 </div> | 
|             </div> | 
|             <div class="mt-table-row" id="height" style="display: none;"> | 
|                 <div class="mt-table-row-left mt-table-row-label">视角高度</div> | 
|                 <div class="mt-table-row-right mt-table-row-label"> | 
|                     <input type="number" class="form-control" autocomplete="off" id="viewHeight" max="99999" min="0" | 
|                         value="50" onchange="viewChange()" /> | 
|                 </div> | 
|             </div> | 
|             <div class="mt-table-row"> | 
|                 <div class="mt-table-row-left mt-table-row-label">漫游速度</div> | 
|                 <div class="mt-table-row-right mt-table-row-label"> | 
|                     <input type="number" class="form-control" autocomplete="off" id="speed" max="100" min="0" | 
|                         value="10" onchange="viewChange()" /> | 
|                 </div> | 
|             </div> | 
|         </div> | 
|     </div> | 
|     <script> | 
|         var options = { | 
|             'viewModel':2, | 
|             'viewDistance':50, | 
|             'viewHeight':50, | 
|             'speed': Number(3) | 
|         }; | 
|         var layerIndex = null; | 
|         function roamStop(index) { | 
|             parent.stopRoaming(); | 
|             parent.roamFlyPage = undefined; | 
|             parent.layer.close(layerIndex); | 
|         }; | 
|         function viewChange(){ | 
|             options.viewModel = Number($('select option:selected').val()); | 
|             switch(options.viewModel){ | 
|                 case 1:{ | 
|                     $('#distance').hide(); | 
|                     $('#height').hide(); | 
|                     break; | 
|                 } | 
|                 case 2:{ | 
|                     $('#distance').show(); | 
|                     $('#height').hide(); | 
|                     break; | 
|                 } | 
|                 case 3:{ | 
|                     $('#distance').show(); | 
|                     $('#height').show(); | 
|                     break; | 
|                 } | 
|                 case 4:{ | 
|                     $('#distance').hide(); | 
|                     $('#height').show(); | 
|                     break; | 
|                 } | 
|             } | 
|             options.viewDistance = Number($('#viewDistance').val()); | 
|             options.viewHeight = Number($('#viewHeight').val()); | 
|             options.speed = Number($('#speed').val()); | 
|             parent.roamSettingChange(options); | 
|         } | 
|   | 
|     </script> | 
| </body> | 
|   | 
| </html> |