[ { "id": "9b2a29cc.3c53a8", "type": "worldmap", "z": "f59603d8.0a6a", "name": "", "lat": "", "lon": "", "zoom": "", "layer": "OSM", "cluster": "", "maxage": "", "usermenu": "hide", "panit": "true", "x": 750, "y": 420, "wires": [] }, { "id": "1714967f.e691ea", "type": "inject", "z": "f59603d8.0a6a", "name": "", "topic": "", "payload": "", "payloadType": "str", "repeat": "", "crontab": "", "once": false, "onceDelay": "", "x": 290, "y": 360, "wires": [ [ "1b24ad2f.198453" ] ] }, { "id": "1b24ad2f.198453", "type": "function", "z": "f59603d8.0a6a", "name": "", "func": "// create random position\nvar lat = 51 + Math.random() * 0.2;\nvar lon = -1.45 + Math.random() * 0.2;\nmsg.payload={\n lat:lat, \n lon:lon, \n name:\"Mike\", \n icon:\"male\", \n color:\"#000\"};\nreturn msg;", "outputs": 1, "noerr": 0, "x": 470, "y": 420, "wires": [ [ "9b2a29cc.3c53a8", "de5c4044.d4e0f" ] ] }, { "id": "5af27cae.299144", "type": "inject", "z": "f59603d8.0a6a", "name": "", "topic": "", "payload": "", "payloadType": "str", "repeat": "", "crontab": "", "once": true, "onceDelay": "", "x": 270, "y": 480, "wires": [ [ "f1be23c1.dd096" ] ] }, { "id": "4bab3415.afdf9c", "type": "ui_template", "z": "f59603d8.0a6a", "group": "cd81d08b.eebb3", "name": "", "order": 0, "width": "6", "height": "6", "format": "
", "storeOutMessages": true, "fwdInMessages": true, "templateScope": "local", "x": 640, "y": 480, "wires": [ [] ] }, { "id": "f1be23c1.dd096", "type": "template", "z": "f59603d8.0a6a", "name": "", "field": "payload", "fieldType": "msg", "format": "handlebars", "syntax": "mustache", "template": "", "x": 470, "y": 480, "wires": [ [ "4bab3415.afdf9c" ] ] }, { "id": "de3a90c8.8179c", "type": "ui_button", "z": "f59603d8.0a6a", "name": "", "group": "cd81d08b.eebb3", "order": 0, "width": 0, "height": 0, "label": "Move Mike", "color": "", "icon": "fa-male", "payload": "", "payloadType": "str", "topic": "", "x": 290, "y": 420, "wires": [ [ "1b24ad2f.198453" ] ] }, { "id": "223f301c.54ea9", "type": "comment", "z": "f59603d8.0a6a", "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": 340, "y": 300, "wires": [] }, { "id": "de5c4044.d4e0f", "type": "worldmap-tracks", "z": "f59603d8.0a6a", "name": "", "depth": "5", "layer": "combined", "x": 610, "y": 380, "wires": [ [ "9b2a29cc.3c53a8" ] ] }, { "id": "cd81d08b.eebb3", "type": "ui_group", "z": "f59603d8.0a6a", "name": "Default", "tab": "b34078e6.e60df8", "disp": true, "width": "6" }, { "id": "b34078e6.e60df8", "type": "ui_tab", "z": "f59603d8.0a6a", "name": "Home", "icon": "dashboard" } ]