Hide Table of Contents
View Image service sample in sandbox
Image service


This sample shows how to add an ArcGISImageServiceLayer to the map. An ImageServiceParameters object is created and the default format and noData options are specified. View the ImageServiceParameters help topic for details on additional options.

Note that the noDate option is set to 0, setting this allows the underlying basemap to show through in areas where the image service contains no data.


<!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>Simple Image Service</title>
    <link rel="stylesheet" href="https://js.arcgis.com/3.46/esri/css/esri.css" />

      html, body, #map { height: 100%; width: 100%; margin: 0; padding: 0; }

    <script src="https://js.arcgis.com/3.46/"></script>
      var map;
        "esri/map", "esri/layers/ArcGISImageServiceLayer",
        "esri/layers/ImageServiceParameters", "dojo/parser", "dojo/domReady!"
      ], function(
        Map, ArcGISImageServiceLayer,
        ImageServiceParameters, parser
      ) {

        map = new Map("map", {
          basemap: "topo-vector",
          center: [-79.40, 43.64],
          zoom: 12

        var params = new ImageServiceParameters();
        params.noData = 0;
        var imageServiceLayer = new ArcGISImageServiceLayer("https://sampleserver6.arcgisonline.com/arcgis/rest/services/Toronto/ImageServer", {
          imageServiceParameters: params,
          opacity: 0.75

    <div id="map"> </div>

Show Modal