index.html
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="//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="//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: '//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>