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: [37.7749, -122.4194],
layers: L.mapquest.tileLayer('map'),
zoom: 12
});
L.mapquest.control().addTo(map);
L.mapquest.geocodingControl({
// Limit Search Ahead results to airports
searchAheadOptions: {
collection: 'airport'
}
}).addTo(map);
}
</script>
</head>
<body style="border: 0; margin: 0;">
<div id="map" style="width: 100%; height: 530px;"></div>
</body>
</html>