node-red-contrib-jwht-map/examples/Map in Dashboard.json

178 lines
4.4 KiB
JSON
Raw Normal View History

2016-11-22 16:21:56 +08:00
[
{
2019-06-14 23:43:20 +08:00
"id": "9b2a29cc.3c53a8",
2016-11-22 16:21:56 +08:00
"type": "worldmap",
2019-06-14 23:43:20 +08:00
"z": "f59603d8.0a6a",
2016-11-22 16:21:56 +08:00
"name": "",
"lat": "",
"lon": "",
"zoom": "",
"layer": "OSM",
"cluster": "",
"maxage": "",
"usermenu": "hide",
"panit": "true",
2019-06-14 23:43:20 +08:00
"x": 750,
"y": 420,
2016-11-22 16:21:56 +08:00
"wires": []
},
{
2019-06-14 23:43:20 +08:00
"id": "1714967f.e691ea",
2016-11-22 16:21:56 +08:00
"type": "inject",
2019-06-14 23:43:20 +08:00
"z": "f59603d8.0a6a",
2016-11-22 16:21:56 +08:00
"name": "",
"topic": "",
"payload": "",
"payloadType": "str",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": "",
2019-06-14 23:43:20 +08:00
"x": 290,
"y": 360,
2016-11-22 16:21:56 +08:00
"wires": [
[
2019-06-14 23:43:20 +08:00
"1b24ad2f.198453"
2016-11-22 16:21:56 +08:00
]
]
},
{
2019-06-14 23:43:20 +08:00
"id": "1b24ad2f.198453",
2016-11-22 16:21:56 +08:00
"type": "function",
2019-06-14 23:43:20 +08:00
"z": "f59603d8.0a6a",
2016-11-22 16:21:56 +08:00
"name": "",
2019-06-14 23:43:20 +08:00
"func": "// create random position\nvar lat = 51 + Math.random() * 0.2;\nvar lon = -1.45 + Math.random() * 0.2;\nmsg.payload={\n lat:lat, \n lon:lon, \n name:\"Mike\", \n icon:\"male\", \n color:\"#000\"};\nreturn msg;",
2016-11-22 16:21:56 +08:00
"outputs": 1,
"noerr": 0,
2019-06-14 23:43:20 +08:00
"x": 470,
"y": 420,
2016-11-22 16:21:56 +08:00
"wires": [
[
2019-06-14 23:43:20 +08:00
"9b2a29cc.3c53a8",
"de5c4044.d4e0f"
2016-11-22 16:21:56 +08:00
]
]
},
{
2019-06-14 23:43:20 +08:00
"id": "5af27cae.299144",
2016-11-22 16:21:56 +08:00
"type": "inject",
2019-06-14 23:43:20 +08:00
"z": "f59603d8.0a6a",
2016-11-22 16:21:56 +08:00
"name": "",
"topic": "",
2018-09-11 09:03:52 +08:00
"payload": "",
2016-11-22 16:21:56 +08:00
"payloadType": "str",
"repeat": "",
"crontab": "",
"once": true,
2018-09-11 09:03:52 +08:00
"onceDelay": "",
2019-06-14 23:43:20 +08:00
"x": 270,
"y": 480,
2016-11-22 16:21:56 +08:00
"wires": [
[
2019-06-14 23:43:20 +08:00
"f1be23c1.dd096"
2016-11-22 16:21:56 +08:00
]
]
},
{
2019-06-14 23:43:20 +08:00
"id": "4bab3415.afdf9c",
2016-11-22 16:21:56 +08:00
"type": "ui_template",
2019-06-14 23:43:20 +08:00
"z": "f59603d8.0a6a",
"group": "cd81d08b.eebb3",
2016-11-22 16:21:56 +08:00
"name": "",
"order": 0,
"width": "6",
"height": "6",
"format": "<div ng-bind-html=\"msg.payload | trusted\"></div>",
"storeOutMessages": true,
"fwdInMessages": true,
2018-09-11 09:03:52 +08:00
"templateScope": "local",
2019-06-14 23:43:20 +08:00
"x": 640,
"y": 480,
2016-11-22 16:21:56 +08:00
"wires": [
[]
]
},
{
2019-06-14 23:43:20 +08:00
"id": "f1be23c1.dd096",
2016-11-22 16:21:56 +08:00
"type": "template",
2019-06-14 23:43:20 +08:00
"z": "f59603d8.0a6a",
2016-11-22 16:21:56 +08:00
"name": "",
"field": "payload",
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "<iframe src=\"../worldmap\" height=300px ></iframe>",
2019-06-14 23:43:20 +08:00
"x": 470,
"y": 480,
2016-11-22 16:21:56 +08:00
"wires": [
[
2019-06-14 23:43:20 +08:00
"4bab3415.afdf9c"
2016-11-22 16:21:56 +08:00
]
]
},
{
2019-06-14 23:43:20 +08:00
"id": "de3a90c8.8179c",
2016-11-22 16:21:56 +08:00
"type": "ui_button",
2019-06-14 23:43:20 +08:00
"z": "f59603d8.0a6a",
2016-11-22 16:21:56 +08:00
"name": "",
2019-06-14 23:43:20 +08:00
"group": "cd81d08b.eebb3",
2016-11-22 16:21:56 +08:00
"order": 0,
"width": 0,
"height": 0,
"label": "Move Mike",
"color": "",
"icon": "fa-male",
"payload": "",
"payloadType": "str",
"topic": "",
2019-06-14 23:43:20 +08:00
"x": 290,
"y": 420,
2016-11-22 16:21:56 +08:00
"wires": [
[
2019-06-14 23:43:20 +08:00
"1b24ad2f.198453"
2016-11-22 16:21:56 +08:00
]
]
},
{
2019-06-14 23:43:20 +08:00
"id": "223f301c.54ea9",
2016-11-22 16:21:56 +08:00
"type": "comment",
2019-06-14 23:43:20 +08:00
"z": "f59603d8.0a6a",
2016-11-22 16:21:56 +08:00
"name": "How to embed Map in Dashboard",
"info": "This example shows how to embed the Worldmap \ninto a template node within the `node-red-dashboard`\n\nThe first flow creates a dashboard button that \ngenerates a randon position, with the required \nicon, and passes that to the worldmap. The\nmap is configured to automatically pan to the\nposition of any point that arrives.\n\nThe second flow initialise the dashboard template\nwith the initial map and sets it to a more square shape\nby adjusting the height.",
2019-06-14 23:43:20 +08:00
"x": 340,
"y": 300,
2016-11-22 16:21:56 +08:00
"wires": []
},
{
2019-06-14 23:43:20 +08:00
"id": "de5c4044.d4e0f",
"type": "worldmap-tracks",
"z": "f59603d8.0a6a",
"name": "",
"depth": "5",
"layer": "combined",
"x": 610,
"y": 380,
"wires": [
[
"9b2a29cc.3c53a8"
]
]
},
{
"id": "cd81d08b.eebb3",
2016-11-22 16:21:56 +08:00
"type": "ui_group",
2019-06-14 23:43:20 +08:00
"z": "f59603d8.0a6a",
2016-11-22 16:21:56 +08:00
"name": "Default",
2019-06-14 23:43:20 +08:00
"tab": "b34078e6.e60df8",
2016-11-22 16:21:56 +08:00
"disp": true,
"width": "6"
},
{
2019-06-14 23:43:20 +08:00
"id": "b34078e6.e60df8",
2016-11-22 16:21:56 +08:00
"type": "ui_tab",
2019-06-14 23:43:20 +08:00
"z": "f59603d8.0a6a",
2016-11-22 16:21:56 +08:00
"name": "Home",
"icon": "dashboard"
}
]