[ { "id": "fa3d2b67.0d5078", "type": "worldmap", "z": "dfe4ec36.0a5a5", "name": "", "lat": "", "lon": "", "zoom": "", "layer": "OSM", "cluster": "", "maxage": "", "usermenu": "hide", "panit": "true", "x": 770, "y": 1120, "wires": [] }, { "id": "4d3000c1.a4c81", "type": "inject", "z": "dfe4ec36.0a5a5", "name": "", "topic": "", "payload": "", "payloadType": "str", "repeat": "", "crontab": "", "once": false, "x": 410, "y": 1060, "wires": [ [ "31c1899.d3d0b76" ] ] }, { "id": "31c1899.d3d0b76", "type": "function", "z": "dfe4ec36.0a5a5", "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:\"IBM link\"};\nreturn msg;", "outputs": 1, "noerr": 0, "x": 590, "y": 1120, "wires": [ [ "fa3d2b67.0d5078" ] ] }, { "id": "28f4bf19.04c6c", "type": "inject", "z": "dfe4ec36.0a5a5", "name": "", "topic": "", "payload": "", "payloadType": "str", "repeat": "", "crontab": "", "once": true, "onceDelay": "", "x": 390, "y": 1180, "wires": [ [ "dd8e0887.5b4888" ] ] }, { "id": "ce1dac49.66168", "type": "ui_template", "z": "dfe4ec36.0a5a5", "group": "88c32df0.a0af9", "name": "", "order": 0, "width": "6", "height": "6", "format": "
", "storeOutMessages": true, "fwdInMessages": true, "templateScope": "local", "x": 760, "y": 1180, "wires": [ [] ] }, { "id": "dd8e0887.5b4888", "type": "template", "z": "dfe4ec36.0a5a5", "name": "", "field": "payload", "fieldType": "msg", "format": "handlebars", "syntax": "mustache", "template": "", "x": 590, "y": 1180, "wires": [ [ "ce1dac49.66168" ] ] }, { "id": "ef0d9eba.478a5", "type": "ui_button", "z": "dfe4ec36.0a5a5", "name": "", "group": "88c32df0.a0af9", "order": 0, "width": 0, "height": 0, "label": "Move Mike", "color": "", "icon": "fa-male", "payload": "", "payloadType": "str", "topic": "", "x": 410, "y": 1120, "wires": [ [ "31c1899.d3d0b76" ] ] }, { "id": "72196d3b.8a5724", "type": "comment", "z": "dfe4ec36.0a5a5", "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": 460, "y": 1000, "wires": [] }, { "id": "88c32df0.a0af9", "type": "ui_group", "z": "dfe4ec36.0a5a5", "name": "Default", "tab": "f58bb1b.fd6cc5", "disp": true, "width": "6" }, { "id": "f58bb1b.fd6cc5", "type": "ui_tab", "z": "dfe4ec36.0a5a5", "name": "Home", "icon": "dashboard" } ]