Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I draw a straight line in Google Maps?

Tags:

google-maps

Is there an API I can use to draw a straight line between two points in a Google map, and to show the line in different colors?

Example: draw a straight line between NYC and Los Angeles with green or red line?

like image 295
user244394 Avatar asked Dec 22 '25 23:12

user244394


1 Answers

Yes. Have you checked out the Google Maps APIs?

For example check out the source code for this example

like image 164
Kristian Avatar answered Dec 31 '25 19:12

Kristian



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!