MapQuest.js

What is MapQuest.js?

A JavaScript library that allows you to quickly integrate your JavaScript based application with our web services without writing extensive code. Access interactive maps, geocoding, directions, traffic and search ahead by integrating MapQuest APIs with Leaflet.js.

Get Started

What it can do for you

Be different

Stand out with customized map controls, traffic colors and icon services to make maps uniquely yours.

Time is money

Quickly and seamlessly integrate your JavaScript application with MapQuest’s web services using just a few lines of code.

Speedy load times

MapQuest.js simply requires two files to get started, helping you benefit from faster page load times.

Easy peezy

Built on top of standard Leaflet conventions, MapQuest.js is straightforward and simple to use.

Super flexible

Built on top of open source to ensure your existing JavaScript applications and custom code doesn't go to waste.

The choice is yours

Tap into OpenStreetMap or licensed data, it’s up to you.

Web Services Offered:

Maps

Easily integrate our interactive map tiles into any application. Choose from various map styles including MapQuest, satellite, hybrid, dark or light. Add functionality with controls and markers.

Traffic

Add traffic incidents, construction and traffic flow to your maps with just a few lines of code. Customize the flow lines’ colors, weight and opacity.

Geocoding

Request our geocoding service, either forward, reverse or batch, with a couple lines of code. Choose to display the results on a map, or not, and complete the task without touching our Web Service.

Search Ahead

Interface with MapQuest’s popular spatially-aware, predictive search API. Provide autocomplete functionality on a map or within a form, and give your users what they’re looking for, faster.

Directions

Make a request to our Directions API, parse the response and add the route to a map. Easy drop-in routing functionality with a click on the map or manual text input, styling to your desire. Provide better user experiences with route narratives and summaries including alternate routes.

Mobile Web

Become current with MapQuest.js. It is optimized for modern browsers both on desktop and mobile.

How it Looks

L.mapquest.key = 'KEY';
var baseLayer = L.mapquest.tileLayer('map');

var map = L.mapquest.map('map', {
  center: [37.7749, -122.4194],
  layers: baseLayer,
  zoom: 12
});

L.control.layers({
  'Map': baseLayer,
  'Hybrid': L.mapquest.tileLayer('hybrid'),
  'Satellite': L.mapquest.tileLayer('satellite'),
  'Light': L.mapquest.tileLayer('light'),
  'Dark': L.mapquest.tileLayer('dark')
}).addTo(map);

Try it before you buy it. See our APIs in action and get a better understanding of what they can do for you.

Try It Out

Access everything you need to know about each of our APIs and SDKs. From response codes to release notes, it’s all here.

Documentation

Connect and collaborate with a community of developers who are all on the same topic.

Forum

One subscription for all your geospatial needs