XYZ Esri

Example of a XYZ source using Esri tiles.

ArcGIS REST tile services are supported by ol.source.XYZ.

<!DOCTYPE html>
    <title>XYZ Esri</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>
    <script src=""></script>
    <div id="map" class="map"></div>
      var map = new ol.Map({
        target: 'map',
        layers: [
          new ol.layer.Tile({
            source: new ol.source.XYZ({
              attributions: 'Tiles © <a href="' +
              url: '' +
        view: new ol.View({
          center: ol.proj.fromLonLat([-121.1, 47.5]),
          zoom: 7