xyg vor 6 Monaten
Ursprung
Commit
0aa33b4433
1 geänderte Dateien mit 17 neuen und 1 gelöschten Zeilen
  1. 17 1
      nngkxxdp/src/main/resources/static/naxsb/tdcrlist.html

+ 17 - 1
nngkxxdp/src/main/resources/static/naxsb/tdcrlist.html

@@ -305,8 +305,24 @@
                 that.parkMap = new BMap.Map("mapcontainer");
                 that.parkMap.enableScrollWheelZoom();// 启用滚轮缩放
                 that.parkMap.enableDragging(); // 启用拖拽功能
+                const addr = new URL(window.location.href);
+                const id = addr.searchParams.get('id');
                 // 设定中心点和地图级别
-                that.parkMap.centerAndZoom(new BMap.Point(106.651444, 29.48682), 15);
+                if (id == 1) {
+                    that.parkMap.centerAndZoom(new BMap.Point(106.651444, 29.45682), 14);
+                } else if (id == 2) {
+                    that.parkMap.centerAndZoom(new BMap.Point(106.76723874457288, 29.573276880811712), 14);
+                } else if (id == 3) {
+                    that.parkMap.centerAndZoom(new BMap.Point(106.69517131217539, 29.51577313312822), 15);
+                } else if (id == 4) {
+                    that.parkMap.centerAndZoom(new BMap.Point(106.559829995157, 29.501581648208534), 15);
+                } else if (id == 5) {
+                    that.parkMap.centerAndZoom(new BMap.Point(106.72194027111843, 29.513690776940248), 16);
+                } else if (id == 6) {
+                    that.parkMap.centerAndZoom(new BMap.Point(106.70580793222035, 29.514020426917684), 16);
+                } else {
+                    that.parkMap.centerAndZoom(new BMap.Point(106.651444, 29.48682), 14);
+                }
                 that.parkMap.setMapType(BMAP_SATELLITE_MAP);
                 if (!points) return;
                 let pointList = points.split('@');