Fullscreen Example
Try It
Notice the icon top left, below the zoom controls. Click it to enter fullscreen viewing.
Code
<link href='https://api.mapbox.com/mapbox.js/plugins/leaflet-fullscreen/v1.0.1/leaflet.fullscreen.css' rel='stylesheet' /> ... <script src='https://api.mapbox.com/mapbox.js/plugins/leaflet-fullscreen/v1.0.1/Leaflet.fullscreen.min.js'></script> ... fullscreenControl: true,
View the source of this page to see fully how the map is created. Notice:
- New CSS import added
- New javascript import added
- When creating the map we specify
fullscreenControl: true