summaryrefslogtreecommitdiff
path: root/www/wiki/extensions/Maps/resources/leaflet/leaflet.fullscreen/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'www/wiki/extensions/Maps/resources/leaflet/leaflet.fullscreen/index.html')
-rw-r--r--www/wiki/extensions/Maps/resources/leaflet/leaflet.fullscreen/index.html48
1 files changed, 48 insertions, 0 deletions
diff --git a/www/wiki/extensions/Maps/resources/leaflet/leaflet.fullscreen/index.html b/www/wiki/extensions/Maps/resources/leaflet/leaflet.fullscreen/index.html
new file mode 100644
index 00000000..87b345c4
--- /dev/null
+++ b/www/wiki/extensions/Maps/resources/leaflet/leaflet.fullscreen/index.html
@@ -0,0 +1,48 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <meta charset='utf-8'>
+ <title>Leaflet.Control.FullScreen Demo</title>
+ <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7/leaflet.css" />
+ <style type="text/css">
+ #map { width: 700px; height: 433px; }
+ .leaflet-control-zoom-fullscreen { background-image: url(icon-fullscreen.png); }
+ /* on selector per rule as explained here : http://www.sitepoint.com/html5-full-screen-api/ */
+ #map:-webkit-full-screen { width: 100% !important; height: 100% !important; z-index: 99999; }
+ #map:-moz-full-screen { width: 100% !important; height: 100% !important; z-index: 99999; }
+ #map:full-screen { width: 100% !important; height: 100% !important; z-index: 99999; }
+ .leaflet-pseudo-fullscreen { position: fixed !important; width: 100% !important; height: 100% !important; top: 0px !important; left: 0px !important; z-index: 99999; }
+ </style>
+ <script src="http://cdn.leafletjs.com/leaflet-0.7/leaflet.js"></script>
+ <script src="Control.FullScreen.js"></script>
+</head>
+<body>
+
+ <div id="map"></div>
+
+ <script>
+ var base = new L.TileLayer('http://{s}.www.toolserver.org/tiles/bw-mapnik/{z}/{x}/{y}.png', {
+ maxZoom: 18,
+ attribution: '&copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>'
+ });
+
+ var map = new L.Map('map', {
+ layers: [base],
+ center: new L.LatLng(48.5, -4.5),
+ zoom: 5,
+ fullscreenControl: true,
+ fullscreenControlOptions: { // optional
+ title:"Show me the fullscreen !"
+ }
+ });
+
+ // detect fullscreen toggling
+ map.on('enterFullscreen', function(){
+ if(window.console) window.console.log('enterFullscreen');
+ });
+ map.on('exitFullscreen', function(){
+ if(window.console) window.console.log('exitFullscreen');
+ });
+ </script>
+</body>
+</html>