From 6b36d7a84b91fd093ed76742412e580d03823b62 Mon Sep 17 00:00:00 2001
From: shuishen <1109946754@qq.com>
Date: Sat, 06 May 2023 17:40:54 +0800
Subject: [PATCH] 电子沙盘调整

---
 src/utils/turfPolygon.js |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diff --git a/src/utils/turfPolygon.js b/src/utils/turfPolygon.js
index dc564a4..83f8133 100644
--- a/src/utils/turfPolygon.js
+++ b/src/utils/turfPolygon.js
@@ -2,7 +2,7 @@
  * @Author: shuishen 1109946754@qq.com
  * @Date: 2023-03-31 10:52:25
  * @LastEditors: shuishen 1109946754@qq.com
- * @LastEditTime: 2023-05-06 10:45:56
+ * @LastEditTime: 2023-05-06 16:52:41
  * @FilePath: \srs-police-affairs\src\utils\turfPolygon.js
  * @Description: 
  * 
@@ -138,4 +138,11 @@
     // const poly = turf.polygon([[[0, 29], [3.5, 29], [2.5, 32], [0, 29]]])
 
     return scope
+}
+
+export const getLineSpeed = (data) => {
+    var line = turf.lineString(data)
+    var length = turf.length(line, { units: 'miles' })
+
+    return length * 1000 / 50
 }
\ No newline at end of file

--
Gitblit v1.9.3