java.lang.Object | |||
↳ | com.esri.android.map.Layer | ||
↳ | com.esri.android.map.DynamicLayer | ||
↳ | com.esri.android.map.ags.ArcGISImageServiceLayer |
The ArcGISImageServiceLayer class allows you to work with an image service resource that is exposed by the ArcGIS Server REST API (see the system requirements document for supported versions of ArcGIS Server). A image service generates map images on the server each time a request comes in.
The following are examples of how you might work with the ArcGISImageServiceLayer class. The code will add a map
service from ArcGIS Online using map services that are dynamically retrieved. When working with dynamic services the
ArcGISImageServiceLayer class must be used. This example code shows you how to connect to ArcGIS Online, but you can
easily update the code to point to your own ArcGIS Server REST end points. Java usage:
//ArcGISImageServiceLayer class is used to define the Layer that is added to the
//MapView object.
MapView mv = new MapView(this);
mv.addLayer(new ArcGISImageServiceLayer(
"http://myserver/arcgis/rest/services/MyImage/ImageServer",null));
setContentView(mv);
[Expand]
Inherited Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.esri.android.map.DynamicLayer
| |||||||||||
From class
com.esri.android.map.Layer
|
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ArcGISImageServiceLayer(String url, ImageServiceParameters options)
This constructor is used if you're instantiating the ArcGISImageServiceLayer.
| |||||||||||
ArcGISImageServiceLayer(String url, ImageServiceParameters options, UserCredentials credentials, boolean initLayer)
This constructor is used if you instantiate an ArcGISImageServiceLayer object.
| |||||||||||
ArcGISImageServiceLayer(String url, ImageServiceParameters options, UserCredentials credentials)
This constructor is used if you're instantiating the ArcGISImageServiceLayer (see the class description for an
example of this usage).
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
int |
getBandCount()
Gets the number of bands in the ArcGISImageServiceLayer.
| ||||||||||
int[] |
getBandIds()
Gets ImageService Band IDs.
| ||||||||||
int |
getCompressionQuality()
Gets the compression quality of the exported image.
| ||||||||||
String |
getCopyrightText()
Gets the copyright information of the ArcGISImageServiceLayer.
| ||||||||||
ImageServiceParameters.IMAGE_FORMAT |
getImageFormat()
Gets the image format.
| ||||||||||
ImageServiceParameters.RSP |
getInterpolation()
Gets the interpolation method.
| ||||||||||
MosaicRule |
getMosaicRule()
Gets the mosaic rule of the layer.
| ||||||||||
ImageServiceParameters |
getOptions()
Gets the options of the ArcGISImageServiceLayer.
| ||||||||||
double |
getPixelSizeX()
Gets the size of pixel in X direction.
| ||||||||||
double |
getPixelSizeY()
Gets the size of pixel in Y direction.
| ||||||||||
ImageServiceParameters.PIXEL_TYPE |
getPixelType()
Gets the pixel type of the image service.
| ||||||||||
RasterFunction |
getRenderingRule()
Gets the rendering rule of the layer.
| ||||||||||
void |
setBandIds(int[] bandIds)
Sets the R,G,B of the exported image to the appropriate ImageService Band ID.
| ||||||||||
void |
setCompressionQuality(int compressionQuality)
Sets the compression quality of the exported image.
| ||||||||||
void |
setImageFormat(ImageServiceParameters.IMAGE_FORMAT format)
Sets the image format.
| ||||||||||
void |
setInterpolation(ImageServiceParameters.RSP interpolation)
Sets the interpolation method.
| ||||||||||
void |
setMosaicRule(MosaicRule mosaicRule)
Sets the mosaic rule of the layer to the specified value.
| ||||||||||
void |
setRenderingRule(RasterFunction renderingRule)
Sets the rendering rule of the layer to the given value.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
byte[] | getImage(int width, int height, Envelope extent) | ||||||||||
void |
initLayer()
Initializes the layer.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.esri.android.map.DynamicLayer
| |||||||||||
From class
com.esri.android.map.Layer
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
com.esri.android.map.popup.PopupLayer
|
This constructor is used if you're instantiating the ArcGISImageServiceLayer.
url | the URL of the dynamic map service. |
---|---|
options | optional parameters. |
This constructor is used if you instantiate an ArcGISImageServiceLayer object.
url | the URL of the dynamic map service. |
---|---|
options | optional parameters. |
credentials | the credentials |
initLayer | set to true to initialize the the layer, or the layer will not initialized. |
This constructor is used if you're instantiating the ArcGISImageServiceLayer (see the class description for an example of this usage).
url | the URL of the image map service. |
---|---|
options | optional parameters. |
credentials | the credentials |
Gets the number of bands in the ArcGISImageServiceLayer. The BandCount is defined in the associated service. You should not invoke the method unless the layer is initialized.
Gets ImageService Band IDs. BandIds are zero based.
Gets the compression quality of the exported image. Only valid with JPG image format.
Gets the copyright information of the ArcGISImageServiceLayer. The text is defined in the associated service. You should not invoke the method unless the layer is initialized.
Gets the image format.
Gets the interpolation method. The interpolation method affects how the raster dataset is transformed when it undergoes warping or when it changes coordinate space.
Gets the mosaic rule of the layer. The mosaic rule defines how individual images should be mosaicked.
Gets the options of the ArcGISImageServiceLayer.
Gets the size of pixel in X direction. The size is defined in the associated service. You should not invoke the method unless the layer is initialized.
Gets the size of pixel in Y direction. The size is defined in the associated service. You should not invoke the method unless the layer is initialized.
Gets the pixel type of the image service. Pertains to the type of values stored in the raster, such as signed integer, unsigned integer, or floating point. Integers are whole numbers, whereas floating points have decimals. The type is defined in the associated service. You should not invoke the method unless the layer is initialized.
Gets the rendering rule of the layer.
Sets the R,G,B of the exported image to the appropriate ImageService Band ID. BandIds are zero based. You need to
call refresh()
to reflect changes of the band ids.
bandIds | the new band ids. |
---|
Sets the compression quality of the exported image. Only valid with JPG image format.You need to call
compressionQuality | A value from 0 to 100. 100 is best quality but largest in file size.
refresh() to reflect changes of the compression quality.
|
---|
Sets the image format. You need to call refresh()
to reflect changes of the format.
format | the new image format. |
---|
Sets the interpolation method. The interpolation method affects how the raster dataset is transformed when it
undergoes warping or when it changes coordinate space. You need to call refresh()
to reflect changes of
the interpolation value.
interpolation | the new interpolation value. |
---|
Sets the mosaic rule of the layer to the specified value. The mosaic rule defines how individual images should be
mosaicked. You need to call refresh()
to reflect changes of the MosaicRule.
mosaicRule | the mosaic rule. |
---|
Sets the rendering rule of the layer to the given value. You need to call refresh()
to reflect changes of
the rendering rule.
renderingRule | the new rendering rule. |
---|
Initializes the layer. The implementation should submit the OnStatusChangedListener.STATUS
event accordingly.