Last active
August 29, 2015 13:57
-
-
Save aaizemberg/9677636 to your computer and use it in GitHub Desktop.
world colormap (using ol3js)
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> | |
<head> | |
<link rel="stylesheet" href="http://ol3js.org/en/master/css/ol.css" type="text/css"> | |
<style> | |
.map { | |
height: 600px; | |
width: 100%; | |
} | |
</style> | |
<meta charset="utf-8"> | |
<title>world colormap</title> | |
<script src="http://ol3js.org/en/master/build/ol.js" type="text/javascript"></script> | |
</head> | |
<body> | |
<div id="map" class="map"></div> | |
<script> | |
var rasterLayer = new ol.layer.Tile({ | |
source: new ol.source.TileJSON({ | |
url: 'http://api.tiles.mapbox.com/v3/mapbox.geography-class.jsonp' | |
}) | |
}); | |
var map = new ol.Map({ | |
layers: [rasterLayer], | |
renderer: 'canvas', | |
target: document.getElementById('map'), | |
view: new ol.View2D({ | |
center: [0, 0], | |
zoom: 2 | |
}) | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment