大数据中心技术的工程数智化指挥中心
作者:互联网
指挥中心分为项目空间设计、智能化硬件建设和软件系统建设三部分内容,打造了集声、光、空调、语音、屏幕、人脸识别等多种物联网技术以及APP,语音等多场景多方式的控制方式的智慧场景,采用全球先进的桌面交互系统,稳定且炫酷的OLED全透明操作屏,提供视觉呈现方案。同时也采用“云桌面方式”为指挥中心提供更为便捷轻量级的系统操控体验,以指挥操控技术和信息技术为主导,工程全过程经营管理数据为核心,将企业经营与项目紧密结合,实现工程现场数据全面汇聚、管控预警指标全面见识、管控运营数据全面钻取、公司数字孪生全面构建。既可为企事业单位打造智慧建筑场景应用,又能为项目业主,施工单位提供集预警、应急处理、视频、会议于一体的工程管理应用指挥产品。
工程数智化指挥中心被评选为新型智慧城市建设示范项目。
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title data-i18n="resources.title_dataFlowService"></title>
<script type="text/javascript" include="widgets" src="../js/include-web.js"></script>
</head>
<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%;position: absolute;top: 0;">
<div id="map" style="margin:0 auto;width: 100%;height: 100%"></div>
<script type="text/javascript" include='mapv' src="../../dist/leaflet/include-leaflet.js"></script>
<script type="text/javascript">
var host = window.isLocal ? window.server : "https://iserver.supermap.io";
var wsHost = "wss:\//" + (window.isLocal ? document.location.hostname + ":8800" : "iclsvrws.supermap.io");
var map,
urlMap = host + "/iserver/services/map-china400/rest/maps/ChinaDark",
urlQuery = host + "/iserver/services/map-china400/rest/maps/China_4326",
urlDataFlow = wsHost + "/iserver/services/dataflowTest2/dataflow";
map = L.map('map', {
preferCanvas: true,
crs: L.CRS.EPSG3857,
center: [37, 108.42],
maxZoom: 18,
zoom: 5
});
L.supermap.tiledMapLayer(urlMap).addTo(map);
SuperMap.SecurityManager.registerToken(urlDataFlow, window.exampleToken);
var popup = L.popup({
offset: L.point(0, 0),
autoPan: true
});
//创建DataFlowLayer,创建DataFlowLayer订阅iServer dataflow服务并将结果加载到地图上
var dataFlowLayer = L.supermap.dataFlowLayer(urlDataFlow, {
render: 'mapv',
pointToLayer: function (geoJsonPoint, latlng) {
return L.marker(latlng, {
icon: L.icon({
iconUrl: '../img/taxi.png',
iconAnchor: [16, 16]
})
});
},
onEachFeature: function (feature, layer) {
popup.setLatLng(L.GeoJSON.coordsToLatLng(feature.geometry.coordinates))
.setContent(feature.properties.time);
if (!popup.isOpen()) {
popup.addTo(map);
}
},
});
dataFlowLayer.addTo(map);
//模拟实时数据 start
//查询expectCount个线数据,每两秒将expectCount个点通过dataFlowService广播给iSevrer的dataflow服务,模拟expectCount个小汽车的移动轨迹
//该测试数据有21331个数据
var expectCount = 10000;
query();
var timer, featureResult, dataFlowBroadcast;
function query() {
widgets.loader.showLoader();
var ids = [];
while (ids.length < expectCount) {
var n = Math.round(Math.random() * 21331);
if (ids.indexOf(n) === -1) {
ids.push(n);
}
}
var str = "(" + ids.join() + ")";
var param = new SuperMap.QueryBySQLParameters({
expectCount: expectCount,
queryParams: {
name: "County_Road_ln@China",
attributeFilter: "SMID in " + str,
}
});
L.supermap
.queryService(urlQuery)
.queryBySQL(param, function (serviceResult) {
featureResult = serviceResult;
dataFlowBroadcast = L.supermap.dataFlowService(urlDataFlow).initBroadcast();
dataFlowBroadcast.on('broadcastSocketConnected', function (e) {
widgets.loader.removeLoader();
broadcast();
timer = window.setInterval("broadcast()", 2000);
})
});
}
var count = 0;
function broadcast() {
var features = [];
for (var index = 0; index < featureResult.result.recordsets[0].features.features.length; index++) {
var geometry = featureResult.result.recordsets[0].features.features[index].geometry;
var point = geometry.coordinates[(count % geometry.coordinates.length)];
//处理多线
if (L.Util.isArray(point[0])) {
point = point[0];
}
var data = {
geometry: {
coordinates: [point[0], point[1]],
type: "Point"
},
type: "Feature",
properties: {
id: index + 1,
time: new Date()
}
};
features.push(data);
}
dataFlowBroadcast.broadcast(features);
count += 2;
}
//模拟实时数据 end
</script>
</body>
</html>
标签:function,map,数据中心,features,point,数智化,指挥,var,expectCount 来源: https://www.cnblogs.com/shengya/p/14971032.html