Created
January 10, 2014 08:20
-
-
Save acanimal/8348529 to your computer and use it in GitHub Desktop.
Full screen OpenLayers3 sample
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<link rel="stylesheet" href="http://ol3js.org/en/master/build/ol.css" type="text/css"> | |
<style> | |
html, body { | |
width: 100%; | |
height: 100%; | |
} | |
body { | |
margin: 0px; | |
overflow: hidden; | |
} | |
.map { | |
height: 100%; | |
width: 100%; | |
} | |
</style> | |
<script src="http://ol3js.org/en/master/build/ol.js" type="text/javascript"></script> | |
<title>OpenLayers 3 example</title> | |
</head> | |
<body> | |
<div id="map" class="map"></div> | |
<script type="text/javascript"> | |
var map = new ol.Map({ | |
target: 'map', | |
layers: [ | |
new ol.layer.Tile({ | |
//source: new ol.source.MapQuestOpenAerial() | |
source: new ol.source.MapQuest({layer: 'sat'}) | |
}) | |
], | |
view: new ol.View2D({ | |
center: ol.proj.transform([37.41, 8.82], 'EPSG:4326', 'EPSG:3857'), | |
zoom: 4 | |
}) | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment