xxxxxxxxxx
<html>
<head>
<script src='https://api.tiles.mapbox.com/mapbox.js/v0.6.6/mapbox.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox.js/v0.6.6/mapbox.css' rel='stylesheet' />
<style>
body { margin:0; padding:0; }
#map { position:absolute; top:30px; bottom:0; width:100%; }
</style>
</head>
<body>
<input type='text' id='geocode' />
<button id='search'>search</button>
<div id='map'></div>
<script>
mapbox.auto('map', 'examples.map-vyofok3q', function(map) {
var btn = document.getElementById('search');
var input = document.getElementById('geocode');
btn.onclick = function() {
wax.request.get('https://api.tiles.mapbox.com/v3/mapbox/geocode/' +
encodeURIComponent(input.value) + '.jsonp', function(err, resp) {
if (!resp.results.length || !resp.results[0].length) return;
map.zoom(5).center({
lat: resp.results[0][0].lat,
lon: resp.results[0][0].lon
});
})
};
});
</script>
</body>
</html>
Modified http://api.tiles.mapbox.com/mapbox.js/v0.6.6/mapbox.js to a secure url
https://api.tiles.mapbox.com/mapbox.js/v0.6.6/mapbox.js