Simple plugin for Leaflet that adds fullscreen button to your maps.
Inspired by http://elidupuis.github.com/leaflet.zoomfs/
Released under the MIT License http://opensource.org/licenses/mit-license.php
Include Control.FullScreen.js and Control.FullScreen.css in your page:
Add the fullscreen control to the map:
var map = 'map'fullscreenControl: truefullscreenControlOptions:position: 'topleft';
If your map have a zoomControl the fullscreen button will be added at the bottom of this one.
If your map doesn't have a zoomContron the fullscreen button will be added to topleft corner of the map (same as the zoomcontrol).
If you want to use the plugin on a map embedded in an iframe, don't forget to set
allowfullscreen attribute on your iframe.
Events and options:
// create a fullscreen button and add it to the mapLcontrol;// events are fired when entering or exiting fullscreen.map;map;// you can also toggle fullscreen from map objectmap;
Source code : https://github.com/brunob/leaflet.fullscreen