Interaction

You can add über-fast interactivity to maps made with TileMill.

The interaction control lets you do whatever you want with the interactivity it provides - see the documentation on tooltips and its API for the full story.

<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' />
</head>
<body>
  <div id='map-div'></div>
</body>
wax.tilejson('https://api.tiles.mapbox.com/v3/mapbox.geography-class.jsonp',
  function(tilejson) {
  var map = new L.Map('map-div')
    .addLayer(new wax.leaf.connector(tilejson))
    .setView(new L.LatLng(51.505, -0.09), 1);
  wax.leaf.interaction()
    .map(map)
    .tilejson(tilejson)
    .on(wax.tooltip().animate(true).parent(map._container).events());
});