Created
November 4, 2012 12:48
-
-
Save turban/4011779 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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