Created
December 20, 2011 19:26
-
-
Save tmcw/1502853 to your computer and use it in GitHub Desktop.
Base leaflet.js template
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
<html> | |
<head> | |
<script src='https://raw.github.com/mapbox/wax/master/ext/leaflet.js' type='text/javascript'></script> | |
<script src='https://raw.github.com/mapbox/wax/master/dist/wax.leaf.js' type='text/javascript'></script> | |
<link href='https://raw.github.com/mapbox/wax/master/ext/leaflet.css' rel="stylesheet" type="text/css" /> | |
<link href='https://raw.github.com/mapbox/wax/master/theme/controls.css' rel="stylesheet" type="text/css" /> | |
<style type='text/css'> | |
#map-div { | |
width:500px; | |
height:300px; | |
} | |
</style> | |
<body> | |
<div id='map-div'></div> | |
<script> | |
wax.tilejson('http://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.505, -0.09), 1); | |
wax.leaf.interaction(map, tilejson); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment