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

161 lines
4.1 KiB
JSON
Raw Normal View History

2016-11-22 16:21:56 +08:00
[
{
2018-09-11 09:03:52 +08:00
"id": "fa3d2b67.0d5078",
2016-11-22 16:21:56 +08:00
"type": "worldmap",
2018-09-11 09:03:52 +08:00
"z": "dfe4ec36.0a5a5",
2016-11-22 16:21:56 +08:00
"name": "",
"lat": "",
"lon": "",
"zoom": "",
"layer": "OSM",
"cluster": "",
"maxage": "",
"usermenu": "hide",
"panit": "true",
2018-09-11 09:03:52 +08:00
"x": 770,
"y": 1120,
2016-11-22 16:21:56 +08:00
"wires": []
},
{
2018-09-11 09:03:52 +08:00
"id": "4d3000c1.a4c81",
2016-11-22 16:21:56 +08:00
"type": "inject",
2018-09-11 09:03:52 +08:00
"z": "dfe4ec36.0a5a5",
2016-11-22 16:21:56 +08:00
"name": "",
"topic": "",
"payload": "",
"payloadType": "str",
"repeat": "",
"crontab": "",
"once": false,
2018-09-11 09:03:52 +08:00
"x": 410,
"y": 1060,
2016-11-22 16:21:56 +08:00
"wires": [
[
2018-09-11 09:03:52 +08:00
"31c1899.d3d0b76"
2016-11-22 16:21:56 +08:00
]
]
},
{
2018-09-11 09:03:52 +08:00
"id": "31c1899.d3d0b76",
2016-11-22 16:21:56 +08:00
"type": "function",
2018-09-11 09:03:52 +08:00
"z": "dfe4ec36.0a5a5",
2016-11-22 16:21:56 +08:00
"name": "",
"func": "// create random position\nvar lat = 51 + Math.random() * 0.2;\nvar lon = -1.45 + Math.random() * 0.2;\nmsg.payload={lat:lat, lon:lon, name:\"Mike\", icon:\"male\", url:\"<a href=\\\"/red/ui/#/0\\\">IBM link</a>\"};\nreturn msg;",
"outputs": 1,
"noerr": 0,
2018-09-11 09:03:52 +08:00
"x": 590,
"y": 1120,
2016-11-22 16:21:56 +08:00
"wires": [
[
2018-09-11 09:03:52 +08:00
"fa3d2b67.0d5078"
2016-11-22 16:21:56 +08:00
]
]
},
{
2018-09-11 09:03:52 +08:00
"id": "28f4bf19.04c6c",
2016-11-22 16:21:56 +08:00
"type": "inject",
2018-09-11 09:03:52 +08:00
"z": "dfe4ec36.0a5a5",
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": "",
"x": 390,
"y": 1180,
2016-11-22 16:21:56 +08:00
"wires": [
[
2018-09-11 09:03:52 +08:00
"dd8e0887.5b4888"
2016-11-22 16:21:56 +08:00
]
]
},
{
2018-09-11 09:03:52 +08:00
"id": "ce1dac49.66168",
2016-11-22 16:21:56 +08:00
"type": "ui_template",
2018-09-11 09:03:52 +08:00
"z": "dfe4ec36.0a5a5",
"group": "88c32df0.a0af9",
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",
"x": 760,
"y": 1180,
2016-11-22 16:21:56 +08:00
"wires": [
[]
]
},
{
2018-09-11 09:03:52 +08:00
"id": "dd8e0887.5b4888",
2016-11-22 16:21:56 +08:00
"type": "template",
2018-09-11 09:03:52 +08:00
"z": "dfe4ec36.0a5a5",
2016-11-22 16:21:56 +08:00
"name": "",
"field": "payload",
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
2018-09-11 09:03:52 +08:00
"template": "<iframe src=\"/worldmap\" height=300px ></iframe>",
"x": 590,
"y": 1180,
2016-11-22 16:21:56 +08:00
"wires": [
[
2018-09-11 09:03:52 +08:00
"ce1dac49.66168"
2016-11-22 16:21:56 +08:00
]
]
},
{
2018-09-11 09:03:52 +08:00
"id": "ef0d9eba.478a5",
2016-11-22 16:21:56 +08:00
"type": "ui_button",
2018-09-11 09:03:52 +08:00
"z": "dfe4ec36.0a5a5",
2016-11-22 16:21:56 +08:00
"name": "",
2018-09-11 09:03:52 +08:00
"group": "88c32df0.a0af9",
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": "",
2018-09-11 09:03:52 +08:00
"x": 410,
"y": 1120,
2016-11-22 16:21:56 +08:00
"wires": [
[
2018-09-11 09:03:52 +08:00
"31c1899.d3d0b76"
2016-11-22 16:21:56 +08:00
]
]
},
{
2018-09-11 09:03:52 +08:00
"id": "72196d3b.8a5724",
2016-11-22 16:21:56 +08:00
"type": "comment",
2018-09-11 09:03:52 +08:00
"z": "dfe4ec36.0a5a5",
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.",
2018-09-11 09:03:52 +08:00
"x": 460,
"y": 1000,
2016-11-22 16:21:56 +08:00
"wires": []
},
{
2018-09-11 09:03:52 +08:00
"id": "88c32df0.a0af9",
2016-11-22 16:21:56 +08:00
"type": "ui_group",
2018-09-11 09:03:52 +08:00
"z": "dfe4ec36.0a5a5",
2016-11-22 16:21:56 +08:00
"name": "Default",
2018-09-11 09:03:52 +08:00
"tab": "f58bb1b.fd6cc5",
2016-11-22 16:21:56 +08:00
"disp": true,
"width": "6"
},
{
2018-09-11 09:03:52 +08:00
"id": "f58bb1b.fd6cc5",
2016-11-22 16:21:56 +08:00
"type": "ui_tab",
2018-09-11 09:03:52 +08:00
"z": "dfe4ec36.0a5a5",
2016-11-22 16:21:56 +08:00
"name": "Home",
"icon": "dashboard"
}
]