I'm using Google Maps API to add a map to my website that controls the route of a sailor. The route points are added on the fly with javascript and they are not quite detailed, so sometimes I get a line crossing over land.
Is it possible to add points to a Polyline and automatically avoid passing through land?