Remove points of polylines that are outside of polygon using Leaflet
问题 I've draw polyline programmatically (not using leaflet draw) inside polygone using leaflet draw plugin on map, I want to keep only the points of polyline that are inside of polygone and remove those are outside. Do you have any idea how to do that using a leaflet plugin?. Any help is much appreciated. Thanks Here is a screenshot: The expected result: I did research on difference method of **turf" library as @Sam suggested, so finaly I can apply this method on my drawing polygon and line, here