Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can one draw polylines or curves in Google maps between two location but avoid drawing on land?

Tags:

google-maps

As the question states, how can I draw a polyline or a curve between two points on a Google Map something like this:

enter image description here

but avoid drawing on any line between the two points.

I want to use this feature to draw dynamic cruise itineraries. Do not take into consideration very complicated routes, something simple.

For example assume I have this locations: Barcelona, Marseille, Nice, Genova, Napoli, Palermo and back to Barcelona.

If I draw straight lines it would look like this: http://prntscr.com/6eubrs Instead I would like to achieve something like this: http://prntscr.com/6eucm9

Or is there a way to use/access the ferry routes and draw onto them?

like image 720
Alex Rosca Avatar asked Dec 11 '25 23:12

Alex Rosca


1 Answers

You could use OpenStreetMap and only import the ferry data with one of the existing routing engines

like image 128
Karussell Avatar answered Dec 15 '25 02:12

Karussell



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!