@ -1,8 +1,8 @@
[
{
"id" : " 104f9b89.5daf04 ",
"id" : " fa3d2b67.0d5078 ",
"type" : "worldmap" ,
"z" : " 5ab56e5e.449 a5",
"z" : " dfe4ec36.0a5 a5",
"name" : "" ,
"lat" : "" ,
"lon" : "" ,
@ -12,14 +12,14 @@
"maxage" : "" ,
"usermenu" : "hide" ,
"panit" : "true" ,
"x" : 49 0,
"y" : 28 0,
"x" : 77 0,
"y" : 11 20,
"wires" : [ ]
} ,
{
"id" : " 7892d55a.40864c ",
"id" : " 4d3000c1.a4c81 ",
"type" : "inject" ,
"z" : " 5ab56e5e.449 a5",
"z" : " dfe4ec36.0a5 a5",
"name" : "" ,
"topic" : "" ,
"payload" : "" ,
@ -27,54 +27,55 @@
"repeat" : "" ,
"crontab" : "" ,
"once" : false ,
"x" : 13 0,
"y" : 22 0,
"x" : 4 10,
"y" : 106 0,
"wires" : [
[
" 45dc04c5.811fcc "
" 31c1899.d3d0b76 "
]
]
} ,
{
"id" : " 45dc04c5.811fcc ",
"id" : " 31c1899.d3d0b76 ",
"type" : "function" ,
"z" : " 5ab56e5e.449 a5",
"z" : " dfe4ec36.0a5 a5",
"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 ,
"x" : 31 0,
"y" : 28 0,
"x" : 59 0,
"y" : 11 20,
"wires" : [
[
" 104f9b89.5daf04 "
" fa3d2b67.0d5078 "
]
]
} ,
{
"id" : " 39ae2a4d.5a6f06 ",
"id" : " 28f4bf19.04c6c ",
"type" : "inject" ,
"z" : " 5ab56e5e.449 a5",
"z" : " dfe4ec36.0a5 a5",
"name" : "" ,
"topic" : "" ,
"payload" : " /red/worldmap ",
"payload" : " ",
"payloadType" : "str" ,
"repeat" : "" ,
"crontab" : "" ,
"once" : true ,
"x" : 140 ,
"y" : 340 ,
"onceDelay" : "" ,
"x" : 390 ,
"y" : 1180 ,
"wires" : [
[
" a8660ccf.d7166 "
" dd8e0887.5b4888 "
]
]
} ,
{
"id" : " be72c0ae.5925b ",
"id" : " ce1dac49.66168 ",
"type" : "ui_template" ,
"z" : " 5ab56e5e.449 a5",
"group" : " c60f4e05.ebb48 ",
"z" : " dfe4ec36.0a5 a5",
"group" : " 88c32df0.a0af9 ",
"name" : "" ,
"order" : 0 ,
"width" : "6" ,
@ -82,36 +83,37 @@
"format" : "<div ng-bind-html=\"msg.payload | trusted\"></div>" ,
"storeOutMessages" : true ,
"fwdInMessages" : true ,
"x" : 480 ,
"y" : 340 ,
"templateScope" : "local" ,
"x" : 760 ,
"y" : 1180 ,
"wires" : [
[ ]
]
} ,
{
"id" : " a8660ccf.d7166 ",
"id" : " dd8e0887.5b4888 ",
"type" : "template" ,
"z" : " 5ab56e5e.449 a5",
"z" : " dfe4ec36.0a5 a5",
"name" : "" ,
"field" : "payload" ,
"fieldType" : "msg" ,
"format" : "handlebars" ,
"syntax" : "mustache" ,
"template" : "<iframe src= {{{payload}}} height=300px ></iframe>",
"x" : 31 0,
"y" : 34 0,
"template" : "<iframe src= \"/worldmap\" height=300px ></iframe>",
"x" : 59 0,
"y" : 118 0,
"wires" : [
[
" be72c0ae.5925b "
" ce1dac49.66168 "
]
]
} ,
{
"id" : " 79411e5e.1af57 ",
"id" : " ef0d9eba.478a5 ",
"type" : "ui_button" ,
"z" : " 5ab56e5e.449 a5",
"z" : " dfe4ec36.0a5 a5",
"name" : "" ,
"group" : " c60f4e05.ebb48 ",
"group" : " 88c32df0.a0af9 ",
"order" : 0 ,
"width" : 0 ,
"height" : 0 ,
@ -121,37 +123,37 @@
"payload" : "" ,
"payloadType" : "str" ,
"topic" : "" ,
"x" : 13 0,
"y" : 28 0,
"x" : 4 10,
"y" : 11 20,
"wires" : [
[
" 45dc04c5.811fcc "
" 31c1899.d3d0b76 "
]
]
} ,
{
"id" : " 235ad210.492b0e ",
"id" : " 72196d3b.8a5724 ",
"type" : "comment" ,
"z" : " 5ab56e5e.449 a5",
"z" : " dfe4ec36.0a5 a5",
"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" : 18 0,
"y" : 1 6 0,
"x" : 46 0,
"y" : 1 00 0,
"wires" : [ ]
} ,
{
"id" : " c60f4e05.ebb48 ",
"id" : " 88c32df0.a0af9 ",
"type" : "ui_group" ,
"z" : " 5ab56e5e.449 a5",
"z" : " dfe4ec36.0a5 a5",
"name" : "Default" ,
"tab" : " 6a3aec18.0bc474 ",
"tab" : " f58bb1b.fd6cc5 ",
"disp" : true ,
"width" : "6"
} ,
{
"id" : " 6a3aec18.0bc474 ",
"id" : " f58bb1b.fd6cc5 ",
"type" : "ui_tab" ,
"z" : " 5ab56e5e.449 a5",
"z" : " dfe4ec36.0a5 a5",
"name" : "Home" ,
"icon" : "dashboard"
}