Click or drag to resize
ArcGISImageServiceLayer Class
Dynamic ArcGIS REST image service layer.
Inheritance Hierarchy

Namespace: Esri.ArcGISRuntime.Layers
Assembly: Esri.ArcGISRuntime (in Esri.ArcGISRuntime.dll) Version: 10.2.7.0 (10.2.7.1234)
Syntax
public sealed class ArcGISImageServiceLayer : DynamicLayer, 
	ICopyright, ILegendSupport

The ArcGISImageServiceLayer type exposes the following members.

Constructors
  NameDescription
Public methodArcGISImageServiceLayer
Initializes a new instance of the ArcGISImageServiceLayer class.
Public methodArcGISImageServiceLayer(Uri)
Initializes a new instance of the ArcGISImageServiceLayer class.
Top
Methods
  NameDescription
Public methodCheckAccess
Determines whether the calling thread has access to this DispatcherObject.
(Inherited from DispatcherObject.)
Public methodClearValue(DependencyProperty)
Clears the local value of a property. The property to be cleared is specified by a DependencyProperty identifier.
(Inherited from DependencyObject.)
Public methodClearValue(DependencyPropertyKey)
Clears the local value of a read-only property. The property to be cleared is specified by a DependencyPropertyKey.
(Inherited from DependencyObject.)
Public methodCoerceValue
Coerces the value of the specified dependency property. This is accomplished by invoking any CoerceValueCallback function specified in property metadata for the dependency property as it exists on the calling DependencyObject.
(Inherited from DependencyObject.)
Public methodEquals
Determines whether a provided DependencyObject is equivalent to the current DependencyObject.
(Inherited from DependencyObject.)
Protected methodFinalize
Finalizes an instance of the ArcGISImageServiceLayer class.
(Overrides ObjectFinalize.)
Public methodGetColorMapAsync
Asynchronous task that returns a color map associated with the image service.
Public methodGetHashCode
Gets a hash code for this DependencyObject.
(Inherited from DependencyObject.)
Public methodGetHistogramsAsync
Asynchronous task that returns the histograms that were published with the image service.
Protected methodGetImageAsync
Overrides the request for returning the image data.
(Overrides DynamicLayerGetImageAsync(DynamicLayerImageParameters, CancellationToken).)
Public methodGetLocalValueEnumerator
Creates a specialized enumerator for determining which dependency properties have locally set values on this DependencyObject.
(Inherited from DependencyObject.)
Public methodGetRasterAttributeTableAsync
Asynchronous task that returns the raster attribute table that were published with the image service.
Public methodGetRasterKeyPropertiesAsync
Asynchronous task that gets the key properties for the raster image.
Public methodGetServiceKeyPropertiesAsync
Asynchronous task that gets the key properties for the image service
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetValue
Returns the current effective value of a dependency property on this instance of a DependencyObject.
(Inherited from DependencyObject.)
Public methodCode exampleInitializeAsync
Loads the metadata for this layer based on the current configuration.
(Inherited from Layer.)
Public methodInvalidate
Causes a refresh of the layer.
(Inherited from DynamicLayer.)
Public methodInvalidateProperty
Re-evaluates the effective value for the specified dependency property
(Inherited from DependencyObject.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodOnInitializeDynamicLayerRequestedAsync
Override this method to initialize any properties and settings prior to using the map.
(Overrides DynamicLayerOnInitializeDynamicLayerRequestedAsync.)
Protected methodOnPropertyChanged(DependencyPropertyChangedEventArgs)
Invoked whenever the effective value of any dependency property on this DependencyObject has been updated. The specific dependency property that changed is reported in the event data.
(Inherited from DependencyObject.)
Protected methodOnPropertyChanged(String)
Notifies listeners that a property value has changed.
(Inherited from Layer.)
Public methodReadLocalValue
Returns the local value of a dependency property, if it exists.
(Inherited from DependencyObject.)
Public methodSetCurrentValue
Sets the value of a dependency property without changing its value source.
(Inherited from DependencyObject.)
Protected methodSetLayerInitializationFailed
status must be failed - if not throw
(Inherited from Layer.)
Protected methodSetLayerStatus
Status cannot be failed or it will throw. To set Status to LayerStatus.Failed, call SetLayerInitializationFailed.
(Inherited from Layer.)
Public methodSetValue(DependencyProperty, Object)
Sets the local value of a dependency property, specified by its dependency property identifier.
(Inherited from DependencyObject.)
Public methodSetValue(DependencyPropertyKey, Object)
Sets the local value of a read-only dependency property, specified by the DependencyPropertyKey identifier of the dependency property.
(Inherited from DependencyObject.)
Protected methodShouldSerializeProperty
Returns a value that indicates whether serialization processes should serialize the value for the provided dependency property.
(Inherited from DependencyObject.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodVerifyAccess
Enforces that the calling thread has access to this DispatcherObject.
(Inherited from DispatcherObject.)
Top
Fields
  NameDescription
Public fieldStatic memberCompressionQualityProperty
Identifies the CompressionQuality Dependency Property
Public fieldStatic memberImageFormatProperty
Identifies the ImageFormat Dependency Property
Public fieldStatic memberInterpolationProperty
Identifies the Interpolation Dependency Property
Public fieldStatic memberNoDataInterpretationProperty
Identifies the NoDataInterpretation Dependency Property
Public fieldStatic memberNoDataProperty
Identifies the NoData Dependency Property
Public fieldStatic memberServiceUriProperty
Identifies the ServiceUri dependency property.
Public fieldStatic memberTokenProperty
Identifies the Token dependency property.
Top
Properties
  NameDescription
Public propertyBandIds
Gets or sets which bands will be displayed (or visible) by the ArcGISImageServiceLayer.
Public propertyBrightness
Gets or sets layer brightness level.
(Inherited from DynamicLayer.)
Public propertyCompressionQuality
Controls how much data loss the image will be subjected to by the compression algorithm. Valid value ranges of compression quality are from 0 to 100.
Public propertyContrast
Gets or sets layer contrast level.
(Inherited from DynamicLayer.)
Public propertyDefaultSpatialReference
Gets the default spatial reference.
(Inherited from Layer.)
Public propertyDependencyObjectType
Gets the DependencyObjectType that wraps the CLR type of this instance. 
(Inherited from DependencyObject.)
Public propertyDispatcher
Gets the Dispatcher this DispatcherObject is associated with.
(Inherited from DispatcherObject.)
Public propertyDisplayName
Gets or sets the display name.
(Inherited from Layer.)
Public propertyFullExtent
Gets the full extent of the layer in it's default spatial reference.
(Inherited from Layer.)
Public propertyGamma
Gets or sets layer gamma level.
(Inherited from DynamicLayer.)
Public propertyID
Gets or sets an ID associated with this layer.
(Inherited from Layer.)
Public propertyImageFormat
Gets or sets the image format for the ArcGISImageServiceLayer.
Public propertyInitializationException
Gets the initialization exception.
(Inherited from Layer.)
Public propertyInterpolation
The resampling process of extrapolating the pixel values while transforming the raster dataset when it undergoes warping or when it changes coordinate space.
Public propertyIsSealed
Gets a value that indicates whether this instance is currently sealed (read-only).
(Inherited from DependencyObject.)
Public propertyIsVisible
Gets or sets the layer visibility.
(Inherited from Layer.)
Public propertyMaxScale
Gets or sets the maximum scale to display this layer at. A small number allows the map to display the layer when zooming further in.
(Inherited from Layer.)
Public propertyMinScale
Gets or sets the minimum scale to render this layer at. A large number allows the map to display the layer when zooming further out.
(Inherited from Layer.)
Public propertyMosaicRule
Gets or sets the mosaic rule.
Public propertyNoData
Gets or sets the image pixel value representing no information for the ArcGISImageServiceLayer.
Public propertyNoDataInterpretation
Gets or sets the no data interpretation. This property defines how transparency should be evaluated for each pixel and each color band based on the NoData value.
Public propertyOpacity
Gets or sets the opacity.
(Inherited from Layer.)
Public propertyCode exampleRenderingRule
Gets or sets the rendering rule which provides a set of predefined raster functions to dynamically change the display of the ArcGISImageServiceLayer.
Public propertyServiceInfo
Service metadata
Public propertyServiceUri
Gets or sets the endpoint of the map service.
Public propertyShowLegend
Gets or sets a value indicating whether this layer should show in a legend
(Inherited from Layer.)
Public propertyStatus
The Layer's Status, indicating whether it is being/has been initialized, or initialization failed.
(Inherited from Layer.)
Public propertyToken
Gets or sets the token used to access a secure ArcGIS service.
Top
Events
  NameDescription
Public eventLegendChanged
Occurs when the legend of the layer changed.
Public eventPropertyChanged
Occurs when a property value changes.
(Inherited from Layer.)
Top
Remarks

Allows developers to work with an Image Service resource exposed by the ArcGIS Server REST API (available in ArcGIS Server 9.3 and above). Image Service web services are optimized for delivering raw or finished imagery that can be RGB, panchromatic, multispectral, or elevation data stored in a geodatabase or file system. Data sources for Image Services can be raster datasets, in formats such as TIFF, MrSID, IMAGINE (IMG), or JPEG2000, as well as raster mosaics.

Examples

Shows adding an ArcGISImageServiceLayer via XAML and code-behind. The ArcGISImageServiceLayer.InitializeAsync Method is used to obtain metadata about the layer (i.e. ID and Description) using the Async/Task framework.

Example of adding an ArcGISImageServiceLayer to a map via XAML and code-behind.

XAML
<Window x:Class="ArcGISImageServiceLayerXamlAndCodeBehind.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="MainWindow" Height="600" Width="800"
    xmlns:esri="http://schemas.esri.com/arcgis/runtime/2013">

    <Grid>
        <StackPanel Orientation="Vertical">
            <StackPanel Orientation="Vertical">

                <!-- TextBlock to provide the instructions on how to use the sample code. It will be 
                populated with instructions in the code-behind when the application loads. -->
                <TextBlock Height="91" HorizontalAlignment="Left" x:Name="TextBlock1" VerticalAlignment="Top" 
                           Width="770" TextWrapping="Wrap"  Margin="10,2,0,0" ><InlineUIContainer>
                  </InlineUIContainer></TextBlock>

            </StackPanel>
            <StackPanel Orientation="Vertical">

                <!-- Button to add an ArcGISImageServiceLayer via code-behind. -->
                <Button Content="Add another ArcGISImageServiceLayer (via code-behind) for the specified Url." 
                        x:Name="Button1" Click="Button1_Click" Width="780" HorizontalAlignment="Left"/>

            </StackPanel>
            <StackPanel Orientation="Horizontal">

                <!-- A MapView Control to display various GIS layers. -->
                <esri:MapView x:Name="MapView1" Width="392" Height="450" VerticalAlignment="Top" Margin="2,2,2,2">

                    <!-- A Map. -->
                    <esri:Map  x:Name="Map1" >

                        <!-- Add an ArcGISImageServiceLayer via Xaml. -->
                        <esri:ArcGISImageServiceLayer ID="CaliforniaDEM" 
                              ServiceUri="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Earthquakes/CaliforniaDEM/ImageServer" />

                    </esri:Map>
                </esri:MapView>

                <StackPanel Orientation="Vertical" >

                    <!-- TextBox to display information about the various layers in the Map. -->
                    <TextBox x:Name="TextBox1" TextWrapping="Wrap" Height="452" Width="379" Margin="2,2,2,2"/>

                </StackPanel>

            </StackPanel>
        </StackPanel>
    </Grid>

</Window>

SPECIAL NOTE: The XAML displayed above comes from a C# project. If you are a VB.NET developer, you will need to modify the text for the x:Class namespace from "ArcGISImageServiceLayerXamlAndCodeBehind.MainWindow" to be just "MainWindow".

namespace ArcGISImageServiceLayerXamlAndCodeBehind
{
    public partial class MainWindow : System.Windows.Window
    {
        public MainWindow()
        {
            // This call is required by the designer.
            InitializeComponent();

            // Add any initialization after the InitializeComponent() call.

            // Provide instructions on how to use the sample. 
            TextBlock1.Text = "When the application loads an ArcGISImageServiceLayer will " + 
                              "automatically be added to the Map (it was specified in XAML). Click the Button to add another " + 
                              "ArcGISimageServiceLayer to the Map (it will be added via code-behind). The ID  and description " + 
                              "information of each layer will displayed in the TextBox.";

            // Create a Geometry based on an Envelope set to a particular extent of Northern California / Oregon using a WebMercator Spatial Reference.
            Esri.ArcGISRuntime.Geometry.Geometry myGeometry = new Esri.ArcGISRuntime.Geometry.Envelope(-14024888, 4467120, -12873427, 5788950, Esri.ArcGISRuntime.Geometry.SpatialReferences.WebMercator);

            // Set the initial extent of the Map using the InitialViewpoint Property to that of our Geometry.
            MapView1.Map.InitialViewpoint = new Esri.ArcGISRuntime.Controls.Viewpoint(myGeometry);

            // Call our custom 'async' function to display information about the ArcGISImageSericeLayer that was added in XAML.
            Init();
        }

        public async void Init()
        {
            // This function will display information about the ArcGISImageServiceLayer that was added in XAML.

            // Get the ArcGISImageServiceLayer by it's index number.        
            Esri.ArcGISRuntime.Layers.ArcGISImageServiceLayer myArcGISImageServiceLayer = (Esri.ArcGISRuntime.Layers.ArcGISImageServiceLayer)MapView1.Map.Layers[0];

            // Initialize the ArcGISImageServiceLayer which allows for obtain various Property information.
            await myArcGISImageServiceLayer.InitializeAsync();

            // Get the ID of the ArcGISImageServiceLayer.
            string myID = myArcGISImageServiceLayer.ID;

            // Create a StringBuilder object to hold information about the ArcGISImageServiceLayer.
            System.Text.StringBuilder myStringBuilder = new System.Text.StringBuilder();

            // Add the ID of the ArcGISImageServiceLayer to the StringBuilder.
            myStringBuilder.Append("The 1st ArcGISImageServiceLayer was added via XAML and it's ID is: " + myID + System.Environment.NewLine);

            // Get the MapServiceInfo details about the ArcGISImageServiceLayer.
            Esri.ArcGISRuntime.ArcGISServices.ImageServiceInfo myImageServiceInfo = myArcGISImageServiceLayer.ServiceInfo;

            // Get the description information about the ArcGISImageServiceLayer and add to the StringBuilder.
            string myDescription = myImageServiceInfo.Description;
            myStringBuilder.Append(myDescription + System.Environment.NewLine);

            // Display the results of the StringBuilder text to the user.
            TextBox1.Text = myStringBuilder.ToString();
        }

        private async void Button1_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            // This function will add an ArcGISImageServiceLayer to the Map via code behind.

            // Create a new Uri that point to an ArcGISImageServiceLayer.
            System.Uri myUri = new System.Uri("http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Portland/CascadeLandsat/ImageServer");

            // Create a new instance of an ArcGISImageServiceLayer.
            Esri.ArcGISRuntime.Layers.ArcGISImageServiceLayer myArcGISImageServiceLayer = null;
            myArcGISImageServiceLayer = new Esri.ArcGISRuntime.Layers.ArcGISImageServiceLayer();

            // Set the Uri and ID of the ArcGISDynamicMapSericveLayer.
            myArcGISImageServiceLayer.ServiceUri = myUri.ToString();
            myArcGISImageServiceLayer.ID = "CascadeLandsat";

            // Add the ArcGISImageServiceLayer to the Map.
            MapView1.Map.Layers.Add(myArcGISImageServiceLayer);

            // Initialize the ArcGISImageServiceLayer which allows for obtain various Property information.
            await myArcGISImageServiceLayer.InitializeAsync();

            // Get the ID of the ArcGISImageServiceLayer.
            string myID = myArcGISImageServiceLayer.ID;

            // Create a StringBuilder object to hold information about the ArcGISImageServiceLayer.
            System.Text.StringBuilder myStringBuilder = new System.Text.StringBuilder();
            myStringBuilder.Append(TextBox1.Text + System.Environment.NewLine);
            myStringBuilder.Append(System.Environment.NewLine);

            // Add the ID of the ArcGISImageServiceLayer to the StringBuilder.
            myStringBuilder.Append("The 2nd ArcGISImageServiceLayer was added via code-behind and it's ID is: " + myID + System.Environment.NewLine);

            // Get the MapServiceInfo details about the ArcGISImageServiceLayer.
            Esri.ArcGISRuntime.ArcGISServices.ImageServiceInfo myImageServiceInfo = myArcGISImageServiceLayer.ServiceInfo;

            // Get the description information about the ArcGISImageServiceLayer and add to the StringBuilder.
            string myDescription = myImageServiceInfo.Description;
            myStringBuilder.Append(myDescription + System.Environment.NewLine);

            // Display the results of the StringBuilder text to the user.
            TextBox1.Text = myStringBuilder.ToString();
        }
    }
}
See Also
Supported Platforms
This type is supported on the following ArcGIS Runtime .NET SDK platforms:
Windows Desktop
Windows Phone
Windows Store
Additional Examples
Hyperlink to ExampleDescription
ArcGISImageServiceLayerWindowShows creating an ArcGIS Image Service Layer and applying rendering rules.
ArcGISImageServiceLayerXamlAndCodeBehindShows adding an ArcGISImageServiceLayer via XAML and code-behind. The ArcGISImageServiceLayer.InitializeAsync Method is used to obtain metadata about the layer (i.e. ID and Description) using the Async/Task framework.
MultipleMapsInMapViewDemonstrates switching out different Map objects (with different layers) for the MapView.Map Property.