[ { "id": "47cab25e915f5ebf", "type": "tab", "label": "Flow 2", "disabled": false, "info": "", "env": [] }, { "id": "90081a37f81f2840", "type": "ui_worldmap", "z": "47cab25e915f5ebf", "group": "fc4788c28f236f6b", "order": 1, "width": "12", "height": "6", "name": "", "lat": "45.67", "lon": "13.77", "zoom": "11", "layer": "OSMC", "cluster": "", "maxage": "", "usermenu": "hide", "layers": "hide", "panit": "false", "panlock": "false", "zoomlock": "false", "hiderightclick": "false", "coords": "deg", "showgrid": "false", "allowFileDrop": "false", "path": "/worldmap", "overlist": "DR,CO,RA,DN,HM", "maplist": "OSMG,OSMC,EsriC,EsriS,EsriT,EsriO,EsriDG,NatGeo,UKOS,OpTop,SW", "mapname": "", "mapurl": "", "mapopt": "", "mapwms": false, "x": 920, "y": 360, "wires": [] }, { "id": "21ec0d7c61435e7f", "type": "worldmap in", "z": "47cab25e915f5ebf", "name": "", "path": "/worldmap", "events": "connect,disconnect,point,bounds,files,draw,other", "x": 140, "y": 100, "wires": [ [ "e648eb350e057a60", "c331315549fb7d16" ] ] }, { "id": "829ac6b5e197324d", "type": "ui_button", "z": "47cab25e915f5ebf", "name": "", "group": "fc4788c28f236f6b", "order": 4, "width": "8", "height": "1", "passthru": false, "label": "Drag the map and then push me (only once on each page)", "tooltip": "", "color": "", "bgcolor": "", "className": "", "icon": "", "payload": "", "payloadType": "str", "topic": "topic", "topicType": "msg", "x": 310, "y": 240, "wires": [ [ "06749f431370d9dc" ] ] }, { "id": "e8a90bbc497319a7", "type": "ui_list", "z": "47cab25e915f5ebf", "group": "fc4788c28f236f6b", "name": "", "order": 7, "width": "12", "height": "2", "lineType": "two", "actionType": "click", "allowHTML": false, "outputs": 1, "topic": "", "x": 320, "y": 360, "wires": [ [ "158f6728a43acc6c" ] ] }, { "id": "bbaa6666f70ddc34", "type": "inject", "z": "47cab25e915f5ebf", "name": "", "props": [ { "p": "payload" } ], "repeat": "", "crontab": "", "once": true, "onceDelay": 0.1, "topic": "", "payload": "[{\"title\":\"Tracker A\",\"description\":\"Miramare Castle\",\"marker\":{\"name\":\"Tracker A\",\"lat\":45.7025,\"lon\":13.7125,\"popped\":true,\"layer\":\"tracker\"}},{\"title\":\"Tracker B\",\"description\":\"Riserva Naturale Val Rosandra / Naravni rezervat Dolina Glinščice\",\"marker\":{\"name\":\"Tracker B\",\"lat\":45.619,\"lon\":13.8796,\"popped\":true,\"layer\":\"tracker\"}}]", "payloadType": "json", "x": 150, "y": 360, "wires": [ [ "e8a90bbc497319a7" ] ] }, { "id": "06749f431370d9dc", "type": "function", "z": "47cab25e915f5ebf", "name": "map _sessionid <=> socketid (on flow context)", "func": "_sessionid = flow.get(\"last_sessionid\");\n\nflow.set(\"sock2session-\" + msg.socketid, _sessionid);\nflow.set(\"session2sock-\" + _sessionid, msg.socketid);\n\nmsg._sessionid = _sessionid;\n\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 740, "y": 240, "wires": [ [] ] }, { "id": "e648eb350e057a60", "type": "change", "z": "47cab25e915f5ebf", "name": "", "rules": [ { "t": "set", "p": "last_sessionid", "pt": "flow", "to": "_sessionid", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 480, "y": 160, "wires": [ [] ] }, { "id": "c331315549fb7d16", "type": "function", "z": "47cab25e915f5ebf", "name": "_sessionid => socketid", "func": "socketid = flow.get(\"session2sock-\" + msg._sessionid);\n\nif (typeof socketid == 'undefined' )\n socketid = \"unknown_socketid\";\n \nmsg.socketid = socketid;\n\nreturn msg;\n", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 480, "y": 100, "wires": [ [ "fb22f545b95fff8c", "02dc6de20f578be5" ] ] }, { "id": "158f6728a43acc6c", "type": "change", "z": "47cab25e915f5ebf", "name": "", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "payload.marker", "tot": "msg" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 480, "y": 360, "wires": [ [ "e3492139f8e32031" ] ] }, { "id": "fb22f545b95fff8c", "type": "trigger", "z": "47cab25e915f5ebf", "name": "", "op1": "true", "op2": "false", "op1type": "bool", "op2type": "bool", "duration": "500", "extend": false, "overrideDelay": false, "units": "ms", "reset": "", "bytopic": "all", "topic": "topic", "outputs": 1, "x": 740, "y": 100, "wires": [ [ "6edd8915e9adda59" ] ] }, { "id": "6edd8915e9adda59", "type": "ui_led", "z": "47cab25e915f5ebf", "order": 6, "group": "fc4788c28f236f6b", "width": "4", "height": "1", "label": "map event", "labelPlacement": "left", "labelAlignment": "center", "colorForValue": [ { "color": "#808080", "value": "false", "valueType": "bool" }, { "color": "#ff0000", "value": "true", "valueType": "bool" } ], "allowColorForValueInMessage": false, "shape": "circle", "showGlow": true, "name": "", "x": 890, "y": 100, "wires": [] }, { "id": "d892cc7063630962", "type": "ui_table", "z": "47cab25e915f5ebf", "group": "fc4788c28f236f6b", "name": "", "order": 9, "width": 0, "height": 0, "columns": [ { "field": "action", "title": "map action", "width": "", "align": "left", "formatter": "plaintext", "formatterParams": { "target": "_blank" } } ], "outputs": 0, "cts": false, "x": 890, "y": 160, "wires": [] }, { "id": "02dc6de20f578be5", "type": "change", "z": "47cab25e915f5ebf", "name": "", "rules": [ { "t": "set", "p": "payload", "pt": "msg", "to": "[\tpayload\t]", "tot": "jsonata" } ], "action": "", "property": "", "from": "", "to": "", "reg": false, "x": 740, "y": 160, "wires": [ [ "d892cc7063630962" ] ] }, { "id": "c1ebee4d04ed8bda", "type": "ui_button", "z": "47cab25e915f5ebf", "name": "", "group": "fc4788c28f236f6b", "order": 8, "width": "12", "height": "1", "passthru": false, "label": "clear", "tooltip": "", "color": "", "bgcolor": "", "className": "", "icon": "", "payload": "{\"command\":{\"clear\":\"tracker\"}}", "payloadType": "json", "topic": "topic", "topicType": "msg", "x": 450, "y": 300, "wires": [ [ "e3492139f8e32031" ] ] }, { "id": "e3492139f8e32031", "type": "function", "z": "47cab25e915f5ebf", "name": "socketid => _sessionid", "func": "_sessionid = flow.get(\"sock2session-\" + msg.socketid)\n\nif (typeof _sessionid == 'undefined' )\n _sessionid = \"unknown_sessionid\";\n\nmsg._sessionid = _sessionid\n\nreturn msg;", "outputs": 1, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 720, "y": 360, "wires": [ [ "90081a37f81f2840" ] ] }, { "id": "fc4788c28f236f6b", "type": "ui_group", "name": "Default", "tab": "14286bc05140701b", "order": 1, "disp": true, "width": "12", "collapse": false, "className": "" }, { "id": "14286bc05140701b", "type": "ui_tab", "name": "Home", "icon": "dashboard", "order": 1, "disabled": false, "hidden": false } ]