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:0; bottom:0; width:100%; }
</style>
</head>
<body>
<style>
.marker-image {
width:50px;
height:50px;
border:1px solid #000;
background:#eee;
margin-left:-26px;
margin-top:-26px;
pointer-events:all;
position:absolute;
text-align:center;
line-height:50px;
}
</style>
<div id='map'></div>
<script>
// Create map
var map = mapbox.map('map');
map.addLayer(mapbox.layer().id('examples.map-vyofok3q'));
// Create and add marker layer
var markerLayer = mapbox.markers.layer().features([{
"geometry": { "type": "Point", "coordinates": [-74.00, 40]},
"properties": { "number": 2 }
}, {
"geometry": { "type": "Point", "coordinates": [-75.00, 40]},
"properties": { "number": 4 }
}]).factory(function(f) {
var div = document.createElement('div');
div.className = 'marker-image';
div.innerHTML = f.properties.number;
return div;
});
map.addLayer(markerLayer)
.setExtent(markerLayer.extent());
// Attribute map
map.ui.attribution.add()
.content('<a href="https://mapbox.com/about/maps">Terms & Feedback</a>');
</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