com.esri.android.map
Class DynamicLayer

java.lang.Object
  extended by com.esri.android.map.Layer
      extended by com.esri.android.map.DynamicLayer
Direct Known Subclasses:
ArcGISDynamicMapServiceLayer, ArcGISImageServiceLayer

public abstract class DynamicLayer
extends Layer

DynamicLayer is the base class for all map services that contain dynamic layers and can be added to a map. You would work with one of the sub-classes of this abstract class. (for example, ArcGISDynamicMapServiceLayer - used to represent map services that contain dynamic layers).


Field Summary
 
Fields inherited from class com.esri.android.map.Layer
credentials, nativeHandle, popUpInfos, serviceInfo
 
Constructor Summary
DynamicLayer(String url)
          Constructs a dynamic layer from the service URL.
 
Method Summary
 void cancelPendingTasks()
          Cancel pending tasks.
protected  long create()
           
 float getBrightness()
          Gets the brightness of the DynamicLayer.
 float getContrast()
          Gets the contrast of the DynamicLayer.
 float getGamma()
          Gets the gamma of the DynamicLayer.
protected abstract  byte[] getImage(int width, int height, Envelope extent)
           
protected  void getImageAsych(int w, int h, Envelope extent, CallbackListener<byte[]> imagecallback)
           
protected  void initLayer()
          Initializes the layer.
 void recycle()
          Releases resources referenced by the Layer so that they can be recycled.
 void refresh()
          Invoke this method to fetch the map image from the associated map service and update the MapView.
protected  void requestImage(int width, int height, double minx, double miny, double maxx, double maxy)
           
 void setBrightness(float brightness)
          Sets the brightness of the DynamicLayer.
 void setContrast(float contrast)
          Sets the contrast of the DynamicLayer.
 void setGamma(float gamma)
          Sets the gamma of the DynamicLayer.
 
Methods inherited from class com.esri.android.map.Layer
changeStatus, finalize, getCredentials, getDefaultSpatialReference, getDpi, getExtent, getFullExtent, getHeight, getID, getInitialExtent, getName, getOpacity, getParent, getPoolExecutor, getPopupInfo, getQueryUrl, getResolution, getServiceExecutor, getSpatialReference, getTitle, getUrl, getUrlHashCode, getWidth, isInitialized, isRecycled, isShowLegend, isVisible, isWebMapBaselayer, loadServiceInfo, lock, reinitializeLayer, setCredentials, setDefaultSpatialReference, setFullExtent, setInitialExtent, setName, setOnStatusChangedListener, setOpacity, setPopupInfos, setQueryUrls, setUrl, setVisible, unlock, updateSpatialReferenceStatus, verifyCredentials
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DynamicLayer

public DynamicLayer(String url)
Constructs a dynamic layer from the service URL.

Parameters:
url - a service URL
Since:
1.0
Method Detail

getImage

protected abstract byte[] getImage(int width,
                                   int height,
                                   Envelope extent)
                            throws Exception
Throws:
Exception

getImageAsych

protected void getImageAsych(int w,
                             int h,
                             Envelope extent,
                             CallbackListener<byte[]> imagecallback)

recycle

public void recycle()
Description copied from class: Layer
Releases resources referenced by the Layer so that they can be recycled.

Overrides:
recycle in class Layer

cancelPendingTasks

public void cancelPendingTasks()
Cancel pending tasks.

Since:
1.0

create

protected long create()
Specified by:
create in class Layer

initLayer

protected void initLayer()
Description copied from class: Layer
Initializes the layer. The implementation should submit the OnStatusChangedListener.STATUS event accordingly.

Specified by:
initLayer in class Layer

getBrightness

public float getBrightness()
Gets the brightness of the DynamicLayer.

Returns:
Returns the brightness.
Since:
1.0

setBrightness

public void setBrightness(float brightness)
Sets the brightness of the DynamicLayer.

Parameters:
brightness - The brightness to set.
Since:
1.0

getContrast

public float getContrast()
Gets the contrast of the DynamicLayer.

Returns:
Returns the contrast.
Since:
1.0

setContrast

public void setContrast(float contrast)
Sets the contrast of the DynamicLayer.

Parameters:
contrast - The contrast to set.
Since:
1.0

getGamma

public float getGamma()
Gets the gamma of the DynamicLayer.

Returns:
Returns the gamma.
Since:
1.0

setGamma

public void setGamma(float gamma)
Sets the gamma of the DynamicLayer.

Parameters:
gamma - The gamma to set.
Since:
1.0

requestImage

protected void requestImage(int width,
                            int height,
                            double minx,
                            double miny,
                            double maxx,
                            double maxy)

refresh

public void refresh()
Invoke this method to fetch the map image from the associated map service and update the MapView.

Since:
1.0


Copyright © 2010. All Rights Reserved.