MapQuest.js
Getting Started
MapQuest.js is a JavaScript library for interactive maps, geocoding, directions, and traffic. MapQuest.js is powered by the MapQuest APIs and integrates with Leaflet.js.
To get started, first include MapQuest.js and MapQuest.css in your HTML header.
html
<script src="https://api.mqcdn.com/sdk/mapquest-js/v1.3.2/mapquest.js"></script>
<link type="text/css" rel="stylesheet" href="https://api.mqcdn.com/sdk/mapquest-js/v1.3.2/mapquest.css"/>Then initialize your MapQuest key and define a MapQuest map object with a center, layer, and zoom.
js
L.mapquest.key = 'KEY';
// 'map' refers to a <div> element with the ID map
L.mapquest.map('map', {
center: [37.7749, -122.4194],
layers: L.mapquest.tileLayer('map'),
zoom: 12
});