Skip to content

Instantly share code, notes, and snippets.

@turban
Created November 4, 2012 12:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save turban/4011779 to your computer and use it in GitHub Desktop.
Save turban/4011779 to your computer and use it in GitHub Desktop.
// Load TileJSON
wax.tilejson('http://earthatlas.info/nz/tiles/nz-popden.tilejson', function(tilejson) {
// Create map and add image tiles
var map = new L.Map('map-div')
.addLayer(new wax.leaf.connector(tilejson))
.setView(new L.LatLng(51, 0), 1);
// Create map legend
wax.leaf.legend(map, tilejson).appendTo(map._container);
// Add map interaction (tooltips)
wax.leaf.interaction()
.map(map)
.tilejson(tilejson)
.on(wax.tooltip().animate(true).parent(map._container).events());
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment