-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
source option added to ol.control.FullScreen including an example
- Loading branch information
Yashar Moradi
committed
Jan 26, 2016
1 parent
682e65f
commit 299a628
Showing
5 changed files
with
112 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
.fullscreen:-moz-full-screen { | ||
height: 100%; | ||
} | ||
.fullscreen:-webkit-full-screen { | ||
height: 100%; | ||
} | ||
.fullscreen:-ms-fullscreen { | ||
height: 100%; | ||
} | ||
|
||
.fullscreen:fullscreen { | ||
height: 100%; | ||
} | ||
|
||
.fullscreen { | ||
margin-bottom: 10px; | ||
width: 100%; | ||
height: 400px; | ||
} | ||
|
||
.ol-rotate { | ||
top: 3em; | ||
} | ||
|
||
.map { | ||
width: 80%; | ||
height: 100%; | ||
float: left; | ||
} | ||
|
||
.sidepanel { | ||
background: #1F6B75; | ||
width: 20%; | ||
height: 100%; | ||
float: left; | ||
} | ||
|
||
.sidepanel-title { | ||
width: 100%; | ||
font-size: 3em; | ||
color: #ffffff; | ||
display: block; | ||
text-align: center; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
layout: example.html | ||
title: Full Screen Control with extended source element | ||
shortdesc: Example of a full screen control with a source option definition. | ||
docs: > | ||
<p>Click the control in the top right corner to go full screen. Click it again to exit full screen.</p> | ||
<p>If there is no button on the map, your browser does not support the <a href="http://caniuse.com/#feat=fullscreen">Full Screen API</a>.</p> | ||
tags: "full-screen, source, fullScreenSource, osm, osm-maps" | ||
--- | ||
<div id="fullscreen" class="fullscreen"> | ||
<div id="map" class="map"></div> | ||
<div class="sidepanel"> | ||
<span class="sidepanel-title">Side Panel</span> | ||
</div> | ||
</div> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
goog.require('ol.Map'); | ||
goog.require('ol.View'); | ||
goog.require('ol.control'); | ||
goog.require('ol.control.FullScreen'); | ||
goog.require('ol.layer.Tile'); | ||
goog.require('ol.source.OSM'); | ||
|
||
|
||
var view = new ol.View({ | ||
center: [-9101767, 2822912], | ||
zoom: 14 | ||
}); | ||
|
||
var map = new ol.Map({ | ||
controls: ol.control.defaults().extend([ | ||
new ol.control.FullScreen({ | ||
source: 'fullscreen' | ||
}) | ||
]), | ||
layers: [ | ||
new ol.layer.Tile({ | ||
source: new ol.source.OSM() | ||
}) | ||
], | ||
renderer: common.getRendererFromQueryString(), | ||
target: 'map', | ||
view: view | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters