From d5cde819098ef132dfc4cc480b928d00ffe20c48 Mon Sep 17 00:00:00 2001 From: Georg Date: Thu, 17 Oct 2024 09:55:48 +0200 Subject: [PATCH] fix: remove VSimRTI from WebVisualizer (#426) --- fed/mosaic-output/src/main/resources/web/visualizer-dev.js | 4 ++-- fed/mosaic-output/src/main/resources/web/visualizer.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fed/mosaic-output/src/main/resources/web/visualizer-dev.js b/fed/mosaic-output/src/main/resources/web/visualizer-dev.js index ffa46e83..af77e813 100644 --- a/fed/mosaic-output/src/main/resources/web/visualizer-dev.js +++ b/fed/mosaic-output/src/main/resources/web/visualizer-dev.js @@ -548,7 +548,7 @@ const WebSocketClient = (function() { } /** - * Connection establishment to VSimRTI + * Connection establishment to MOSAIC */ function createWebSocket() { if (websocketEstablishedConnection) { @@ -577,7 +577,7 @@ const WebSocketClient = (function() { }, 3000) } else { setStatus('error') - alert("ERROR: Stopped trying to connect to VSimRTI due to timeout.") + alert("ERROR: Stopped trying to connect to MOSAIC due to timeout.") } } diff --git a/fed/mosaic-output/src/main/resources/web/visualizer.js b/fed/mosaic-output/src/main/resources/web/visualizer.js index c16d3336..2c3029fc 100644 --- a/fed/mosaic-output/src/main/resources/web/visualizer.js +++ b/fed/mosaic-output/src/main/resources/web/visualizer.js @@ -890,6 +890,6 @@ "use strict";module.exports=rbush,module.exports.default=rbush;var quickselect=require("quickselect");function rbush(t,i){if(!(this instanceof rbush))return new rbush(t,i);this._maxEntries=Math.max(4,t||9),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),i&&this._initFormat(i),this.clear()}function findItem(t,i,n){if(!n)return i.indexOf(t);for(var e=0;e=t.minX&&i.maxY>=t.minY}function createNode(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function multiSelect(t,i,n,e,r){for(var a,h=[i,n];h.length;)(n=h.pop())-(i=h.pop())<=e||(a=i+Math.ceil((n-i)/e/2)*e,quickselect(t,a,i,n,r),h.push(i,a,a,n))}rbush.prototype={all:function(){return this._all(this.data,[])},search:function(t){var i=this.data,n=[],e=this.toBBox;if(!intersects(t,i))return n;for(var r,a,h,o,s=[];i;){for(r=0,a=i.children.length;r=0&&a[i].children.length>this._maxEntries;)this._split(a,i),i--;this._adjustParentBBoxes(r,a,i)},_split:function(t,i){var n=t[i],e=n.children.length,r=this._minEntries;this._chooseSplitAxis(n,r,e);var a=this._chooseSplitIndex(n,r,e),h=createNode(n.children.splice(a,n.children.length-a));h.height=n.height,h.leaf=n.leaf,calcBBox(n,this.toBBox),calcBBox(h,this.toBBox),i?t[i-1].children.push(h):this._splitRoot(n,h)},_splitRoot:function(t,i){this.data=createNode([t,i]),this.data.height=t.height+1,this.data.leaf=!1,calcBBox(this.data,this.toBBox)},_chooseSplitIndex:function(t,i,n){var e,r,a,h,o,s,c,l;for(s=c=1/0,e=i;e<=n-i;e++)h=intersectionArea(r=distBBox(t,0,e,this.toBBox),a=distBBox(t,e,n,this.toBBox)),o=bboxArea(r)+bboxArea(a),h=i;r--)a=t.children[r],extend(s,t.leaf?h(a):a),c+=bboxMargin(s);return c},_adjustParentBBoxes:function(t,i,n){for(var e=n;e>=0;e--)extend(i[e],t)},_condense:function(t){for(var i,n=t.length-1;n>=0;n--)0===t[n].children.length?n>0?(i=t[n-1].children).splice(i.indexOf(t[n]),1):this.clear():calcBBox(t[n],this.toBBox)},_initFormat:function(t){var i=["return a"," - b",";"];this.compareMinX=new Function("a","b",i.join(t[0])),this.compareMinY=new Function("a","b",i.join(t[1])),this.toBBox=new Function("a","return {minX: a"+t[0]+", minY: a"+t[1]+", maxX: a"+t[2]+", maxY: a"+t[3]+"};")}}; },{"quickselect":296}],298:[function(require,module,exports){ -"use strict";var _ol=require("ol"),_layer=require("ol/layer"),_source=require("ol/source"),_Vector=_interopRequireDefault(require("ol/layer/Vector")),_Vector2=_interopRequireDefault(require("ol/source/Vector")),_Point=_interopRequireDefault(require("ol/geom/Point")),_proj=require("ol/proj"),_style=require("ol/style");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _createForOfIteratorHelper(e,t){var i;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(i=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,o=!1;return{s:function(){i=e[Symbol.iterator]()},n:function(){var e=i.next();return s=e.done,e},e:function(e){o=!0,a=e},f:function(){try{s||null==i.return||i.return()}finally{if(o)throw a}}}}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i500&&(this.state.sending=!1,this.state.receiving=!1)},createStyle:function(){var e="roadside-unit";return this.state.equipped&&(e="roadside-unit-equipped"),this.state.sending&&(e="roadside-unit-sending"),this.state.receiving&&(e="roadside-unit-receiving"),new _style.Style({image:new _style.Icon({anchor:[.5,1],src:"markers/".concat(e,".png")})})}},Vehicle={name:"unnamed_vehicle",latitude:0,longitude:0,marker:null,timeStateChange:0,vehicleClass:null,state:{},init:function(e,t){this.name=e,this.marker=new _ol.Feature({type:"vehicle",geometry:void 0}),this.marker.setProperties(["name","unit"]),this.marker.set("name",e),this.marker.set("unit",this),this.vehicleClass=t,this.state={equipped:!1,sending:!1,receiving:!1,parking:!1,charging:!1}},getMarker:function(){return this.marker},setIsEquipped:function(e){this.state.equipped=e},setLocation:function(e,t){this.latitude=e,this.longitude=t},setState:function(e){void 0!==this.state[e]&&(this.state[e]=!0,this.timeStateChange=Date.now())},updateView:function(){void 0!==this.latitude&&void 0!==this.longitude&&this.marker.setGeometry(new _Point.default((0,_proj.fromLonLat)([this.longitude,this.latitude])));var e=this.createStyle();this.marker.setStyle(e),Date.now()-this.timeStateChange>500&&(this.state.sending=!1,this.state.receiving=!1)},createStyle:function(){var e="unknown";return"Car"===this.vehicleClass||"ElectricVehicle"===this.vehicleClass||"AutomatedVehicle"===this.vehicleClass||"Taxi"===this.vehicleClass||"HighOccupancyVehicle"===this.vehicleClass?(e="car",this.state.equipped&&(e="car-equipped"),this.state.parking&&(e="car-parking"),this.state.charging&&(e="car-charging"),this.state.sending&&(e="car-sending"),this.state.receiving&&(e="car-receiving")):"PublicTransportVehicle"===this.vehicleClass?(e="bus",this.state.equipped&&(e="bus-equipped"),this.state.sending&&(e="bus-sending"),this.state.receiving&&(e="bus-receiving")):"Bicycle"===this.vehicleClass&&(e="bicycle",this.state.equipped&&(e="bicycle-equipped"),this.state.sending&&(e="bicycle-sending"),this.state.receiving&&(e="bicycle-receiving")),new _style.Style({image:new _style.Icon({anchor:[.5,1],src:"markers/".concat(e,".png")})})}},TrafficLight={name:"unnamed_traffic_light",latitude:0,longitude:0,marker:null,timeStateChange:0,state:{},init:function(e,t,i){this.name=e,this.latitude=t,this.longitude=i,this.marker=new _ol.Feature({type:"trafficLight",geometry:new _Point.default((0,_proj.fromLonLat)([i,t]))}),this.marker.setProperties(["name"]),this.marker.set("name",e),this.state={sending:!1,receiving:!1}},getMarker:function(){return this.marker},setIsEquipped:function(e){this.state.equipped=e},setLocation:function(e,t){this.latitude=e,this.longitude=t},setState:function(e){void 0!==this.state[e]&&(this.state[e]=!0,this.timeStateChange=Date.now())},updateView:function(){this.marker.setGeometry(new _Point.default((0,_proj.fromLonLat)([this.longitude,this.latitude])));var e=this.createStyle();this.marker.setStyle(e),Date.now()-this.timeStateChange>500&&(this.state.sending=!1,this.state.receiving=!1)},createStyle:function(){var e="traffic-light";return this.state.equipped&&(e="traffic-light-equipped"),this.state.sending&&(e="traffic-light-sending"),this.state.receiving&&(e="traffic-light-receiving"),new _style.Style({image:new _style.Icon({anchor:[.5,1],src:"markers/".concat(e,".png")})})}},map=function(){var e=new Boolean(!1),t={},i={},n={},r=new _Vector.default({source:new _Vector2.default({features:[],attributions:['']})}),a=new _ol.Map({target:"map",loadTilesWhileAnimating:!0,layers:[new _layer.Tile({source:new _source.OSM}),r],view:new _ol.View({center:(0,_proj.fromLonLat)([window.centerLocation.longitude,window.centerLocation.latitude]),zoom:window.zoomLevel})});function s(e){r.getSource().addFeature(e)}return{setUnitState:function(e,r){t[e]?t[e].setState(r):i[e]?i[e].setState(r):n[e]&&n[e].setState(r)},setVehiclePosition:function(i,n,r){t[i]?t[i].setLocation(n,r):console.error("Try to set location for non-existing vehicle",i),0==e&&(a.getView().setCenter((0,_proj.fromLonLat)([r,n])),a.getView().setZoom(18),e=!0)},addVehicle:function(e,i,n){t[e]||(t[e]=Object.assign({},Vehicle),t[e].init(e,i),t[e].setIsEquipped(n),s(t[e].getMarker()))},addRsu:function(e,t,n,r){i[e]||(i[e]=Object.assign({},Rsu),i[e].init(e,t,n),i[e].setIsEquipped(r),s(i[e].getMarker()))},addTrafficLight:function(e,t,i,r){n[e]||(n[e]=Object.assign({},TrafficLight),n[e].init(e,t,i),n[e].setIsEquipped(r),s(n[e].getMarker()))},updateViews:function(e){var r,a=_createForOfIteratorHelper(e);try{for(a.s();!(r=a.n()).done;){var s=r.value;t[s]?t[s].updateView():i[s]?i[s].updateView():n[s]&&n[s].updateView()}}catch(e){a.e(e)}finally{a.f()}},removeUnit:function(e){var a;t[e]?(a=t[e].getMarker(),r.getSource().removeFeature(a),delete t[e]):i[e]?(a=i[e].getMarker(),r.getSource().removeFeature(a),delete i[e]):n[e]&&(a=n[e].getMarker(),r.getSource().removeFeature(a),delete n[e])},removeAllUnits:function(){t={},i={},r.getSource().clear()}}}(),WebSocketClient=function(){var e,t=!1,i=0,n=30,r=!1,a=$("#status");function s(e){a.removeClass(),a.addClass(e),a.children("#tries").text(i+"/"+n)}function o(){t||(r?s("closed"):(r=!1,i++,s("connecting"),(e=new WebSocket("ws://localhost:"+window.port)).onopen=c,e.onmessage=u,e.onclose=l,i<=n?setTimeout(function(){t||o()},3e3):(s("error"),alert("ERROR: Stopped trying to connect to VSimRTI due to timeout."))))}function c(){s("connected"),t=!0,setInterval(function(){t&&e.send("pull")},window.updateInterval)}function u(e){t=!0,r=!0;var i=JSON.parse(e.data);if(null!=i){var n,a=[];if(i.VehicleUpdates)i.VehicleUpdates.updated&&i.VehicleUpdates.updated.forEach(function(e){map.setVehiclePosition(e.name,e.position.latitude,e.position.longitude),a.push(e.name)});else if(i.VehiclesRemove)i.VehiclesRemove.forEach(map.removeUnit);else if(i.VehicleRegistration){console.log(JSON.stringify(i.VehicleRegistration));var s=i.VehicleRegistration.vehicleMapping.applications.length>0,o=i.VehicleRegistration.vehicleMapping.vehicleType.vehicleClass;map.addVehicle(i.VehicleRegistration.vehicleMapping.name,o,s)}else if(i.V2xMessageTransmission)n=i.V2xMessageTransmission.message.routing.source.sourceName,map.setUnitState(n,"sending"),a.push(n);else if(i.V2xMessageReception)n=i.V2xMessageReception.receiverName,map.setUnitState(n,"receiving"),a.push(n);else if(i.RsuRegistration){n=i.RsuRegistration.rsuMapping.name;var c=i.RsuRegistration.rsuMapping.position,u=i.RsuRegistration.rsuMapping.applications.length>0;map.addRsu(n,c.latitude,c.longitude,u),a.push(n)}else if(i.TrafficLightRegistration){n=i.TrafficLightRegistration.trafficLightMapping.name;var l=i.TrafficLightRegistration.trafficLightMapping.position,h=i.TrafficLightRegistration.trafficLightMapping.applications.length>0;h&&(map.addTrafficLight(n,l.latitude,l.longitude,h),a.push(n))}map.updateViews(a)}}function l(){t&&(t=!1,map.removeAllUnits(),s("closed"))}return{initialize:function(){if(!("WebSocket"in window)){var e="Sorry, your Browser does not support WebSocket";throw alert(e),new Error(e)}a.children("button#reconnect").on("click",function(){r=!1,t=!1,i=0,o()}),o()}}}();$(function(){WebSocketClient.initialize()}); +"use strict";var _ol=require("ol"),_layer=require("ol/layer"),_source=require("ol/source"),_Vector=_interopRequireDefault(require("ol/layer/Vector")),_Vector2=_interopRequireDefault(require("ol/source/Vector")),_Point=_interopRequireDefault(require("ol/geom/Point")),_proj=require("ol/proj"),_style=require("ol/style");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _createForOfIteratorHelper(e,t){var i;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(i=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var n=0,r=function(){};return{s:r,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,o=!1;return{s:function(){i=e[Symbol.iterator]()},n:function(){var e=i.next();return s=e.done,e},e:function(e){o=!0,a=e},f:function(){try{s||null==i.return||i.return()}finally{if(o)throw a}}}}function _unsupportedIterableToArray(e,t){if(e){if("string"==typeof e)return _arrayLikeToArray(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?_arrayLikeToArray(e,t):void 0}}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i500&&(this.state.sending=!1,this.state.receiving=!1)},createStyle:function(){var e="roadside-unit";return this.state.equipped&&(e="roadside-unit-equipped"),this.state.sending&&(e="roadside-unit-sending"),this.state.receiving&&(e="roadside-unit-receiving"),new _style.Style({image:new _style.Icon({anchor:[.5,1],src:"markers/".concat(e,".png")})})}},Vehicle={name:"unnamed_vehicle",latitude:0,longitude:0,marker:null,timeStateChange:0,vehicleClass:null,state:{},init:function(e,t){this.name=e,this.marker=new _ol.Feature({type:"vehicle",geometry:void 0}),this.marker.setProperties(["name","unit"]),this.marker.set("name",e),this.marker.set("unit",this),this.vehicleClass=t,this.state={equipped:!1,sending:!1,receiving:!1,parking:!1,charging:!1}},getMarker:function(){return this.marker},setIsEquipped:function(e){this.state.equipped=e},setLocation:function(e,t){this.latitude=e,this.longitude=t},setState:function(e){void 0!==this.state[e]&&(this.state[e]=!0,this.timeStateChange=Date.now())},updateView:function(){void 0!==this.latitude&&void 0!==this.longitude&&this.marker.setGeometry(new _Point.default((0,_proj.fromLonLat)([this.longitude,this.latitude])));var e=this.createStyle();this.marker.setStyle(e),Date.now()-this.timeStateChange>500&&(this.state.sending=!1,this.state.receiving=!1)},createStyle:function(){var e="unknown";return"Car"===this.vehicleClass||"ElectricVehicle"===this.vehicleClass||"AutomatedVehicle"===this.vehicleClass||"Taxi"===this.vehicleClass||"HighOccupancyVehicle"===this.vehicleClass?(e="car",this.state.equipped&&(e="car-equipped"),this.state.parking&&(e="car-parking"),this.state.charging&&(e="car-charging"),this.state.sending&&(e="car-sending"),this.state.receiving&&(e="car-receiving")):"PublicTransportVehicle"===this.vehicleClass?(e="bus",this.state.equipped&&(e="bus-equipped"),this.state.sending&&(e="bus-sending"),this.state.receiving&&(e="bus-receiving")):"Bicycle"===this.vehicleClass&&(e="bicycle",this.state.equipped&&(e="bicycle-equipped"),this.state.sending&&(e="bicycle-sending"),this.state.receiving&&(e="bicycle-receiving")),new _style.Style({image:new _style.Icon({anchor:[.5,1],src:"markers/".concat(e,".png")})})}},TrafficLight={name:"unnamed_traffic_light",latitude:0,longitude:0,marker:null,timeStateChange:0,state:{},init:function(e,t,i){this.name=e,this.latitude=t,this.longitude=i,this.marker=new _ol.Feature({type:"trafficLight",geometry:new _Point.default((0,_proj.fromLonLat)([i,t]))}),this.marker.setProperties(["name"]),this.marker.set("name",e),this.state={sending:!1,receiving:!1}},getMarker:function(){return this.marker},setIsEquipped:function(e){this.state.equipped=e},setLocation:function(e,t){this.latitude=e,this.longitude=t},setState:function(e){void 0!==this.state[e]&&(this.state[e]=!0,this.timeStateChange=Date.now())},updateView:function(){this.marker.setGeometry(new _Point.default((0,_proj.fromLonLat)([this.longitude,this.latitude])));var e=this.createStyle();this.marker.setStyle(e),Date.now()-this.timeStateChange>500&&(this.state.sending=!1,this.state.receiving=!1)},createStyle:function(){var e="traffic-light";return this.state.equipped&&(e="traffic-light-equipped"),this.state.sending&&(e="traffic-light-sending"),this.state.receiving&&(e="traffic-light-receiving"),new _style.Style({image:new _style.Icon({anchor:[.5,1],src:"markers/".concat(e,".png")})})}},map=function(){var e=new Boolean(!1),t={},i={},n={},r=new _Vector.default({source:new _Vector2.default({features:[],attributions:['']})}),a=new _ol.Map({target:"map",loadTilesWhileAnimating:!0,layers:[new _layer.Tile({source:new _source.OSM}),r],view:new _ol.View({center:(0,_proj.fromLonLat)([window.centerLocation.longitude,window.centerLocation.latitude]),zoom:window.zoomLevel})});function s(e){r.getSource().addFeature(e)}return{setUnitState:function(e,r){t[e]?t[e].setState(r):i[e]?i[e].setState(r):n[e]&&n[e].setState(r)},setVehiclePosition:function(i,n,r){t[i]?t[i].setLocation(n,r):console.error("Try to set location for non-existing vehicle",i),0==e&&(a.getView().setCenter((0,_proj.fromLonLat)([r,n])),a.getView().setZoom(18),e=!0)},addVehicle:function(e,i,n){t[e]||(t[e]=Object.assign({},Vehicle),t[e].init(e,i),t[e].setIsEquipped(n),s(t[e].getMarker()))},addRsu:function(e,t,n,r){i[e]||(i[e]=Object.assign({},Rsu),i[e].init(e,t,n),i[e].setIsEquipped(r),s(i[e].getMarker()))},addTrafficLight:function(e,t,i,r){n[e]||(n[e]=Object.assign({},TrafficLight),n[e].init(e,t,i),n[e].setIsEquipped(r),s(n[e].getMarker()))},updateViews:function(e){var r,a=_createForOfIteratorHelper(e);try{for(a.s();!(r=a.n()).done;){var s=r.value;t[s]?t[s].updateView():i[s]?i[s].updateView():n[s]&&n[s].updateView()}}catch(e){a.e(e)}finally{a.f()}},removeUnit:function(e){var a;t[e]?(a=t[e].getMarker(),r.getSource().removeFeature(a),delete t[e]):i[e]?(a=i[e].getMarker(),r.getSource().removeFeature(a),delete i[e]):n[e]&&(a=n[e].getMarker(),r.getSource().removeFeature(a),delete n[e])},removeAllUnits:function(){t={},i={},r.getSource().clear()}}}(),WebSocketClient=function(){var e,t=!1,i=0,n=30,r=!1,a=$("#status");function s(e){a.removeClass(),a.addClass(e),a.children("#tries").text(i+"/"+n)}function o(){t||(r?s("closed"):(r=!1,i++,s("connecting"),(e=new WebSocket("ws://localhost:"+window.port)).onopen=c,e.onmessage=u,e.onclose=l,i<=n?setTimeout(function(){t||o()},3e3):(s("error"),alert("ERROR: Stopped trying to connect to MOSAIC due to timeout."))))}function c(){s("connected"),t=!0,setInterval(function(){t&&e.send("pull")},window.updateInterval)}function u(e){t=!0,r=!0;var i=JSON.parse(e.data);if(null!=i){var n,a=[];if(i.VehicleUpdates)i.VehicleUpdates.updated&&i.VehicleUpdates.updated.forEach(function(e){map.setVehiclePosition(e.name,e.position.latitude,e.position.longitude),a.push(e.name)});else if(i.VehiclesRemove)i.VehiclesRemove.forEach(map.removeUnit);else if(i.VehicleRegistration){console.log(JSON.stringify(i.VehicleRegistration));var s=i.VehicleRegistration.vehicleMapping.applications.length>0,o=i.VehicleRegistration.vehicleMapping.vehicleType.vehicleClass;map.addVehicle(i.VehicleRegistration.vehicleMapping.name,o,s)}else if(i.V2xMessageTransmission)n=i.V2xMessageTransmission.message.routing.source.sourceName,map.setUnitState(n,"sending"),a.push(n);else if(i.V2xMessageReception)n=i.V2xMessageReception.receiverName,map.setUnitState(n,"receiving"),a.push(n);else if(i.RsuRegistration){n=i.RsuRegistration.rsuMapping.name;var c=i.RsuRegistration.rsuMapping.position,u=i.RsuRegistration.rsuMapping.applications.length>0;map.addRsu(n,c.latitude,c.longitude,u),a.push(n)}else if(i.TrafficLightRegistration){n=i.TrafficLightRegistration.trafficLightMapping.name;var l=i.TrafficLightRegistration.trafficLightMapping.position,h=i.TrafficLightRegistration.trafficLightMapping.applications.length>0;h&&(map.addTrafficLight(n,l.latitude,l.longitude,h),a.push(n))}map.updateViews(a)}}function l(){t&&(t=!1,map.removeAllUnits(),s("closed"))}return{initialize:function(){if(!("WebSocket"in window)){var e="Sorry, your Browser does not support WebSocket";throw alert(e),new Error(e)}a.children("button#reconnect").on("click",function(){r=!1,t=!1,i=0,o()}),o()}}}();$(function(){WebSocketClient.initialize()}); },{"ol":105,"ol/geom/Point":82,"ol/layer":128,"ol/layer/Vector":137,"ol/proj":153,"ol/source":221,"ol/source/Vector":245,"ol/style":260}]},{},[298]);