<div id="map">
var layer = new ol.layer.Tile({
        source: new ol.source.OSM()
      var london = ol.proj.transform([-0.12755, 51.507222], 'EPSG:4326', 'EPSG:3857');
      var view = new ol.View({
        center: london,
        zoom: 6
      // the renderer property can be set to 'canvas', 'dom' or 'webgl'
      var map = new ol.Map({
        renderer: 'webgl',
        target: 'map',
        layers: [layer],
        controls: ol.control.defaults({
          zoom: true,
          attribution: true,
          rotate: false
        view: view

External CSS

  1. https://cdn.jsdelivr.net/gh/openlayers/[email protected]/en/v6.5.0/css/ol.css

External JavaScript

  1. https://cdnjs.cloudflare.com/ajax/libs/ol3/4.6.5/ol.js
  2. https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js