Skip to content

Instantly share code, notes, and snippets.

@tmcw
Created October 15, 2013 21:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tmcw/6998625 to your computer and use it in GitHub Desktop.
Save tmcw/6998625 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title></title>
<!--
<link rel="stylesheet" href="dist/leaflet.css">
<script src="dist/leaflet.js"></script>
-->
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.css" />
<!--[if lte IE 8]>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.ie.css" />
<![endif]-->
<script src="http://cdn.leafletjs.com/leaflet-0.6.4/leaflet.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<!--[if lte IE 8]>
<link href='//api.tiles.mapbox.com/mapbox.js/v1.3.1/mapbox.ie.css' rel='stylesheet'>
<![endif]-->
<style>
body { margin:0; padding:0; }
#map { width:100%; height:800px; }
.block {
width:100%;
padding:700px 0;
text-align:center;
background:#efa;
}
</style>
</head>
<body>
<div class='block'>content</div>
<div id='map'></div>
<div class='block'>content</div>
<script>
var map = L.map('map', {zoomControl: false});
map.addLayer(L.tileLayer('http://api.tiles.mapbox.com/v3/examples.map-zr0njcqy/{z}/{x}/{y}.png'));
map.setView([0, 0], 5);
// disable drag and zoom handlers
map.dragging.disable();
map.touchZoom.disable();
map.doubleClickZoom.disable();
map.scrollWheelZoom.disable();
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment