# Activate an overlay in woldmap by a node

**URL:** https://discourse.nodered.org/t/activate-an-overlay-in-woldmap-by-a-node/33853
**Category:** General
**Created:** [6 October 2020 19:25 UTC](https://discourse.nodered.org/t/activate-an-overlay-in-woldmap-by-a-node/33853 "2020-10-06T19:25:54Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Ino](https://avatars.discourse-cdn.com/v4/letter/i/bbe5ce/32.png) [@Ino](https://discourse.nodered.org/u/Ino)
#### Post date: [6 October 2020 19:25 UTC](https://discourse.nodered.org/t/activate-an-overlay-in-woldmap-by-a-node/33853/1 "2020-10-06T19:25:55Z")

</div>

After starting up Node-Red I want to setup worldmap by an inject node and also set the right overlay (ship nav) so I can switchoff the layer menu. The reason is that sometimes its hard to avoid touching unwanted items on the screen (tablet). Everything works (more than) fine except the activation of the ship nav overlay by an inject node.  
So I tried (almost?) everything, but I can't get it fixed; only by the layer menu I can select the ship nav overlay. Is someone familiar with worldmap and can give me the "golden" tip?

Thanks in advantage.  
Kind regards,  
Ino

---

<div class="post-metadata">

### Author: ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)
#### Post date: [6 October 2020 20:35 UTC](https://discourse.nodered.org/t/activate-an-overlay-in-woldmap-by-a-node/33853/2 "2020-10-06T20:35:33Z")

</div>

you just need a `msg.payload` like

```auto
{
    "command": {
        "showlayer": "ship nav"
    }
}

```

```auto
[{"id":"15cea42f.0fdfec","type":"inject","z":"e9b4dddd.70115","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"command\":{\"showlayer\":\"ship nav\"}}","payloadType":"json","x":170,"y":240,"wires":[["3010bc77.940f94"]]},{"id":"3010bc77.940f94","type":"worldmap","z":"e9b4dddd.70115","name":"","lat":"","lon":"","zoom":"","layer":"","cluster":"","maxage":"","usermenu":"show","layers":"show","panit":"false","panlock":"false","zoomlock":"false","hiderightclick":"false","coords":"none","showgrid":"false","path":"/worldmap","x":390,"y":240,"wires":[]}]

```

---

<div class="post-metadata">

### Author: ![Ino](https://avatars.discourse-cdn.com/v4/letter/i/bbe5ce/32.png) [@Ino](https://discourse.nodered.org/u/Ino)
#### Post date: [7 October 2020 06:07 UTC](https://discourse.nodered.org/t/activate-an-overlay-in-woldmap-by-a-node/33853/3 "2020-10-07T06:07:34Z")

</div>

Thanks a lot; it works fine now!  
I completely missed the command in the documentation. Sometimes its better to stop and have a break..........

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [21 October 2020 06:07 UTC](https://discourse.nodered.org/t/activate-an-overlay-in-woldmap-by-a-node/33853/4 "2020-10-21T06:07:35Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
