Created
January 23, 2013 20:44
-
-
Save yhahn/4612921 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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src='http://api.tiles.mapbox.com/mapbox.js/v0.6.7/mapbox.js'></script> | |
<link href='http://api.tiles.mapbox.com/mapbox.js/v0.6.7/mapbox.css' rel='stylesheet' /> | |
<style> | |
body { margin:0; padding:0; } | |
#map { position:absolute; top:0; bottom:0; width:100%; } | |
</style> | |
</head> | |
<body> | |
<div id='map'></div> | |
<script> | |
// Create a new map. | |
var template = 'http://a.tiles.mapbox.com/v3/examples.map-zr0njcqy/{Z}/{X}/{Y}.png'; | |
var map = mapbox.map('map', new MM.TemplatedLayer(template)); | |
map.setCenterZoom({ lat: 38.90, lon: -77.05 }, 13); | |
// Create markers layer from the map geojson data. | |
var markersLayer = mapbox.markers.layer().url('http://a.tiles.mapbox.com/v3/examples.map-zr0njcqy/markers.geojsonp'); | |
map.addLayer(markersLayer); | |
// Bind interaction to the markersLayer. | |
mapbox.markers.interaction(markersLayer); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment