Add simple full screen example

This commit is contained in:
Tom Payne
2012-09-29 12:03:16 +02:00
parent ea95ca4918
commit 2341e8cd8f
2 changed files with 35 additions and 0 deletions

21
examples/full-screen.html Normal file
View File

@@ -0,0 +1,21 @@
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
<link rel="stylesheet" href="style.css" type="text/css">
<style type="text/css">
html, body, #map {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
}
</style>
<link rel="stylesheet" href="../css/ol.css" type="text/css">
<title>ol3 full-screen demo</title>
</head>
<body>
<div id="map"></div>
<script src="loader.js?id=full-screen" type="text/javascript"></script>
</body>
</html>

14
examples/full-screen.js Normal file
View File

@@ -0,0 +1,14 @@
goog.require('ol.Collection');
goog.require('ol.Coordinate');
goog.require('ol.Map');
goog.require('ol.source.MapQuestOpenAerial');
var layer = new ol.layer.TileLayer({
source: new ol.source.MapQuestOpenAerial()
});
var map = new ol.Map(document.getElementById('map'), {
center: new ol.Coordinate(0, 0),
layers: new ol.Collection([layer]),
zoom: 2
});