Add simple full screen example
This commit is contained in:
21
examples/full-screen.html
Normal file
21
examples/full-screen.html
Normal 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
14
examples/full-screen.js
Normal 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
|
||||
});
|
||||
Reference in New Issue
Block a user