Web Applications Stack Exchange is a question and answer site for power users of web applications. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When creating a line in Google Maps, it will be drawn straight between the two points, without accounting for curvature of the Earth. So, while showing the shortest path on the flattened map of the globe, it does not reflect the actual shortest path between those two points.

This can be seen quite clearly if you try drawing a point between London and New York and then try using the new google.com/flights and search for a flight between those cites. The map that Google Flights shows has accounted (at least roughly) for the curvature of the Earth, and so the line between London and New York is actually a curve.

My question is, is there any way to draw such lines myself in Google Maps?

share|improve this question
I think that curved line it's a graphical depiction of a take off-landing airplane trajectory (route) rather than the curvature of the globe, and it's a pretty standard airline routes representation (e.g.: simairline.net/alitalia/routemap_domestic.gif). – Alex Sep 14 '11 at 11:47
No, if you draw the same line in Google Earth, you'll see that it takes a different path when you haven't flattened out the globe to a two dimensional map. – Kris Sep 14 '11 at 12:42

Such lines are called geodesics and this site offers to draw them in Google Maps. See also this question: Is a straight line on google earth or google maps geodesic?

share|improve this answer

If you enable the Map Labs, and active Distance Measurement Tool, you will be able to measure a distance between two points, and draw a earth-curved line.

Here is an example:

enter image description here

share|improve this answer

It is now possible to do this as standard in a Google Map. When drawing a polyline via the Google Maps Javascript API, set the "geodesic" option on the polyline to true. The polyline will then be shown as curved on the 2d surface, following the shortest path on the 3d globe rather than the shortest path on the 2d map.

The reference for the polyline options is available on the Google Maps JavaScript API V3 Reference.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.