Hi Riya,
For the mentioned use-case, you need to register click event handler to the created polyline using the below-mentioned JS.
JS Snippet:
window[$parameters.PolylineName].on('click', function (e) {
$actions.GetLocation(JSON.stringify(e.latlng));
L.DomEvent.stopPropagation(e);
});
See this demo screen (first click the AddMarker then AddPolyline Btn): LeafletJS_Polyline_ClickEvtHandler
Refer to the attached oml
I hope this helps you!
Kind regards,
Benjith Sam