You are viewing an older version of MapQuest.js. Check out the latest version.
<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',
waypoints: [ '366 Columbus Ave, New York, NY 10024', '881 7th Ave, New York, NY 10019'],
optimizeWaypoints: true
});
}
</script>
</head>
<body style="border: 0; margin: 0;">
<div id="map" style="width: 100%; height: 530px;"></div>
</body>
</html>