View Rotation

Example of a rotated map.

Use Alt+Shift+Drag to rotate the map.

<!DOCTYPE html>
    <title>View Rotation</title>
    <link rel="stylesheet" href="" type="text/css">
    <!-- The line below is only needed for old environments like Internet Explorer and Android 4.x -->
    <script src=",Element.prototype.classList,URL"></script>

    <div id="map" class="map"></div>
      import Map from 'ol/Map.js';
      import View from 'ol/View.js';
      import TileLayer from 'ol/layer/Tile.js';
      import OSM from 'ol/source/OSM.js';

      var map = new Map({
        layers: [
          new TileLayer({
            source: new OSM()
        target: 'map',
        view: new View({
          center: [14200000, 4130000],
          rotation: Math.PI / 6,
          zoom: 10