blankblank blank

Drawing Lines Between Points In Google Maps, Straight And Great Circle

In comments from a previous post, TommyBoy writes:

“What I’m looking for and just can’t seem to find; is a simple line plotting tool for Googlemaps. On the weather sites, they’ll say “a storm is expected south of so-and-so to so-and-so to so-and-so. I’d like to pop those cities into a GMap, and have is simply display a straight line connection one city to another, so you can see the storm line. Not following roads and directions, just a point to point to point line. I’ve search high and low, and can’t find anything that simplistic. Ever come across something like this?”

Why yes, I have. Of course, if I hadn’t, I wouldn’t be writing this post :).

The RoutePlanner website allows you to plot routes between locations on a Google Maps interface that you define either by clicking on the map, or entering the location into a search box. For drawing a straight line between two cities, you would do the following:

a. Skip the first step the interface, which zooms in on a location of interest – in most cases the zoom will be at too high a level to be useful.

b. Enter the points you want to draw a straight line between, either by clicking on the Google Maps interface, or entering a location (at least city and state) into the search box. When you enter the first point, it will zoom into that location. Entering the second point will not zoom to that location, though, and you will probably want to zoom out to see both markers on the map.

c. You have two sets of options in the third step on the page. The first is supposed to give you the driving route between the two points, but I can’t seem to get it to work (possibly because of pop-up blocking issues). The other draws a “as the crow flies” straight line between the two points, which is what I think you want. There are two options, “Get Crow Route As Entered” and “Get Best Crow Route”, but they usually seem to give the same results for two points. There are times, though, when one of the “Crow” options doesn’t work, while the other does, and that appears to be a problem with clearing out locations from a previous operation.

d. Once you’re done, you can zoom out to see the line between the two locations, clear everything and Start Over, or even save the points and drawn line in a permanent URL you can bookmark, like this one.

One thing to keep in mind, though, is that only North/South and East/West lines will be “true” in terms of direction. I believe Google Maps uses the “Plate Carree” (“flat and square”) or equirectangular projection, where the grid uses an equal spacing for latitude and longitude degrees in the y and x directions. But on the earth, the distance spanned north/south by a degree of latitude is constant, while the distances spanned east/west by a degree of longitude is greatest at the equator and shrinks to zero at the poles. So line drawn on the map that isn’t exactly east/west or north/south doesn’t represent the bearing angle from one point to another correctly, but will be skewed southward somewhat. For the purposes you want to use this for, though, it’s not that big of a deal.

Another thing to remember is that on a flat representation of a curved surface, like a map of the earth, a straight line is usually not the shortest distance between two points. For that, you’d want a “Great Circle” route plotter, and there’s a pretty good one with a Google Maps interface at the Great Circle Mileage Calculator and Display website. Unlike the RoutePlanner website, you have to manually choose the two points you want to draw a Great Circle between, but creating the points is easy:

1. Enter the locations that you want to create a Great Circle between in the box at the top.

2. Click on Start Course

3. Click on the first point marker, then the second, then click “End At Last Point”; the Great Circle Route will be drawn between the two. You can also add markers to the map manually at this stage as well.

The other options are fairly easy to figure out.

Looking for something else? Enter some keywords below, then click "Search".    

1 Response to “Drawing Lines Between Points In Google Maps, Straight And Great Circle”

  1. 1 elena

    Good info here, but I would add a disclaimer that the Route Planner can only be used for North America (as far as I see).

Comments are currently closed; feel free to contact me with questions/issues.