index.html
<!DOCTYPE html>
<html>
<head>
<script src='//api.tiles.mapbox.com/mapbox.js/v0.6.7/mapbox.js'></script>
<link href='//api.tiles.mapbox.com/mapbox.js/v0.6.7/mapbox.css' rel='stylesheet' />
<style>
body { margin:0; padding:0; }
#map { position:absolute; top:0; bottom:0; width:100%; }
.marker-image {
width:100px;
height:100px;
border:1px solid #000;
margin-left:-51px;
margin-top:-51px;
pointer-events:all;
position:absolute;
}
</style>
</head>
<body>
<div id='map'></div>
<script>
mapbox.auto('map', 'examples.map-zr0njcqy', function(map, tiledata) {
tiledata.markers.factory(function(m) {
var img = document.createElement('img');
img.className = 'marker-image';
img.setAttribute('src', "//www.dummyimage.com/100x100/bd00bd/fff");
return img;
});
});
</script>
</body>
</html>