Skip to content

Instantly share code, notes, and snippets.

@geografa
Created January 12, 2014 23:32
Show Gist options
  • Save geografa/8392133 to your computer and use it in GitHub Desktop.
Save geografa/8392133 to your computer and use it in GitHub Desktop.
Portland OSM Building Import Sample
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title></title>
<script src='//api.tiles.mapbox.com/mapbox.js/v1.6.0/mapbox.js'></script>
<link href='//api.tiles.mapbox.com/mapbox.js/v1.6.0/mapbox.css' rel='stylesheet' />
<!--[if lte IE 8]>
<link href='//api.tiles.mapbox.com/mapbox.js/v1.6.0/mapbox.ie.css' rel='stylesheet'>
<![endif]-->
<style>
body { margin:0; padding:0; }
#map { position:absolute; top:0; bottom:0; width:100%; }
</style>
</head>
<body>
<div id='map'></div>
<script type='text/javascript'>
var map = L.mapbox.map('map')
.setView([45.538105, -122.669177], 14);
L.control.layers({
'OSM Bright': L.mapbox.tileLayer('grafa.sk54gqfr').addTo(map),
'Satellite': L.mapbox.tileLayer('grafa.h0599p73')
}, {
'Buildings': L.mapbox.tileLayer('grafa.bfs6pqfr', {opacity: .8}),
'Labels': L.mapbox.tileLayer('grafa.kpqa1yvi')
}).addTo(map);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment