Mapstraction and OpenLayers

In this chapter, I’ve covered how to use some of the major mapping APIs: Google Maps, Yahoo!, MapQuest, and Microsoft. It would be convenient to be able to not worry about the differences among the maps and easily switch among the various maps. That’s the promise of a mapping abstraction library such as Mapstraction ( We’ll have to wait and see how and whether it is widely used to gauge the library’s effectiveness.

Along a different vein is OpenLayers (, which is defined as follows:

A pure JavaScript library for displaying map data in most modern web browsers, with no server-­side dependencies. OpenLayers implements a (still-developing) JavaScript API for building rich web-­based geographic applications, similar to the Google Maps and MSN Virtual Earth APIs, with one important difference—OpenLayers is free software, developed for and by the open source software community.

You can try OpenLayers in FlashEarth ( Go to the site, and select OpenLayers. You might have to zoom out sufficiently to see any tiles (for example, go to h ttp:// You can also check out other examples in the OpenLayers gallery at