user-interfacebuttonnode-redworld-map

Toggle layers in worldmap on node-red


I have a map tracking devices at work with multiple layers. However I do not know how to get input back from the map view into node-red to work on the data functions. Devices and layers are being created dynamically based off application data from the gps transmitter sending each lora data packet. As more get added to the lora gateway no code or user intervention is required. I need to:

  1. Be able to clear the layer and remove tags (I can in node red but not the in the map UI)
  2. Selectively toggle dynamic layers (again...I can in node red but not the in the map UI)
  3. Button to clear the array data in node-red holding all tag data (again...I can in node red but not the in the map UI)

Any help or direction would be greatly appreciated.


Solution

    1. You don't, you have to do this from in Node-RED, but tags can be given a timeout that will remove them when it expires.

    2. You can pick which layers are displayed by moving the cursor over the "stacked layers" icon in the top right hand corner, under the "burger" menu

    3. Again, you don't, you have to do this from in Node-RED

    For items 1 & 3 there is the option to add custom buttons to the map that you can then use to drive Node-RED to trigger other actions. Look at the "Controlling the map" section in the nodes readme. These buttons will trigger messages on the "worldmap in" node.