Node-RED Worldmap Popup's requiring right click for button to function

Hi, I am working on a NR project to manage input devices across multiple sites. To do this I am using the Worldmap nodes and generally speaking everything is working correctly. The popups pop up when they are supposed to and I use the context menu functionality to add things to my display.

The issue I am having is that I have added a button into the popup as can be seen in the image below but it currently will not work unless I first right click and bring up a context menu. I have tried to forcefully set the coords when the popup is clicked but that did not seem to resolve the issue.

Any input would be much appreciated.

Hello and welcome to the forum.

All we see is a picture... hard to diagnose the inner workings.

Perhaps you can "popup" some flow details that we can click on? :wink:

There isn't much to the inner workings (at least in regards to the right click and pop up functionality) and to share the whole system would include a lot of unrelated material so I will try to only reference the relevant details. Both the popup and the context menu are setup when the map is initialised one using the setup map function while the other is done in the setup menu function.

The code used for the menu is:

The code used for the popup is:

mapMsg.payload.popup =  '<div class="content">' +
                    '<p>No. of Alarms : ' + Testval + '</p>' +
                    '<button name="Snap to Location" style=" color:red; width:100%;" onmouseover=\'addToForm("parlon",'+location.Icon_loc.coordinates[0][0]+'), addToForm("parlat",'+location.Icon_loc.coordinates[0][1]+')\' onclick=\'feedback(this.name,"$form",null,true)\' >Snap to Location</button>'
                '</div>';

The reason for all the location references is that after the right click required to get it to work the location data passed was that of the right click location and not of the icon. I am assuming that if I could set the value that right click sets on init then I can operate the system without having to first right click. If that makes sense.

In both cases the 'feedback' is handled by the following flow.

[{"id":"d83276af.9cc65","type":"tab","label":"Map event processing","disabled":false,"info":""},{"id":"22e421c8.26678e","type":"debug","z":"d83276af.9cc65","name":"mapevents","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":390,"y":160,"wires":[]},{"id":"d34e037.47f4e8","type":"worldmap in","z":"d83276af.9cc65","name":"","path":"/dashmap","events":"all","x":140,"y":160,"wires":[["22e421c8.26678e","bd58ca1.2a6fdb8"]]},{"id":"bd58ca1.2a6fdb8","type":"switch","z":"d83276af.9cc65","name":"","property":"payload.action","propertyType":"msg","rules":[{"t":"eq","v":"layer","vt":"str"},{"t":"eq","v":"feedback","vt":"str"},{"t":"eq","v":"delete","vt":"str"},{"t":"eq","v":"draw","vt":"str"},{"t":"eq","v":"History","vt":"str"}],"checkall":"false","repair":false,"outputs":5,"x":390,"y":260,"wires":[["b9d26268.bbbb2"],["8dd2a92.3f13858"],["397d3d23.02ba9a"],["df23002b.dd5a6"],["83e6e571.d8e378","61b5c477.936dec"]],"inputLabels":["events"],"outputLabels":["layer","feedback","delete","",""]},{"id":"f5d28410.55642","type":"link out","z":"d83276af.9cc65","name":"insert-out","links":["5d009b8f.39d7ec"],"x":755,"y":220,"wires":[]},{"id":"397d3d23.02ba9a","type":"link out","z":"d83276af.9cc65","name":"delete-out","links":["65efce54.eae6b8","86c1f47c.a89998"],"x":555,"y":300,"wires":[]},{"id":"b9d26268.bbbb2","type":"link out","z":"d83276af.9cc65","name":"layer-out","links":["2d90371c.e5d3f8","8a791f91.55eda","cb8450f4.8a5f68","f79b0cf4.eca3f"],"x":555,"y":220,"wires":[]},{"id":"6e620545.d1d34c","type":"comment","z":"d83276af.9cc65","name":"map event processing","info":"","x":180,"y":100,"wires":[]},{"id":"df23002b.dd5a6","type":"link out","z":"d83276af.9cc65","name":"draw-out","links":["7683f96e.2bcc78","68b750fa.c52378"],"x":555,"y":340,"wires":[]},{"id":"ef8c14ad.67ac88","type":"link out","z":"d83276af.9cc65","name":"Snap_to_location_feedback","links":["7c09d4b7.74656c"],"x":755,"y":280,"wires":[]},{"id":"8dd2a92.3f13858","type":"switch","z":"d83276af.9cc65","name":"","property":"payload.name","propertyType":"msg","rules":[{"t":"neq","v":"Snap to Location","vt":"str"},{"t":"eq","v":"Snap to Location","vt":"str"}],"checkall":"true","repair":false,"outputs":2,"x":590,"y":260,"wires":[["f5d28410.55642"],["ef8c14ad.67ac88"]]},{"id":"83e6e571.d8e378","type":"change","z":"d83276af.9cc65","name":"","rules":[{"t":"set","p":"payload","pt":"msg","to":"3","tot":"num"},{"t":"delete","p":"topic","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":580,"y":420,"wires":[["b5365325.ae368"]]},{"id":"b5365325.ae368","type":"link out","z":"d83276af.9cc65","name":"","links":["630691ba.0d0908"],"x":755,"y":420,"wires":[]},{"id":"61b5c477.936dec","type":"link out","z":"d83276af.9cc65","name":"History-trigger","links":["9809b47d.d7be38"],"x":555,"y":380,"wires":[]}]

But I'm not too concerned about this as I know that once the RC occurs everything functions as intended.

Hopefully that has helped to clarify things a bit more