node-red-contrib-jwht-map/examples/Map in Dashboard.json
Dave Conway-Jones 5f3812a368
Finally fix example path
to close PR #13
2018-10-06 16:47:09 +01:00

162 lines
4.1 KiB
JSON

[
{
"id": "efb1f72f.d56a98",
"type": "worldmap",
"z": "46213b15.1d9a74",
"name": "",
"lat": "",
"lon": "",
"zoom": "",
"layer": "OSM",
"cluster": "",
"maxage": "",
"usermenu": "hide",
"panit": "true",
"x": 505,
"y": 195,
"wires": []
},
{
"id": "208a3922.4fc106",
"type": "inject",
"z": "46213b15.1d9a74",
"name": "",
"topic": "",
"payload": "",
"payloadType": "str",
"repeat": "",
"crontab": "",
"once": false,
"onceDelay": "",
"x": 145,
"y": 135,
"wires": [
[
"59d2062e.e54db8"
]
]
},
{
"id": "59d2062e.e54db8",
"type": "function",
"z": "46213b15.1d9a74",
"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=\\\"../ui/#/0\\\">IBM link</a>\"};\nreturn msg;",
"outputs": 1,
"noerr": 0,
"x": 325,
"y": 195,
"wires": [
[
"efb1f72f.d56a98"
]
]
},
{
"id": "c7fd20dd.46979",
"type": "inject",
"z": "46213b15.1d9a74",
"name": "",
"topic": "",
"payload": "",
"payloadType": "str",
"repeat": "",
"crontab": "",
"once": true,
"onceDelay": "",
"x": 125,
"y": 255,
"wires": [
[
"f88c9738.621ee8"
]
]
},
{
"id": "aa27dc72.3e70a",
"type": "ui_template",
"z": "46213b15.1d9a74",
"group": "1c6852f7.95a1ed",
"name": "",
"order": 0,
"width": "6",
"height": "6",
"format": "<div ng-bind-html=\"msg.payload | trusted\"></div>",
"storeOutMessages": true,
"fwdInMessages": true,
"templateScope": "local",
"x": 495,
"y": 255,
"wires": [
[]
]
},
{
"id": "f88c9738.621ee8",
"type": "template",
"z": "46213b15.1d9a74",
"name": "",
"field": "payload",
"fieldType": "msg",
"format": "handlebars",
"syntax": "mustache",
"template": "<iframe src=\"../worldmap\" height=300px ></iframe>",
"x": 325,
"y": 255,
"wires": [
[
"aa27dc72.3e70a"
]
]
},
{
"id": "bdb72125.35aa9",
"type": "ui_button",
"z": "46213b15.1d9a74",
"name": "",
"group": "1c6852f7.95a1ed",
"order": 0,
"width": 0,
"height": 0,
"label": "Move Mike",
"color": "",
"icon": "fa-male",
"payload": "",
"payloadType": "str",
"topic": "",
"x": 145,
"y": 195,
"wires": [
[
"59d2062e.e54db8"
]
]
},
{
"id": "b9813d1d.028ac",
"type": "comment",
"z": "46213b15.1d9a74",
"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.",
"x": 195,
"y": 75,
"wires": []
},
{
"id": "1c6852f7.95a1ed",
"type": "ui_group",
"z": "46213b15.1d9a74",
"name": "Default",
"tab": "e4c4803b.93d4",
"disp": true,
"width": "6"
},
{
"id": "e4c4803b.93d4",
"type": "ui_tab",
"z": "46213b15.1d9a74",
"name": "Home",
"icon": "dashboard"
}
]