Skip to content

Instantly share code, notes, and snippets.

@mlevans
Created May 25, 2011 21:21
Show Gist options
  • Save mlevans/992013 to your computer and use it in GitHub Desktop.
Save mlevans/992013 to your computer and use it in GitHub Desktop.
Displaying Map Tiles from TileStream
<!Doctype html>
<html>
<head>
<title>311 Density</title>
<meta charset="utf-8" />
<link rel="stylesheet" href="https://github.com/CloudMade/Leaflet/raw/master/dist/leaflet.css" />
<!--[if lte IE 8]><link rel="stylesheet" href="https://github.com/CloudMade/Leaflet/raw/master/dist/leaflet.ie.css" /><![endif]-->
</head>
<body>
<div id="map" style="width: 600px; height: 400px"></div>
<script src="https://github.com/CloudMade/Leaflet/raw/master/dist/leaflet.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<script>
$(document).ready(function(){
var map = new L.Map('map');
var tileMillUrl = 'http://ec2-184-73-13-139.compute-1.amazonaws.com:8888/1.0.0/control_room/{z}/{x}/{y}.png';
cloudmadeAttribution = '&copy 2011',
cloudmade = new L.TileLayer(tileMillUrl, {maxZoom: 4, attribution: cloudmadeAttribution});
map.setView(new L.LatLng(0, 0), 2).addLayer(cloudmade);
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment