-I'm working on a Node-RED Worldmap project and want to create a context menu that appears when clicking on the polylines.
-The context menu should display the names of the two endpoints (source and target) of the clicked polyline.
-Has anyone implemented a similar feature or have suggestions for adding custom context menus at polyline endpoints in Worldmap?
-I'm looking for guidance on the best approach, including JavaScript or other methods to handle this interaction.
-Below I attached the screenshot and log messages
"The image below shows the corresponding locations, and i need those two locations are displayed when I click the polyline. How can i achieve this?."
msg.payload with polyline and markers: [
{
"name": "server_locations",
"line": [
[
40.73061,
-73.935242
],
[
37.774929,
-122.419418
]
],
"color": "#007BFF",
"layer": "polylines",
"weight": "2",
"clickable": false
},
{
"name": "New York City, USA",
"lat": 40.73061,
"lon": -73.935242,
"icon": "fa-circle fa-x",
"clickable": false,
"layer": "markers"
},
{
"name": "San Francisco, USA",
"lat": 37.774929,
"lon": -122.419418,
"icon": "fa-circle fa-x",
"clickable": false,
"layer": "markers"
}
]