Worldmap feedback doesn't work for me

Hi

I'm using worldmap and I have displayed an area with an associated context menu, containing buttons.

onclick successfully invokes the delMarker, however for one of the buttons I would like feedback to be invoked, so that I can respond to the worldmap in action. (see code snippet below)

I have debug connected to the worldmap in node but I cont get an action when I click on the context menu button associated with the feedback

Any suggestions

thanks

msg.payload = {
    name: 'TestSurveyLocal',
    fillColor:'red',
    area: [ [50.883333,-2.808333], [50.884444,-2.810556], [50.884444,-2.809167], [50.884167,-2.807778]], 
    contextmenu: '<button name="EditSurvey" onclick=\'editPoly("TestSurveyLocal")\'>Edit Survey Task</button><br>' +
    '<button name="SpraySurveyButton1" onclick=\'feedback("sprayBtn","doIt")\'>Spray Survey Task</button><br>' +
    '<button name="DeleteSurveyButton" onclick=\'delMarker("TestSurveyLocal")\'>Delete Survey Task</button><br>' +
    '<b>Double click survey to finish editing</b>'
};

When I try it I get he following from a worldmap-in node
image

So looks like it worked to me ?

Hi dceejay, thanks for the quick response.
Is that with debug attached to the worldmap in node ?

I still don't get any feedback.

My test flow

[{"id":"9c90f212.54e34","type":"worldmap","z":"798f73e4.a55b6c","name":"","lat":"50.8841","lon":"-2.809","zoom":"16","layer":"","cluster":"","maxage":"","usermenu":"show","layers":"show","panit":"true","panlock":"false","zoomlock":"false","hiderightclick":"false","coords":"deg","showgrid":"false","allowFileDrop":"true","path":"/worldmap","x":520,"y":380,"wires":[]},{"id":"fc1ee6a9.e70518","type":"function","z":"798f73e4.a55b6c","name":"","func":"msg.payload = {\n    name: 'TestSurveyLocal',\n    fillColor:'red',\n    area: [ [50.883333,-2.808333], [50.884444,-2.810556], [50.884444,-2.809167], [50.884167,-2.807778]], \n    contextmenu: '<button name=\"EditSurvey\" onclick=\\'editPoly(\"TestSurveyLocal\")\\'>Edit Survey Task</button><br>' +\n    '<button name=\"SpraySurveyButton1\" onclick=\\'feedback(\"sprayBtn\",\"doIt\")\\'>Spray Survey Task</button><br>' +\n    '<button name=\"DeleteSurveyButton\" onclick=\\'delMarker(\"TestSurveyLocal\")\\'>Delete Survey Task</button><br>' +\n    '<b>Double click survey to finish editing</b>'\n};\nreturn msg;","outputs":1,"noerr":0,"x":340,"y":380,"wires":[["9c90f212.54e34"]]},{"id":"67859350.7d6b5c","type":"worldmap in","z":"798f73e4.a55b6c","name":"","path":"/worldmap","events":"all","x":180,"y":460,"wires":[["b7979b3b.177668"]]},{"id":"b7979b3b.177668","type":"switch","z":"798f73e4.a55b6c","name":"","property":"payload.action","propertyType":"msg","rules":[{"t":"eq","v":"connected","vt":"str"},{"t":"eq","v":"feedback","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":3,"x":330,"y":460,"wires":[["fc1ee6a9.e70518"],["7c40413a.4194"],[]]},{"id":"7c40413a.4194","type":"debug","z":"798f73e4.a55b6c","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":530,"y":480,"wires":[]}]

Please make sure you have latest worldmap version 2.8.0

Hi - I did an update to worldmap and it's working now :slight_smile:

1 Like

Thank you for your help. I thought I was on the latest version, but hey I'm happy it works.

All best

No problem - yes there were some wrinkles ironed out fairly recently :slight_smile:

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