Connector

The Leaflet connector lets you quickly configure a MapBox map with Leaflet. You can also configure layers with the TileLayer class, but using the connector also automatically configures attribution, zoom levels, and tile URLs.

<html>
<head>
  <script src='wax/ext/leaflet.js' type='text/javascript'></script>
  <script src='wax/dist/wax.leaf.js' type='text/javascript'></script>
  <link href='wax/ext/leaflet.css' rel='stylesheet' type='text/css' />
wax.tilejson('https://api.tiles.mapbox.com/v2/mapbox.geography-class.jsonp',
  function(tilejson) {
    var map = new L.Map('map-div')
      .addLayer(new wax.leaf.connector(tilejson))
      .setView(new L.LatLng(51, 0), 1);
});

API

var layer = new wax.leaf.connector(tilejson)
Returns a new L.TileLayer object.