# How to pass sessionID between worldmap node and ui nodes and maintain browser session on a DB2 page that interacts with a worldmap? (multi user worldmap in db2)

**URL:** <https://discourse.nodered.org/t/how-to-pass-sessionid-between-worldmap-node-and-ui-nodes-and-maintain-browser-session-on-a-db2-page-that-interacts-with-a-worldmap-multi-user-worldmap-in-db2/90910>\
**Category:** Dashboard\
**Tags:** node-red-contrib-web-worldmap, dashboard-2\
**Created:** [12 September 2024 10:15 UTC](https://discourse.nodered.org/t/how-to-pass-sessionid-between-worldmap-node-and-ui-nodes-and-maintain-browser-session-on-a-db2-page-that-interacts-with-a-worldmap-multi-user-worldmap-in-db2/90910 "2024-09-12T10:15:04Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rmpasswd](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/rmpasswd/32/93661_2.png) [@rmpasswd](https://discourse.nodered.org/u/rmpasswd)\
**Post date:** [12 September 2024 10:15 UTC](https://discourse.nodered.org/t/how-to-pass-sessionid-between-worldmap-node-and-ui-nodes-and-maintain-browser-session-on-a-db2-page-that-interacts-with-a-worldmap-multi-user-worldmap-in-db2/90910/1 "2024-09-12T10:15:04Z")

</div>

tldr: it is possible to maintain a session with ui nodes from new dashboard 2.0 using _msg.\_client.user_. But [Worldmap](https://github.com/dceejay/RedMap) uses its own way(msg.\_sessionid) to maintain its own sessions. How to communicate sessionID and maintain browser session on a DB2 page that has worldmap in the page ?

According to [worldmap](https://github.com/dceejay/RedMap)'s docs, we can use msg.\_sessionid coming from "Map In" node and do session-specific tasks:

> All actions also include a: `msg._sessionid` property that indicates which client session they came from. Any msg sent out that includes this property will ONLY be sent to that session - so you can target map updates to specific sessions if required. `msg._sessionip` property that shows the ip of the client that is connected to the session.

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/f/4/f40828c37dc27c86c5afa3820eef7d2e080e2375.jpeg)

Current situation is that: On submit button, the marker/tracks layer generates and shown/mirrored in all browser sessions in different computers(using that ngrok link in address bar).  
**But** I cannot seem to figure out how to draw tracks on submit button on the map for _this specific browser session._

I'm possibly missing some obvious thing. usually a worldmap can receive a payload along with msg.\_sessionid and Only make changes to that session.  
for example:

```auto
msg.payload = {
    "name": "line42",
    "weight": 2,
    "line": [[60.84769, 27.128244], [60.792881, 27.281022]],
    "lat": 60.84769,
    "lon": 27.128244,
    "dashArray": "0 0",
    "layer": "track1",
    "color": "#808080"
};
msg._sessionid = "f942dbd5-c442-4c8a-bdd7-8145c8a0e937";

```

but on submit button, i cannot read this map's sessionID but rather i get a different socketid from db2 node.

if nothing works then one way is to build floating buttons,dropdowns and filter ranges inside the worldmap, kindly share insights  
TIA!

---

<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:** [12 October 2024 10:15 UTC](https://discourse.nodered.org/t/how-to-pass-sessionid-between-worldmap-node-and-ui-nodes-and-maintain-browser-session-on-a-db2-page-that-interacts-with-a-worldmap-multi-user-worldmap-in-db2/90910/2 "2024-10-12T10:15:19Z")

</div>

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