Skip to content

Instantly share code, notes, and snippets.

@aaizemberg
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aaizemberg/9677636 to your computer and use it in GitHub Desktop.
Save aaizemberg/9677636 to your computer and use it in GitHub Desktop.
world colormap (using ol3js)
<!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