Skip to content

Instantly share code, notes, and snippets.

Last active August 29, 2015 14:13
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Minimal Leaflet Page
<!DOCTYPE html>
<title>Minimal Leaflet Page</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="" />
html, body, #map { margin: 0; height: 100%; width: 100%; }
<script src=""></script>
<div id="map"></div>
<script type="text/javascript">
var map ='map').setView([37.8, -96], 3);
<!-- -->
var osmUrl='http://{s}{z}/{x}/{y}.png';
var osmAttrib='Map data © <a href="">OpenStreetMap</a> contributors';
var osm = new L.TileLayer(osmUrl, {minZoom: 2, maxZoom: 12, attribution: osmAttrib})
Copy link

Please make this take up the full page.

body {
padding: 0;
margin: 0;
html, body, #map {
height: 100%;

Copy link

Thanks @cbachich for the idea. I've updated the code above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment