I need to check if a polyline runs under a marker. The marker and polyline should have the same latLng at that point. The problem is that there are multiple markers on my map. I can't seem to figure out how I can get the right polylines selected.
Object of Marker/Polyline:
{
latLng: Array with latLng's,
marker: Leaflet marker/polyline layer object,
selected: boolean
}
Polylines that crosses a marker contains the same latlng point as the marker, but I can't get the right result. I think it's more a mathematical problem
Image for more info:
P.S. Sorry for my bad english