xxxxxxxxxx
<html>
<head>
<script src='https://api.tiles.mapbox.com/mapbox.js/v0.6.4/mapbox.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox.js/v0.6.4/mapbox.css' rel='stylesheet' />
<style>
body { margin:0; padding:0; }
#map { position:absolute; top:0; bottom:0; width:100%; }
#feature { font-size:30px; position:absolute; top:10px; left:20px; z-index:999; background:#fff; }
</style>
</head>
<body>
<div id='feature'></div>
<div id='map'></div>
<script>
var m;
mapbox.auto('map', 'examples.map-8ced9urs', function(map) {
m = map;
map.zoom(10).center({ lat: 37, lon: -88 });
map.ui.zoomer.remove();
function on_all_loaded(layer, callback) {
var cb = function() {
if (layer.requestManager.openRequestCount > 0) return;
else callback();
layer.requestManager.removeCallback('requestcomplete', cb);
}
layer.requestManager.addCallback('requestcomplete', cb);
}
on_all_loaded(map.getLayerAt(0), function() {
map.interaction.screen_feature({
x: map.dimensions.x / 2,
y: map.dimensions.y / 2 }, function(ft) {
document.getElementById('feature').innerHTML = JSON.stringify(ft);
});
});
});
</script>
</body>
</html>
Modified http://api.tiles.mapbox.com/mapbox.js/v0.6.4/mapbox.js to a secure url
https://api.tiles.mapbox.com/mapbox.js/v0.6.4/mapbox.js