What are Google Maps?

We've been hearing a lot (and writing a lot here) about Google Maps, but how does the service actually work? In particular, how does additional data get added in to a Google map?

There have been a lot of maps on the Internet over the years, and many of them have been highly popular (such as Yahoo! Maps and (years ago) maps from folks like DeLorme). However, none of these location and driving maps have had the caché of Google Maps. The most obvious reason is that none of them allowed you to add your own content to the map.

Today we're going to explore how data is added to a Google Map and see what the implications are for the way that the map data is provided and used.

Google Maps is not just a service, it's an API (application programming interface) for creating maps in a web browser using the Google Maps service. The API uses JavaScript to provide interactivity and to load data.

Either point data or line data can be added to a Google map, so it can be used to display discrete locations or lines representing things like boundaries or routes. When using points, the pushpin icon is used to indicate the location of the point on the map, and people creating overlays can respond to clicking on the pushpins by putting up a "window" with further information (including full HTML, so you can put links and pictures in there).

One interesting thing is how you get the data into the overlays. Google's map data is (of course) grabbed over the internet from their servers. This happens behind the scenes. However, overlay data can either be added manually (the script can add points or lines using individual commands) or downloaded using an AJAX method which retrieves an XML document that has the appropriate data in it. By using the AJAX method, the JavaScript from the site still needs to retrieve the data and parse it (in other words it never hits the Google servers), but Google provides a standardized way to retrieve the data regardless of whatever browser you are running in.

All things considered, if you were using a local data source to display the page, you could display the data without every running the risk of sending it over the network. Data can also be embedded directly into a web page's source by putting the point creation code directly in the JavaScript. This is useful for static locations (you are here/we are here maps, etc.).

There are a lot of knobs in Google Maps, including the ability to substitute your own graphics for the pushpins, modify the way it responds to clicking, and set the attributes (stroke width and color, for example) for the lines.

However, Google Maps does not include any geocoding or geolocation code. That must all be provided by the javascript that accompanies it or the server that serves up the data. Further, access to the basemap is not available, either for changing the way it puts data on it (which layers are visible, colors, etc.) or to do any kind of data analysis.

In the end, Google Maps is a very flexible service to drive customers to Google's web site, and has been seen by the various news outlets during Katrina, it has been widely accepted as a source of basic imagery (CNN, in particular, used it constantly for showing where things used to be in New Orleans).

One last comment, and that's on licensing. You can't use the Google Maps API without getting an API Key (available on their API page). To get it, you must "sign" the license agreement, which states (among other things, remember that I'm not a lawyer) that:

  • you can't store data you get from the service
  • You can't use the data for bad purposes (stalking, violating legal rights of others, defamation, etc.)
  • You can't pair it with data or information that would violate somebody else's copyright
  • You can't use a robot to retrieve data systematically
  • You can't remove any ads or other information that Google puts on the maps
  • You can only use it for services that are "generally accessible to consumers without charge"

It's unclear from the license whether private use is allowed or not, but it is clear than any for-fee service is not allowed, and that appears to not be limited to using their underlying data, but charging for the overlays.

All things considered, Google Maps is a fine service that provides basic mapping to publicly-accessible sites for the cost of whatever advertising Google wants to throw up there. So far, there hasn't been much (any), but we'll see how that changes over time. They're not know for being particularly reserved on pursuing advertising revenues.