Viewing an older version of mapbox.js. Check out v1.4.0 for the latest.

Cycle through markers automatically

<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>Cycle through markers automatically</title>
  <script src='http://api.tiles.mapbox.com/mapbox.js/v0.6.7/mapbox.js'></script>
  <link href='http://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%; }
  </style>
</head>
<body>
<div id='map'></div>
<script>
function ignorePopups(markers) {
  var clean = [];
  for (var i = 0; i < markers.length; i++) {
    if (markers[i].showTooltip) clean.push(markers[i]);
  }
  return clean;
}
// Create map
mapbox.auto('map', 'examples.map-zr0njcqy', function(map, tiledata) {
  var i = 0;
  function loop() {
    window.setTimeout(function() {
      var markers = ignorePopups(tiledata.markers.markers());
      if (++i > markers.length - 1) i = 0;
      map.center(markers[i].location, true);
      markers[i].showTooltip();
      loop();
    }, 3000);
  }
  loop();
});
</script>
The code and documentation to mapbox.js is hosted on GitHub where you can contribute changes and improvements.