Hide Table of Contents
View WMTS layer sample in sandbox
WMTS layer


At version 2.4 of the ArcGIS API for JavaScript a class esri.layers.WMTSLayer was added to the API. This sample shows how to use the WMTSLayer class to add an OGC Web Map Tiled Service layer to the map. The default behavior of a WMTSLayer is to execute a WMTS GetCapabilities request, which requires using a proxy page.

View the WMTS Layer-Resource Info sample for an example that shows how to specify the resource info so a proxy is not required.


<!DOCTYPE html>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  <meta name="viewport" content="initial-scale=1, maximum-scale=1,user-scalable=no">
  <title>Add WMTS Layer</title>

  <link rel="stylesheet" href="https://js.arcgis.com/3.46/esri/css/esri.css">
  #map {
    height: 100%;
    width: 100%;
    margin: 0;
    padding: 0;

  #citationInfo {
    position: absolute;
    font-weight: bold;
    font-size: 12pt;
    left: 10px;
    bottom: 10px;
    z-Index: 999;

  <script src="https://js.arcgis.com/3.46/"></script>
      "esri/map", "esri/layers/WMTSLayer", "esri/layers/WMTSLayerInfo",
    ], function(
      Map, WMTSLayer, WMTSLayerInfo,
    ) {
      var map = new Map("map", {
        center: [86.9, 28],//27.988056, 86.925
        zoom: 3

      var layerInfo = new WMTSLayerInfo({
        identifier: "SRTM_Color_Index",
        tileMatrixSet: "31.25m",
        format: "png"
      var options = {
        layerInfo: layerInfo
      var wmtsLayer = new WMTSLayer("https://gibs.earthdata.nasa.gov/wmts/epsg4326/best", options);

  <div id="map">
    <div id="citationInfo">
      <a target='_top' href='https://earthdata.nasa.gov'>Earthdata</a> by
      <a target='_top' href='https://www.nasa.gov'>NASA</a>
Show Modal