Skip to content

Instantly share code, notes, and snippets.

Last active November 26, 2019 01:15
  • Star 3 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save d3noob/7654694 to your computer and use it in GitHub Desktop.
A full screen leaflet.js map

An example of a leaflet map set to full screen using appropriate styles.

<!DOCTYPE html>
<title>Full Screen Leaflet Map</title>
<meta charset="utf-8" />
body {
padding: 0;
margin: 0;
html, body, #map {
height: 100%;
width: 100%;
<div id="map"></div>
var map ='map').setView([-41.2858, 174.78682], 14);
mapLink =
'<a href="">OpenStreetMap</a>';
'http://{s}{z}/{x}/{y}.png', {
attribution: '&copy; ' + mapLink + ' Contributors',
maxZoom: 18,
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment