Mapstraction is an abstracted Javascript mapping API that can make use of Google Maps, Microsoft Virtual Earth, Yahoo Maps and Mapquest. Instead of deciding on a particular mapping provider, you can build your web application with Mapstraction and easily switch to a different service by changing a single line of code. From the Mapstraction site:
Mapstraction additionally fills some holes each provider’s current offerings (taking advantage of existing open source solutions where possible) to normalise the feature set across platforms. In the future, Mapstraction will also talk to OpenStreetMap for people who want to build maps without restrictions on derived works.
Features
- Support for 9 major mapping providers
- Point, Line, Polygon support
- Image overlay
- GeoRSS and KML feed import
- Geocoding of addresses
- Driving directions
There’s an introductory walkthrough on Webmonkey that shows you how to do the basics like instantiating a map with various providers and adding markers with the abstracted API. The Mapstraction web site also has demos for geocoding, drawing polygons, and swapping map tiles. The API appears to cover all the bases. I can’t think of any reason to directly use a specific map provider instead of this.
ADVERTISEMENT