# Worldmap draws for all even with sessionid passed

**URL:** <https://discourse.nodered.org/t/worldmap-draws-for-all-even-with-sessionid-passed/78609>\
**Category:** General\
**Tags:** node-red-contrib-web-worldmap\
**Created:** [22 May 2023 14:54 UTC](https://discourse.nodered.org/t/worldmap-draws-for-all-even-with-sessionid-passed/78609 "2023-05-22T14:54:16Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![ManjTi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/manjti/32/79985_2.png) [@ManjTi](https://discourse.nodered.org/u/ManjTi)\
**Post date:** [22 May 2023 14:54 UTC](https://discourse.nodered.org/t/worldmap-draws-for-all-even-with-sessionid-passed/78609/1 "2023-05-22T14:54:16Z")

</div>

Example msg to [worldmap](https://www.npmjs.com/package/node-red-contrib-web-worldmap) node:

```auto
{"payload":{"name":"line42","weight":2,"line":[[60.84769,27.128244],[60.792881,27.281022]],"dashArray":"0 0","layer":"Salq's track","color":"#808080"},"_sessionid":"bc5a2fc6-e9e6-4038-a429-d4b0e23a8cea","_sessionip":"192.168.16.8","_msgid":"3a201521839fb918"}

```

The line appears on screen of target session, but when I open url on (for example) my mobile device, it loads too.  
If anyone has encountered this also and have found solution please let me know 🙂

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [22 May 2023 15:46 UTC](https://discourse.nodered.org/t/worldmap-draws-for-all-even-with-sessionid-passed/78609/2 "2023-05-22T15:46:12Z")

</div>

What have you used to create/manage the session? How is it configured?

---

<div class="post-metadata">

**Author:** ![ManjTi](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/manjti/32/79985_2.png) [@ManjTi](https://discourse.nodered.org/u/ManjTi)\
**Post date:** [23 May 2023 16:43 UTC](https://discourse.nodered.org/t/worldmap-draws-for-all-even-with-sessionid-passed/78609/3 "2023-05-23T16:43:01Z")

</div>

The worldmap node creates session by itself and stays same until page reload

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [23 May 2023 16:44 UTC](https://discourse.nodered.org/t/worldmap-draws-for-all-even-with-sessionid-passed/78609/4 "2023-05-23T16:44:35Z")

</div>

Then you probably need to contact the author of that node.

---

<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:** [24 May 2023 15:17 UTC](https://discourse.nodered.org/t/worldmap-draws-for-all-even-with-sessionid-passed/78609/5 "2023-05-24T15:17:34Z")

</div>

The worldmap node uses a different web socket library than either the dashboard or the editor . On connection a worldmap\_in node will emit a message with a `_sessionid` property. If you send a message to the (out) node with that property set - it will only get sent to that session/client. It is up to you to somehow link those to particular devices and keep track of browser refreshes (which will change the id), etc

---

<div class="post-metadata">

**Author:** ![meeki007](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/meeki007/32/12499_2.png) [@meeki007](https://discourse.nodered.org/u/meeki007)\
**Post date:** [24 May 2023 23:03 UTC](https://discourse.nodered.org/t/worldmap-draws-for-all-even-with-sessionid-passed/78609/6 "2023-05-24T23:03:07Z")

</div>

As dceejay has noted you have to shepherd the client and handle all the logic keep it tied to his `_sessionid` from input to output. You can do some really complicated things but the payoff is huge! You do not get the same fine grained control in the dash board.

Things that may open your mind. I run a businesses entire NVR system with worldmap.

 ![map2](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/0/6/062a0aa8c475fe3f166a6fe741cd564527a850c5.jpeg)

But the logic sometimes breaks my brain.  
I hope the flow image shows you how I handle the client [in] to the client [out].

 ![map1](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/1/1/11dd1856872e4a3e3631b4f9d5e88f5d70c45c7a.png)

---

<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:** [25 May 2023 14:45 UTC](https://discourse.nodered.org/t/worldmap-draws-for-all-even-with-sessionid-passed/78609/7 "2023-05-25T14:45:16Z")

</div>

Hi @meeki007 - can I ask you to look at and comment on [Line draws for all even with sessionid passed · Issue #233 · dceejay/RedMap · GitHub](https://github.com/dceejay/RedMap/issues/233)

Thanks

(likewise anyone else please join in 🙂

---

<div class="post-metadata">

**Author:** ![meeki007](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/meeki007/32/12499_2.png) [@meeki007](https://discourse.nodered.org/u/meeki007)\
**Post date:** [25 May 2023 19:26 UTC](https://discourse.nodered.org/t/worldmap-draws-for-all-even-with-sessionid-passed/78609/8 "2023-05-25T19:26:38Z")

</div>

@dceejay - ^^^^ done! ^^^^.

I saw the issue a day ago. Good call motivating me to try to explain it from my perspective. I was hesitant because I really did not understand the issue. I need to get over worrying about posting here on node-red and node-red related forums because every one is so nice. I forget that this is not reddit and its okay to make mistakes here because people will help you out and point you in the right direction and not roast the hell out of you for being ignorant. I'll try to let go of my apprehension of being wrong in this community.

---

<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:** [25 May 2023 21:29 UTC](https://discourse.nodered.org/t/worldmap-draws-for-all-even-with-sessionid-passed/78609/9 "2023-05-25T21:29:19Z")

</div>

Thanks - there are def no wrong answers here - there are always different use cases and trying to accommodate them all is going to tease out these issues... please keep adding to the issue.

---

<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:** [24 July 2023 21:30 UTC](https://discourse.nodered.org/t/worldmap-draws-for-all-even-with-sessionid-passed/78609/10 "2023-07-24T21:30:04Z")

</div>

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