From 0f2fc0872069f0a5099cc535e6ff885b13937153 Mon Sep 17 00:00:00 2001
From: czt <czt18638530771@163.com>
Date: 星期三, 10 十二月 2025 18:12:04 +0800
Subject: [PATCH] 网关配置页面
---
fzzy-igdss-web/src/main/resources/templates/security/patrol/patrolRecord/trajectoryMap.html | 72 ++++++++++++++++++++++++++++++++++++
1 files changed, 72 insertions(+), 0 deletions(-)
diff --git a/fzzy-igdss-web/src/main/resources/templates/security/patrol/patrolRecord/trajectoryMap.html b/fzzy-igdss-web/src/main/resources/templates/security/patrol/patrolRecord/trajectoryMap.html
new file mode 100644
index 0000000..33effe3
--- /dev/null
+++ b/fzzy-igdss-web/src/main/resources/templates/security/patrol/patrolRecord/trajectoryMap.html
@@ -0,0 +1,72 @@
+<!DOCTYPE html>
+<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
+<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">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+ <meta name="renderer" content="webkit">
+ <th:block th:include="include :: header('杞ㄨ抗鍥惧睍绀�')"/>
+ <!-- 鐧惧害鍦板浘API -->
+ <script type="text/javascript" src="https://api.map.baidu.com/api?v=1.0&type=webgl&ak=R3FfyIEbBAWNckTqRSopHQktdkgp924F"></script>
+</head>
+<body>
+<!-- 鍦板浘瀹瑰櫒 -->
+<div class="container-div" id="map-container">
+</div>
+<th:block th:include="include :: footer"/>
+<script th:inline="javascript">
+ // 1. 鑾峰彇鍚庣浼犻�掔殑杞ㄨ抗鏁版嵁
+ const trackPoints = [[${trackPoints}]];
+ // 杞崲涓虹櫨搴﹀湴鍥惧潗鏍囨暟缁�
+ const path = trackPoints.map(point => new BMapGL.Point(point.longitude, point.latitude));
+
+ // 2. 鍒濆鍖栧湴鍥�
+ function initMap() {
+ // 鍒涘缓鍦板浘瀹炰緥锛屼腑蹇冪偣璁句负绗竴涓建杩圭偣
+ const map = new BMapGL.Map("map-container");
+ const centerPoint = path[0] || new BMapGL.Point(116.404, 39.915);
+ map.centerAndZoom(centerPoint, 14); // 14涓哄湴鍥剧缉鏀剧骇鍒�
+ map.enableScrollWheelZoom(true); // 寮�鍚紶鏍囨粴杞缉鏀�
+
+ // 3. 娣诲姞杞ㄨ抗绾�
+ const polyline = new BMapGL.Polyline(path, {
+ strokeColor: "#3388ff", // 绾块鑹�
+ strokeWeight: 5, // 绾垮搴�
+ strokeOpacity: 0.8 // 绾块�忔槑搴�
+ });
+ map.addOverlay(polyline);
+
+ // 4. 涓烘瘡涓建杩圭偣娣诲姞鏍囪鍜屼俊鎭獥鍙�
+ trackPoints.forEach((point, index) => {
+ const markerPoint = new BMapGL.Point(point.longitude, point.latitude);
+ // 鍒涘缓鏍囪
+ const marker = new BMapGL.Marker(markerPoint);
+ map.addOverlay(marker);
+
+ // 鍒涘缓淇℃伅绐楀彛鍐呭
+ const infoWindow = new BMapGL.InfoWindow(`
+ <div style="font-size:14px;">
+ <p>搴忓彿锛�${index + 1}</p>
+ <p>缁忓害锛�${point.longitude}</p>
+ <p>绾害锛�${point.latitude}</p>
+ <p>鏃堕棿锛�${point.createTime}</p>
+ </div>
+ `);
+
+ // 鐐瑰嚮鏍囪鏄剧ず淇℃伅绐楀彛
+ marker.addEventListener("click", () => {
+ map.openInfoWindow(infoWindow, markerPoint);
+ });
+ });
+
+ // 5. 璋冩暣鍦板浘瑙嗛噹浠ユ樉绀烘暣涓建杩�
+ if (path.length > 1) {
+ map.setViewport(path); // 鑷姩閫傞厤杞ㄨ抗鑼冨洿
+ }
+ }
+
+ // 椤甸潰鍔犺浇瀹屾垚鍚庡垵濮嬪寲鍦板浘
+ window.onload = initMap;
+</script>
+</body>
+</html>
\ No newline at end of file
--
Gitblit v1.9.3