<div id='map'></div>
<script type='text/javascript'>
var map = L.mapbox.map('map', 'examples.map-zr0njcqy');
map.setView([38.90, -77], 13);
// the function given to this callback will be called every time the map
// completes a zoom animation.
map.on('zoomend', function() {
// here's where you decided what zoom levels the layer should and should
// not be available for: use javascript comparisons like < and > if
// you want something other than just one zoom level, like
// (map.getZoom > 10)
if (map.getZoom() === 13) {
// setFilter is available on L.mapbox.markerLayers only. Here
// we're hiding and showing the default marker layer that's attached
// to the map - change the reference if you want to hide or show a
// different markerLayer.
// If you want to hide or show a different kind of layer, you can use
// similar methods like .setOpacity(0) and .setOpacity(1)
// to hide or show it.
map.markerLayer.setFilter(function() { return true; });
} else {
map.markerLayer.setFilter(function() { return false; });
}
});
</script>