OL_3_Quick_Start

Base on http://openlayers.org/en/v3.12.1/doc/quickstart.html HTTP only !

by Thibault Coupin

HTML

<link rel="stylesheet" href="http://openlayers.org/en/v3.12.1/css/ol.css">
<script src="http://openlayers.org/en/v3.12.1/build/ol.js"></script>
<div id="map" class="map"></div>

CSS

.map {
  height: 400px;
  width: 100%;
  border: solid;
}

JavaScript

var map = new ol.Map({
   target: 'map',
   layers: [
     new ol.layer.Tile({
       source: new ol.source.MapQuest({
         layer: 'sat'
       })
     })
   ],
   view: new ol.View({
     center: ol.proj.fromLonLat([2.424, 48.845]),
     zoom: 10
   })
 });