Crater Lake National Park

NPMap

Digital maps for the National Park Service

ArcGisServerRest Layer (Tiled)

This example shows how you can easily add a "tiled" ArcGisServerRest layer to an NPMap web map. When you add an ArcGisServerRest layer to a NPMap web map, you get display and identify support out of the box.

This example adds an ArcGisServerRest layer via the baseLayers config. You can also add ArcGisServerRest layers via the layers config.

 

Related resources:

Map

Code


<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
  </head>
  <body>
    <div id="example-map" style="height:500px;position:absolute;width:500px;">
    </div>
    <script>
      var NPMap = NPMap || {};
      
      NPMap.config = {
        api: 'bing',
        baseLayers: [{
          attribution: 'Esri',
          identify: false,
          layers: 'all',
          name: 'Ocean Basemap',
          tiled: true,
          type: 'ArcGisServerRest',
          url: 'http://services.arcgisonline.com/ArcGIS/rest/services/Ocean_Basemap/MapServer'
        }],
        div: 'example-map'
      };
      
      (function() {
        var s = document.createElement('script');
        s.src = 'http://www.nps.gov/npmap/1.0.0/bootstrap.js';
        document.body.appendChild(s);
      })();
    </script>
  </body>
</html>