MapQuest.com
Business
Navigation
Getting Started
Developer Blog
Web SDKs
MapQuest.js
PlaceSearch.js
APIs
Data Manager API
Directions API
Geocoding API
Icons API
Search API
Place Search API
Search Ahead API
Static Map API
Traffic API
Legacy Products
Leaflet Plugins
Tools
Lat/Lng Finder
Link to MapQuest
Share
Getting Started
Developer Blog
Documentation
Web SDKs
MapQuest.js
PlaceSearch.js
new
APIs
Data Manager API
Directions API
Geocoding API
Icons API
Search API
Place Search API
Search Ahead API
Static Map API
Traffic API
Legacy Products
Leaflet Plugins
Tools
Lat/Lng Finder
Link to MapQuest
Share
MapQuest.js
Basic Directions
Edit the code below and click "Try It Now" to display the result.
<html> <head> <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"/> <script type="text/javascript"> window.onload = function() { L.mapquest.key = '8nIoYUx9GyjZsdehJySzjprSvZIqgM42'; var map = L.mapquest.map('map', { center: [40.7128, -74.0059], layers: L.mapquest.tileLayer('map'), zoom: 13 }); L.mapquest.directions().route({ start: '350 5th Ave, New York, NY 10118', end: 'One Liberty Plaza, New York, NY 10006' }); } </script> </head> <body style="border: 0; margin: 0;"> <div id="map" style="width: 100%; height: 530px;"></div> </body> </html>
Try It Now