2016-11-22 16:21:56 +08:00
[
{
2018-10-06 23:47:09 +08:00
"id" : "efb1f72f.d56a98" ,
2016-11-22 16:21:56 +08:00
"type" : "worldmap" ,
2018-10-06 23:47:09 +08:00
"z" : "46213b15.1d9a74" ,
2016-11-22 16:21:56 +08:00
"name" : "" ,
"lat" : "" ,
"lon" : "" ,
"zoom" : "" ,
"layer" : "OSM" ,
"cluster" : "" ,
"maxage" : "" ,
"usermenu" : "hide" ,
"panit" : "true" ,
2018-10-06 23:47:09 +08:00
"x" : 505 ,
"y" : 195 ,
2016-11-22 16:21:56 +08:00
"wires" : [ ]
} ,
{
2018-10-06 23:47:09 +08:00
"id" : "208a3922.4fc106" ,
2016-11-22 16:21:56 +08:00
"type" : "inject" ,
2018-10-06 23:47:09 +08:00
"z" : "46213b15.1d9a74" ,
2016-11-22 16:21:56 +08:00
"name" : "" ,
"topic" : "" ,
"payload" : "" ,
"payloadType" : "str" ,
"repeat" : "" ,
"crontab" : "" ,
"once" : false ,
2018-10-06 23:47:09 +08:00
"onceDelay" : "" ,
"x" : 145 ,
"y" : 135 ,
2016-11-22 16:21:56 +08:00
"wires" : [
[
2018-10-06 23:47:09 +08:00
"59d2062e.e54db8"
2016-11-22 16:21:56 +08:00
]
]
} ,
{
2018-10-06 23:47:09 +08:00
"id" : "59d2062e.e54db8" ,
2016-11-22 16:21:56 +08:00
"type" : "function" ,
2018-10-06 23:47:09 +08:00
"z" : "46213b15.1d9a74" ,
2016-11-22 16:21:56 +08:00
"name" : "" ,
2018-10-06 23:47:09 +08:00
"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;" ,
2016-11-22 16:21:56 +08:00
"outputs" : 1 ,
"noerr" : 0 ,
2018-10-06 23:47:09 +08:00
"x" : 325 ,
"y" : 195 ,
2016-11-22 16:21:56 +08:00
"wires" : [
[
2018-10-06 23:47:09 +08:00
"efb1f72f.d56a98"
2016-11-22 16:21:56 +08:00
]
]
} ,
{
2018-10-06 23:47:09 +08:00
"id" : "c7fd20dd.46979" ,
2016-11-22 16:21:56 +08:00
"type" : "inject" ,
2018-10-06 23:47:09 +08:00
"z" : "46213b15.1d9a74" ,
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" : "" ,
2018-10-06 23:47:09 +08:00
"x" : 125 ,
"y" : 255 ,
2016-11-22 16:21:56 +08:00
"wires" : [
[
2018-10-06 23:47:09 +08:00
"f88c9738.621ee8"
2016-11-22 16:21:56 +08:00
]
]
} ,
{
2018-10-06 23:47:09 +08:00
"id" : "aa27dc72.3e70a" ,
2016-11-22 16:21:56 +08:00
"type" : "ui_template" ,
2018-10-06 23:47:09 +08:00
"z" : "46213b15.1d9a74" ,
"group" : "1c6852f7.95a1ed" ,
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" ,
2018-10-06 23:47:09 +08:00
"x" : 495 ,
"y" : 255 ,
2016-11-22 16:21:56 +08:00
"wires" : [
[ ]
]
} ,
{
2018-10-06 23:47:09 +08:00
"id" : "f88c9738.621ee8" ,
2016-11-22 16:21:56 +08:00
"type" : "template" ,
2018-10-06 23:47:09 +08:00
"z" : "46213b15.1d9a74" ,
2016-11-22 16:21:56 +08:00
"name" : "" ,
"field" : "payload" ,
"fieldType" : "msg" ,
"format" : "handlebars" ,
"syntax" : "mustache" ,
2018-10-06 23:47:09 +08:00
"template" : "<iframe src=\"../worldmap\" height=300px ></iframe>" ,
"x" : 325 ,
"y" : 255 ,
2016-11-22 16:21:56 +08:00
"wires" : [
[
2018-10-06 23:47:09 +08:00
"aa27dc72.3e70a"
2016-11-22 16:21:56 +08:00
]
]
} ,
{
2018-10-06 23:47:09 +08:00
"id" : "bdb72125.35aa9" ,
2016-11-22 16:21:56 +08:00
"type" : "ui_button" ,
2018-10-06 23:47:09 +08:00
"z" : "46213b15.1d9a74" ,
2016-11-22 16:21:56 +08:00
"name" : "" ,
2018-10-06 23:47:09 +08:00
"group" : "1c6852f7.95a1ed" ,
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-10-06 23:47:09 +08:00
"x" : 145 ,
"y" : 195 ,
2016-11-22 16:21:56 +08:00
"wires" : [
[
2018-10-06 23:47:09 +08:00
"59d2062e.e54db8"
2016-11-22 16:21:56 +08:00
]
]
} ,
{
2018-10-06 23:47:09 +08:00
"id" : "b9813d1d.028ac" ,
2016-11-22 16:21:56 +08:00
"type" : "comment" ,
2018-10-06 23:47:09 +08:00
"z" : "46213b15.1d9a74" ,
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-10-06 23:47:09 +08:00
"x" : 195 ,
"y" : 75 ,
2016-11-22 16:21:56 +08:00
"wires" : [ ]
} ,
{
2018-10-06 23:47:09 +08:00
"id" : "1c6852f7.95a1ed" ,
2016-11-22 16:21:56 +08:00
"type" : "ui_group" ,
2018-10-06 23:47:09 +08:00
"z" : "46213b15.1d9a74" ,
2016-11-22 16:21:56 +08:00
"name" : "Default" ,
2018-10-06 23:47:09 +08:00
"tab" : "e4c4803b.93d4" ,
2016-11-22 16:21:56 +08:00
"disp" : true ,
"width" : "6"
} ,
{
2018-10-06 23:47:09 +08:00
"id" : "e4c4803b.93d4" ,
2016-11-22 16:21:56 +08:00
"type" : "ui_tab" ,
2018-10-06 23:47:09 +08:00
"z" : "46213b15.1d9a74" ,
2016-11-22 16:21:56 +08:00
"name" : "Home" ,
"icon" : "dashboard"
}
]