-
-
Notifications
You must be signed in to change notification settings - Fork 58
Closed
Description
In v5.0.3
When using 'feedback' as described in
https://flows.nodered.org/node/node-red-contrib-web-worldmap "Events From the Map".
The documentation states that I should expect to get something like:
{"payload": {
"action": "feedback",
"name": "some name",
"value": "some value",
"lat":51, "lon":0,
"layer":"unknown"
}
}The value I am returning is a json object.
{"payload": {
"name":"my_spot_report",
"action":"feedback",
"value":{
"attitude":"friend",
"geoObject":"Gnd Equip Vehicle",
"timeout":"600",
"name":"jan",
"bearing":0,
"distance":1,
"how":"nonCoT"}
},
},
"topic":"tak-map",
"_sessionid":"4d8ff0dd-c1d7-41f2-8c13-c70c07f63017",
"_sessionip":"10.2.118.201",
"_msgid":"2155e06325ebcb78"
}The 'lat', 'lon', and 'layer' are all missing.
Is this is the same problem reported in #278 creeping back in?
Lines 924 to 941 in 7d1782c
| var feedback = function(n = "map",v,a = "feedback",c) { | |
| if (v === "_form") { v = form; } | |
| // undefined is handled directly in the function declaration, but null/"" also requires explicit handling within the function. | |
| n = (n === null || n === "") ? "map" : n; | |
| var dataToSend = { "name": n, "action": a, "value": v }; | |
| //Kept only for backward compatibility, as the context menu should handle the click position values internally. | |
| if (n == "map") { | |
| dataToSend.lat = rclk.lat; | |
| dataToSend.lon = rclk.lng; | |
| } | |
| ws.send(JSON.stringify(dataToSend)); | |
| if (c === true) { map.closePopup(); } | |
| } | |
| // map.on('click', function(e) { | |
| // ws.send(JSON.stringify({action:"click", lat:e.latlng.lat.toFixed(5), lon:e.latlng.lng.toFixed(5)})); | |
| // }); |
Metadata
Metadata
Assignees
Labels
No labels