From 8d16e3964b4ca6d06a5d0261006566254e1aec82 Mon Sep 17 00:00:00 2001
From: wangzhibo <wangzhibo@shsening.com>
Date: 星期二, 05 十月 2021 17:58:23 +0800
Subject: [PATCH] 移动监测点-回放功能
---
widgetsTS/taxiRouteReplay/img/start.png | 0
widgetsTS/taxiRouteReplay/view.html | 92 ++++++++
widgetsTS/taxiRouteReplay/view.js | 139 ++++++++++++
widgetsTS/taxiRouteReplay/img/end.png | 0
widgetsTS/taxiRouteReplay/view.css | 212 +++++++++++++++++++
widgetsTS/taxiRouteReplay/widget.js | 192 +++++++++++++++++
6 files changed, 635 insertions(+), 0 deletions(-)
diff --git a/widgetsTS/taxiRouteReplay/img/end.png b/widgetsTS/taxiRouteReplay/img/end.png
new file mode 100644
index 0000000..7da5319
--- /dev/null
+++ b/widgetsTS/taxiRouteReplay/img/end.png
Binary files differ
diff --git a/widgetsTS/taxiRouteReplay/img/start.png b/widgetsTS/taxiRouteReplay/img/start.png
new file mode 100644
index 0000000..fce57e8
--- /dev/null
+++ b/widgetsTS/taxiRouteReplay/img/start.png
Binary files differ
diff --git a/widgetsTS/taxiRouteReplay/view.css b/widgetsTS/taxiRouteReplay/view.css
new file mode 100644
index 0000000..2a682ac
--- /dev/null
+++ b/widgetsTS/taxiRouteReplay/view.css
@@ -0,0 +1,212 @@
+.talbe_style {
+ padding: 5px;
+ border: 0;
+ font-size: 13px;
+}
+
+.talbe_style tr td {
+ padding: 2px;
+ text-align: left;
+}
+
+.line {
+ border-top: 1px solid #e6e6e6;
+ margin: 5px;
+}
+
+.nametd {
+ width: 50px;
+}
+
+.mapDH_FX {
+ background-color: rgba(32, 160, 255, 0.2);
+ color: white;
+ width: 135px;
+ line-height: 40px;
+ border: none;
+ border-radius: 4px;
+}
+
+.mapDH_FX_DIV {
+ text-align: center
+}
+
+input, p {
+ padding: 0;
+}
+
+input {
+ border: none;
+}
+
+.clearfix {
+ *zoom: 1;
+}
+
+.clearfix:after {
+ content: '';
+ display: block;
+ clear: both;
+ overflow: hidden;
+}
+
+.route_box {
+ width: 100%;
+ height: calc(100% - 120px);
+ overflow-y: auto;
+ overflow-x: hidden;
+}
+
+td {
+ height: 40px;
+ color: #ffffff;
+}
+
+.title td {
+ text-align: center;
+ color: #ffffff;
+}
+
+.lxh {
+ text-align: center;
+}
+
+.fa input {
+ padding: 5px 10px;
+ background: #4db3ff;
+ color: #ffffff;
+ border-radius: 5px;
+}
+
+.router_btn {
+ margin-left: 10px;
+}
+
+.router_table {
+ width: 99%;
+}
+
+.span_sjgs {
+ display: none;
+ margin-left: 5px;
+}
+
+.mcxd {
+ display: none;
+ margin-top: 10px;
+ position: relative;
+}
+
+.clearfix {
+ *zoom: 1;
+}
+
+.clearfix:after {
+ content: '';
+ display: block;
+ clear: both;
+ overflow: hidden;
+}
+
+.mapDH_title button {
+ width: 120px;
+ height: 40px;
+ border: 1px solid #4793c7;
+ float: left;
+ margin-right: 10px;
+ cursor: pointer;
+ border-radius: 5px;
+ font-size: 16px;
+ color: #ffffff;
+ background: none;
+}
+
+.mapDH_title .active {
+ background: #20a0ff;
+}
+
+.mapDH_title {
+ margin-left: 20%;
+ margin-top: 10px;
+}
+
+.zbxd {
+ margin: 10px;
+}
+
+.searchbox {
+ width: 400px;
+ overflow: hidden;
+}
+
+.seachcon {
+ width: 999999px;
+ float: left;
+}
+
+.searchinfo {
+ width: 400px;
+ box-sizing: border-box;
+ padding: 10px 20px;
+ float: left;
+}
+
+.inpbox {
+ margin-bottom: 10px;
+}
+
+.ltit {
+ float: left;
+ color: #ffffff;
+ line-height: 32px;
+}
+
+.text {
+ width: 180px;
+ height: 32px;
+ float: left;
+ border-radius: 5px;
+ box-sizing: border-box;
+ padding-left: 10px;
+}
+
+.btn {
+ width: 82px;
+ height: 32px;
+ background: #20a0ff;
+ color: #ffffff;
+ margin-left: 10px;
+ border-radius: 5px;
+}
+
+.searchval {
+ width: 180px;
+ height: 220px;
+ box-sizing: border-box;
+ padding: 10px;
+ overflow-y: auto;
+ background-color: rgba(63, 72, 84, 1);
+ display: none;
+ position: absolute;
+ left: 90px;
+}
+
+.startbox .searchval {
+ top: 50px;
+}
+
+.endbox .searchval {
+ top: 97px;
+}
+
+.searchval li {
+ color: #ffffff;
+ line-height: 30px;
+}
+
+
+.no_bgc_table {
+ width :100%;
+ height:60%;
+ margin-left: 10px;
+}
\ No newline at end of file
diff --git a/widgetsTS/taxiRouteReplay/view.html b/widgetsTS/taxiRouteReplay/view.html
new file mode 100644
index 0000000..0d35993
--- /dev/null
+++ b/widgetsTS/taxiRouteReplay/view.html
@@ -0,0 +1,92 @@
+锘�<!DOCTYPE html>
+<html class="no-js css-menubar" lang="zh-cn">
+
+<head>
+ <title>寮圭獥瀛愰〉闈�</title>
+ <meta charset="utf-8" />
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
+ <!-- 绉诲姩璁惧 viewport -->
+ <meta name="viewport"
+ content="width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no,minimal-ui" />
+ <meta name="author" content="鑹插畞绉戞妧 http://mars3d.cn " />
+ <!-- 360娴忚鍣ㄩ粯璁や娇鐢╓ebkit鍐呮牳 -->
+ <meta name="renderer" content="webkit" />
+ <!-- Chrome娴忚鍣ㄦ坊鍔犳闈㈠揩鎹锋柟寮忥紙瀹夊崜锛� -->
+ <link rel="icon" type="image/png" href="../../img/favicon/favicon.png" />
+ <meta name="mobile-web-app-capable" content="yes" />
+ <!-- Safari娴忚鍣ㄦ坊鍔犲埌涓诲睆骞曪紙IOS锛� -->
+ <link rel="icon" sizes="192x192" href="img/favicon/apple-touch-icon.png" />
+ <meta name="apple-mobile-web-app-capable" content="yes" />
+ <meta name="apple-mobile-web-app-status-bar-style" content="black" />
+ <meta name="apple-mobile-web-app-title" content="鑹插畞绉戞妧" />
+ <!-- Win8鏍囬鏍忓強ICON鍥炬爣 -->
+ <link rel="apple-touch-icon-precomposed" href="../../img/favicon/apple-touch-icon.png" />
+ <meta name="msapplication-TileImage" content="../../img/favicon/app-icon72x72@2x.png" />
+ <meta name="msapplication-TileColor" content="#62a8ea" />
+
+ <!-- 绗�3鏂筶ib寮曞叆 -->
+ <script type="text/javascript" src="../../lib/include-lib.js?time=20210803" libpath="../../lib/"
+ include="jquery,font-awesome,bootstrap,admui-frame"></script>
+
+ <link href="../../css/widget-win.css" rel="stylesheet" />
+ <link href="view.css?time=20210803" rel="stylesheet" />
+ <link href="../../lib/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
+ <link href="../../lib/bootstrap/bootstrap-datepicker/bootstrap-datetimepicker.css" rel="stylesheet" />
+ <script src="../../lib/bootstrap/bootstrap-datepicker/bootstrap-datetimepicker.js"></script>
+ <script src="../../lib/bootstrap/bootstrap-datepicker/bootstrap-datetimepicker.zh-CN.js"></script>
+</head>
+
+<body>
+ <table id="paramView" class="talbe_style zbxd" style="display: block">
+ <tr>
+ <td class="nametd">寮�濮嬫椂闂达細</td>
+ <td>
+ <input type='text' class="form-control date" id='appDateHourStart' name="appDateHourStart" />
+ </td>
+ </tr>
+ <tr>
+ <td class="nametd">缁撴潫鏃堕棿锛�</td>
+ <td>
+ <input type='text' class="form-control date" id='appDateHourEnd' name="appDateHourEnd" />
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <button type="button" id="startQueryTaxiData" class="btn btn-primary" style="width:100px;"><span
+ id="startQueryTaxiDataText">鏌ヨ</span></button>
+ </td>
+ </tr>
+ </table>
+ <div class="line"></div>
+
+ <div class="route_box" id="route_box" style="display: none">
+ <table class="talbe_style zbxd" style="display: block">
+ <tr>
+ <td>
+ <button type="button" id="btnStartDH" class="btn btn-primary" style="width:100px;"><span
+ id="btnStartDHText">寮�濮嬪洖鏀�</span></button>
+ </td>
+ <td>
+ <span class="span_sjgs"><input class="sjgs" id="checkbox_sjgs" type="checkbox">瑙嗚璺熼殢</span>
+ </td>
+ </tr>
+ </table>
+
+ <table class="no_bgc_table">
+ <thead>
+ <tr style="background-color: rgba(0, 0, 0, 0); color: #FF5722;">
+ <th style="font-weight: bold;">ID</th>
+ <th style="font-weight: bold;">鎸囨爣缂栫爜</th>
+ <th style="font-weight: bold;">鎸囨爣鏁板��</th>
+ <th style="font-weight: bold;">鎸囨爣鍗曚綅</th>
+ </tr>
+ </thead>
+ <tbody id="indexTaxiContent" style="cursor: pointer;">
+ </tbody>
+ </table>
+
+ </div>
+ <script src="view.js?time=20210803"></script>
+</body>
+
+</html>
\ No newline at end of file
diff --git a/widgetsTS/taxiRouteReplay/view.js b/widgetsTS/taxiRouteReplay/view.js
new file mode 100644
index 0000000..5a134fe
--- /dev/null
+++ b/widgetsTS/taxiRouteReplay/view.js
@@ -0,0 +1,139 @@
+"use script"; //寮�鍙戠幆澧冨缓璁紑鍚弗鏍兼ā寮�
+
+//瀵瑰簲widget.js涓璏yWidget瀹炰緥鍖栧悗鐨勫璞�
+var thisWidget;
+
+function initWidgetView(_thisWidget) {
+ thisWidget = _thisWidget;
+
+ DatePicker("#appDateHourStart", '#appDateHourEnd');
+ $("#appDateHourStart").datetimepicker("setDate", new Date(thisWidget.appDateHourStart));
+ $('#appDateHourEnd').datetimepicker('setDate', new Date(thisWidget.appDateHourEnd));
+
+
+ $("#btnStartDH")
+ .off("click")
+ .on("click", function () {
+ if ($("#btnStartDHText").text() == "寮�濮嬪洖鏀�") {
+ thisWidget.startDH();
+ $("#btnStartDHText").text("鍋滄鍥炴斁");
+ $("#checkbox_sjgs").show();
+ } else {
+ $("#btnStartDHText").text("寮�濮嬪洖鏀�");
+ thisWidget.pauseReplay();
+ }
+ });
+
+ $("#checkbox_sjgs")
+ .off("click")
+ .on("click", function () {
+ var checked = $(this).prop("checked");
+ if (checked) {
+ thisWidget.startGS();
+ } else {
+ thisWidget.removeTrack();
+ }
+ });
+
+
+ //寮�濮嬫煡璇㈣建杩�
+ $("#startQueryTaxiData").click(function () {
+ haoutil.loading.show();
+ $.getJSON(thisWidget.nodejs_url_predix + "dataapi/Bdata?bid=get_1004_single_path&siteid=" + thisWidget.taxi_sn, {
+ datatime1: thisWidget.appDateHourStart,
+ datatime2: thisWidget.appDateHourEnd
+ }, (result) => {
+ haoutil.loading.hide();
+ thisWidget.clearReplayLayers();
+ if (result.data.result.length > 0) {
+ thisWidget.setSingleTaxiReplayData(result.data.result);
+ var points = [];
+ for (var i = 0, len = result.data.result.length; i < len; i++) {
+ let item = result.data.result[i];
+ points[points.length] = [item["lon"], item["lat"]];
+ }
+ thisWidget.addTaxiReplayGraphic(points);
+ $("#route_box").show();
+ } else {
+ haoutil.msg("鏃犳煡璇㈣褰曪紝璇锋洿鎹㈡煡璇㈡潯浠讹紒");
+ }
+ });
+ });
+}
+
+
+function refreshDetailTable(tmpattr) {
+
+ $("#indexTaxiContent").empty();
+ var _tr = "<tr><td>1</td><td>code</td><td>" + tmpattr.code + "</td><td>/</td></tr>"
+ $("#indexTaxiContent").append(_tr);
+ _tr = "<tr><td>3</td><td>datatime</td><td>" + tmpattr.datatime + "</td><td>/</td></tr>"
+ $("#indexTaxiContent").append(_tr);
+ var tmp_index = 3;
+ for (var p in tmpattr) {//閬嶅巻json瀵硅薄鐨勬瘡涓猭ey/value瀵�,p涓簁ey
+ if (p !== 'code' && p !== 'datatime') {
+ _tr = "<tr><td>" + tmp_index + "</td><td>" + p + "</td><td>" + tmpattr[p] + "</td><td>" + getUnitByqindex(p) + "</td></tr>"
+ $("#indexTaxiContent").append(_tr);
+ tmp_index++;
+ }
+ }
+}
+
+function getUnitByqindex(qindex) {
+ qindex = qindex.toUpperCase();
+ if (qindex == 'PM25' || qindex == 'PM10' || qindex == 'NO' || qindex == 'NO2' || qindex == 'NOX' || qindex == 'SO2') {
+ return '渭g/m鲁';
+ } else if (qindex == 'CO') {
+ return 'mg/m鲁';
+ } else if (qindex == 'SPEED') {
+ return 'km/h';
+ } else {
+ return '/';
+ }
+}
+
+function resetStartQueryTaxiDataText(taxi) {
+ $("#startQueryTaxiDataText").text("鏌ヨ(" + taxi + ")");
+ $("#route_box").hide();
+}
+
+function DatePicker(beginSelector, endSelector) {
+ $(beginSelector).datetimepicker(
+ {
+ bootcssVer: 3, //bootstrap-datetimepicker锛媌ootstrap v3锛屼絾杩欎釜鎻掍欢浣跨敤鐨勬椂鍊欙紝骞舵病鏈夊拰V3鐩稿尮閰嶏紝浠嶇劧璋冪敤鐨勬槸bootstrap V2鐨勫浘鏍� 鎶奲ootcssVer鐨勫�肩洿鎺ヨ涓�3锛屽惁鍒檇atetimepicker涓嶄細鏄剧ず鍑轰笂銆佷笅涓湀鐨勭澶�
+ format: 'yyyy-mm-dd hh:ii:00',
+ minView: 'day',//璁剧疆鏃堕棿閫夋嫨涓哄勾鏈堟棩 鍘绘帀鏃跺垎绉掗�夋嫨
+ todayBtn: true, //濡傛灉姝ゅ�间负true 鎴� "linked"锛屽垯鍦ㄦ棩鏈熸椂闂撮�夋嫨鍣ㄧ粍浠剁殑搴曢儴鏄剧ず涓�涓� "Today" 鎸夐挳鐢ㄤ互閫夋嫨褰撳墠鏃ユ湡銆傚鏋滄槸true鐨勮瘽锛�"Today" 鎸夐挳浠呬粎灏嗚鍥捐浆鍒板綋澶╃殑鏃ユ湡锛屽鏋滄槸"linked"锛屽綋澶╂棩鏈熷皢浼氳閫変腑銆�
+ clearBtn: true,
+ language: 'zh-CN',
+ autoclose: true, //褰撻�夋嫨涓�涓棩鏈熶箣鍚庢槸鍚︾珛鍗冲叧闂鏃ユ湡鏃堕棿閫夋嫨鍣ㄣ��
+ keyboardNavigation: true, //鏄惁鍏佽閫氳繃鏂瑰悜閿敼鍙樻棩鏈熴��
+ forceParse: true, //褰撻�夋嫨鍣ㄥ叧闂殑鏃跺�欙紝鏄惁寮哄埗瑙f瀽杈撳叆妗嗕腑鐨勫�笺��
+ initialDate: new Date(),
+ todayHighlight: 1, //濡傛灉涓簍rue, 楂樹寒褰撳墠鏃ユ湡
+ endDate: new Date()
+ }).on('changeDate', function (ev) {
+ if (ev.date) {
+ $(endSelector).datetimepicker('setStartDate', new Date(ev.date.valueOf()))
+ } else {
+ $(endSelector).datetimepicker('setStartDate', null);
+ }
+ thisWidget.appDateHourStart = $(beginSelector).val();
+ })
+ $(endSelector).datetimepicker(
+ {
+ bootcssVer: 3, //bootstrap-datetimepicker锛媌ootstrap v3锛屼絾杩欎釜鎻掍欢浣跨敤鐨勬椂鍊欙紝骞舵病鏈夊拰V3鐩稿尮閰嶏紝浠嶇劧璋冪敤鐨勬槸bootstrap V2鐨勫浘鏍� 鎶奲ootcssVer鐨勫�肩洿鎺ヨ涓�3锛屽惁鍒檇atetimepicker涓嶄細鏄剧ず鍑轰笂銆佷笅涓湀鐨勭澶�
+ format: 'yyyy-mm-dd hh:ii:00',
+ todayBtn: true, //濡傛灉姝ゅ�间负true 鎴� "linked"锛屽垯鍦ㄦ棩鏈熸椂闂撮�夋嫨鍣ㄧ粍浠剁殑搴曢儴鏄剧ず涓�涓� "Today" 鎸夐挳鐢ㄤ互閫夋嫨褰撳墠鏃ユ湡銆傚鏋滄槸true鐨勮瘽锛�"Today" 鎸夐挳浠呬粎灏嗚鍥捐浆鍒板綋澶╃殑鏃ユ湡锛屽鏋滄槸"linked"锛屽綋澶╂棩鏈熷皢浼氳閫変腑銆�
+ clearBtn: true,
+ language: 'zh-CN',
+ autoclose: true, //褰撻�夋嫨涓�涓棩鏈熶箣鍚庢槸鍚︾珛鍗冲叧闂鏃ユ湡鏃堕棿閫夋嫨鍣ㄣ��
+ keyboardNavigation: true, //鏄惁鍏佽閫氳繃鏂瑰悜閿敼鍙樻棩鏈熴��
+ forceParse: true, //褰撻�夋嫨鍣ㄥ叧闂殑鏃跺�欙紝鏄惁寮哄埗瑙f瀽杈撳叆妗嗕腑鐨勫�笺��
+ initialDate: new Date(),
+ todayHighlight: 1, //濡傛灉涓簍rue, 楂樹寒褰撳墠鏃ユ湡
+ endDate: new Date()
+ }).on('changeDate', function (ev) {
+ thisWidget.appDateHourEnd = $(endSelector).val();
+ })
+}
diff --git a/widgetsTS/taxiRouteReplay/widget.js b/widgetsTS/taxiRouteReplay/widget.js
new file mode 100644
index 0000000..86bfe7f
--- /dev/null
+++ b/widgetsTS/taxiRouteReplay/widget.js
@@ -0,0 +1,192 @@
+(function (window, mars3d) {
+ //鍒涘缓widget绫伙紝闇�瑕佺户鎵緽aseWidget
+ class MyWidget extends mars3d.widget.BaseWidget {
+ //寮圭獥閰嶇疆
+ get view() {
+ return {
+ type: "window",
+ url: "view.html",
+ windowOptions: {
+ width: 350,
+ },
+ };
+ }
+
+ reloadData(new_taxi_sn) {
+ this.viewWindow.resetStartQueryTaxiDataText(new_taxi_sn);
+ this.taxi_sn = new_taxi_sn;
+
+ if (this.startGraphic) {
+ this.startGraphic.remove();
+ this.startGraphic = null;
+ }
+ if (this.endGraphic) {
+ this.endGraphic.remove();
+ this.endGraphic = null;
+ }
+ this.routeLayer.clear();
+ }
+
+ clearReplayLayers() {
+ this.pointLayer.clear();
+ this.routeLayer.clear();
+ }
+
+ addTaxiReplayGraphic(points) {
+
+ this.startGraphic = new mars3d.graphic.BillboardEntity({
+ position: points[0],
+ style: {
+ image: this.path + "img/start.png",
+ scale: 1,
+ horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
+ verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
+ clampToGround: true,
+ },
+ });
+ this.pointLayer.addGraphic(this.startGraphic);
+
+ this.endGraphic = new mars3d.graphic.BillboardEntity({
+ position: points[points.length - 1],
+ style: {
+ image: this.path + "img/end.png",
+ scale: 1,
+ horizontalOrigin: Cesium.HorizontalOrigin.CENTER,
+ verticalOrigin: Cesium.VerticalOrigin.BOTTOM,
+ clampToGround: true,
+ },
+ });
+ this.pointLayer.addGraphic(this.endGraphic);
+ let graphic = new mars3d.graphic.PolylineEntity({
+ positions: points,
+ style: {
+ width: 10,
+ material: new mars3d.material.LineFlowMaterialProperty({
+ color: Cesium.Color.AQUA,
+ image: "./img/textures/arrow2.png",
+ repeat: new Cesium.Cartesian2(50, 1),
+ speed: 40, //閫熷害锛屽缓璁彇鍊艰寖鍥�1-100
+ })
+ },
+ });
+ this.routeLayer.addGraphic(graphic);
+ this.routeLayer.flyTo();
+
+ }
+
+ setSingleTaxiReplayData(datas) {
+ mars3d.global_variables.singleTaxiReplayData = datas;
+ }
+
+ refreshDetailTable(tmpattr) {
+ this.viewWindow.refreshDetailTable(tmpattr);
+ }
+
+ //鍒濆鍖朳浠呮墽琛�1娆
+ create() {
+
+ this.gaodeRoute = new mars3d.query.GaodeRoute({
+ // key: ['ae29a37307840c7ae4a785ac905927e0'],
+ });
+ this.gaodePOI = new mars3d.query.GaodePOI({
+ // key: ['ae29a37307840c7ae4a785ac905927e0'],
+ });
+
+ //鍥惧眰绠$悊浣跨敤鐨勫垎缁�
+ this.groupLayer = new mars3d.layer.GroupLayer({
+ name: this.config.name,
+ pid: 50, //鍥惧眰绠$悊 涓娇鐢紝鐖惰妭鐐筰d
+ });
+
+ //鍒涘缓鐭㈤噺鏁版嵁鍥惧眰
+ this.pointLayer = new mars3d.layer.GraphicLayer({
+ name: this.config.name + "-璧锋鐐�",
+ });
+ this.groupLayer.addLayer(this.pointLayer); //鍔犲叆鍒嗙粍
+
+ this.routeLayer = new mars3d.layer.GraphicLayer({
+ name: this.config.name + "-璺嚎",
+ });
+ this.groupLayer.addLayer(this.routeLayer); //鍔犲叆鍒嗙粍
+ }
+ //姣忎釜绐楀彛鍒涘缓瀹屾垚鍚庤皟鐢�
+ winCreateOK(opt, result) {
+ this.viewWindow = result;
+ this.appDateHourStart = mars3d.global_variables.queryDataTStart;
+ this.appDateHourEnd = mars3d.global_variables.queryDataTEnd;
+ this.nodejs_url_predix = mars3d.global_variables.nodejs_url_predix;
+ this.taxi_sn = this.config.params;
+ this.viewWindow.resetStartQueryTaxiDataText(this.taxi_sn);
+
+ }
+ //鎵撳紑婵�娲�
+ activate() {
+ this.map.addLayer(this.groupLayer);
+ this.map.clock.shouldAnimate = false;
+ this.old_map_clock_startTime = this.map.clock.startTime;
+ this.old_map_clock_currentTime = this.map.clock.currentTime;
+ this.old_map_clock_stopTime = this.map.clock.stopTime;
+ this.old_map_clock_multiplier = this.map.clock.multiplier;
+ mars3d.global_variables.is_single_taxi_replaying = true;
+
+ }
+ //鍏抽棴閲婃斁
+ disable() {
+ this.map.clock.shouldAnimate = true;
+ this.map.clock.startTime = this.old_map_clock_startTime;
+ this.map.clock.currentTime = this.old_map_clock_currentTime;
+ this.map.clock.stopTime = this.old_map_clock_stopTime;
+ this.map.clock.multiplier = this.old_map_clock_multiplier;
+ mars3d.global_variables.is_single_taxi_replaying = false;
+
+ if (this.startGraphic) {
+ this.startGraphic.remove();
+ this.startGraphic = null;
+ }
+ if (this.endGraphic) {
+ this.endGraphic.remove();
+ this.endGraphic = null;
+ }
+ this.map.removeLayer(this.groupLayer);
+
+ }
+
+ //婕父鑷姩缁撴潫 鎴栫偣鍑� 鍋滄瀵艰埅鎸夐挳 鍚庯紝閲嶇疆鐣岄潰鍜屾搷浣�
+ pauseReplay() {
+ // 鏆傚仠鍥炴斁
+ this.map.clock.shouldAnimate = false;
+ }
+
+ //鍙栨秷褰撳墠鐨勮瑙掕窡闅�
+ removeTrack() {
+ if (this.nowFline) {
+ this.nowFline.setCameraOptions({ type: "" });
+ }
+ this.map.trackedEntity = undefined;
+ }
+ //==============寮�濮嬪鑸�===================
+ startDH() {
+ //瀵艰埅鍓嶉噴鏀句箣鍓嶇殑鎵�鏈夊鑸搷浣�
+ this.map.clock.shouldAnimate = true;
+ this.map.clock.startTime = Cesium.JulianDate.fromDate(new Date(this.appDateHourStart));
+ this.map.clock.currentTime = Cesium.JulianDate.fromDate(new Date(this.appDateHourStart));
+ this.map.clock.stopTime = Cesium.JulianDate.fromDate(new Date(this.appDateHourEnd));
+ this.map.clock.multiplier = 2.0;
+
+ }
+ //============寮�濮嬭瑙掕窡闅�=============
+ startGS() {
+ this.nowFline.setCameraOptions({
+ type: "gs",
+ heading: 0,
+ radius: 2500,
+ });
+ }
+
+ }
+
+ //娉ㄥ唽鍒皐idget绠$悊鍣ㄤ腑銆�
+ mars3d.widget.bindClass(MyWidget);
+
+ //姣忎釜widet涔嬮棿閮芥槸鐩存帴寮曞叆鍒癷ndex.html涓紝浼氬瓨鍦ㄥ郊姝ゅ懡鍚嶅啿绐侊紝鎵�浠ラ棴鍖呭鐞嗕笅銆�
+})(window, mars3d);
--
Gitblit v1.9.1