MapQuest support in Mapstraction

MapQuest LogoYou may have noticed at my Where talk - or seen it mentioned elsewhere, but it's a big deal, so I wanted to make note of it here.

Mapstraction - MapQuestWe're pleased to announce that Mapstraction now has built-in support for MapQuest Maps. MapQuest has long been a trusted provider of online maps, and now you can use them in any site that uses Mapstraction. You can see the demo and code here: MapQuest Mapstraction Demo

To let you know - if you haven't used Mapstraction before, the only modification you have to make to your map code is:

var mapstraction = new Mapstraction('mapstraction','mapquest');

and your marker, polyline, user interface, and everything else keeps on working. No muss, no fuss - switching API's is easy. So stop learning each provider specific API.

And if you're worried about losing specific functionality in a particular mapping API - you can always get the actual mapping object out of Mapstraction and make provider specific calls. Mapstraction aims to be a common API to the general functionality of the providers. Fortunately, they're all very busy adding new features all the time to keep up with one another, so along the way Mapstraction gets better too.

More than just maps

What's really exciting (besides another major mapping provider being in Mapstraction) is that MapQuest has excellent geocoding and routing API's. Something Mapstraction didn't have. Well, now it does.

To support this, Mapstraction added mapstraction-geocode.js and mapstraction-route.js libraries. These are in addition to the usual mapstraction.js. So if you don't want routing or geocoding, you can leave these out.

Using Mapstraction, you can even switch between services. You can have Google geocoding, or MapQuest geocoding with just a single flip of provider.

Mapstraction PolylinesMapstraction supports all the cool bits of the MapQuest API you probably didn't know about, such as polylines.

Currently the MapQuest Advantage API is supported, so you have to be a customer of MapQuest. That's part of the real benefit here with Mapstraction. You can take an existing website or application, try out the Advantage API with no modification of your code, and switch back if you're not happy with it. We're also hoping MapQuest has a re-release of their OpenAPI in the near future so that developers can use the free MapQuest API for their projects.

About this article

written on
posted in Neogeography Back to Top

About the Author

Andrew Turner is an advocate of open standards and open data. He is actively involved in many organizations developing and supporting open standards, including OpenStreetMap, Open Geospatial Consortium, Open Web Foundation, OSGeo, and the World Wide Web Consortium. He co-founded CrisisCommons, a community of volunteers that, in coordination with government agencies and disaster response groups, build technology tools to help people in need during and after a crisis such as an earthquake, tsunami, tornado, hurricane, flood, or wildfire.