Worldmap draws for all even with sessionid passed

Example msg to worldmap node:

{"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 :slight_smile:

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

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

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

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

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.

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

1 Like

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

Thanks

(likewise anyone else please join in :slight_smile:

@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.

1 Like

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.

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