diff --git a/sec-beidou/src/main/resources/templates/page/device_overview.html b/sec-beidou/src/main/resources/templates/page/device_overview.html index 27f29308..a0683be6 100644 --- a/sec-beidou/src/main/resources/templates/page/device_overview.html +++ b/sec-beidou/src/main/resources/templates/page/device_overview.html @@ -33,7 +33,7 @@
-
+
设备数量
@@ -49,7 +49,7 @@
-
+
告警统计
@@ -80,8 +80,10 @@ function initialize() { var map = new BMapGL.Map("map-container"); // 创建Map实例 var point = new BMapGL.Point(116.404, 39.915); - map.centerAndZoom(point, 6); + map.centerAndZoom(point, 7); map.enableScrollWheelZoom(true); + var centerLat = 0; + var centerLon = 0; var deviceList= [ [# th:each="device : ${deviceList}"] @@ -91,12 +93,15 @@ [/] ]; //console.log(deviceList); - /*var i=0; - for(; i0) { + centerLat = centerLat/deviceList.length; + centerLon = centerLon/deviceList.length; + map.setCenter(new BMapGL.Point(centerLon,centerLat)); } - if(i>0) map.setCenter(point);*/ translateCallback = function (data){ if(data.status === 0) { @@ -104,7 +109,6 @@ for(; i0) map.setCenter(data.points[i-1]); } }