|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.esri.map.Layer
com.esri.map.DynamicLayer
com.esri.map.ArcGISDynamicMapServiceLayer
public class ArcGISDynamicMapServiceLayer

An implementation of an ArcGIS Dynamic Map Service. A Map server provides all the meta-data about the service. This class draws to a JComponent graphics context (JMap) and to an in-memory image graphics context (JMap, Map) Additionally, it also draws its contents to an in-memory image maintained within this class for quick redraws of the contents of this individual layer if the state of the layer hasn't changed during a draw operation A dynamic layer supports on-the-fly projection to the spatial reference of the base layer of the JMap. Dynamic layers support the notion of sub-layers that can be turned on/off.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class com.esri.map.Layer |
|---|
Layer.LayerStatus |
| Field Summary |
|---|
| Fields inherited from class com.esri.map.DynamicLayer |
|---|
_nativeCreateSpatialRef |
| Fields inherited from class com.esri.map.Layer |
|---|
_credentials, _progress, _resolutionList, serviceInfo |
| Constructor Summary | |
|---|---|
ArcGISDynamicMapServiceLayer()
Default constructor. |
|
ArcGISDynamicMapServiceLayer(String url)
Constructs the dynamic map service layer with a URL to the service end point. |
|
ArcGISDynamicMapServiceLayer(String url,
GPJobResource gpJobResource)
Construct a dynamic map service layer for a geoprocessing result map service. |
|
ArcGISDynamicMapServiceLayer(String url,
GPJobResource gpJobResource,
int parameterIndex)
Construct a dynamic map service layer for a geoprocessing result map service. |
|
ArcGISDynamicMapServiceLayer(String url,
UserCredentials credentials)
Constructs a layer from a URL and credentials for the secure service. |
|
| Method Summary | |
|---|---|
protected void |
createResolutionList(TileInfo tileInfo)
Creates the resolution list. |
DynamicLayerInfoCollection |
getDynamicLayerInfos()
If this dynamic map service layer supports dynamic layer functionality, this method will return a list of DynamicLayerInfos that can be used to modify the renderer and data source of each layer in the service. |
HashMap<String,LayerInfo> |
getLayers()
Gets the top level sub-layers of this map service. |
Collection<LayerInfo> |
getLayersList()
Gets all the sub-layers of this map service as a flat list of LayerInfo instances. |
LayerLegendInfoCollection |
getLegend()
|
ArcGISPopupInfo |
getPopupInfo(int sublayerId)
|
LayerInfo |
getSubLayer(int id)
Gets a info on a sub-layer. |
LayerInfo |
getSubLayer(String name)
Gets a info on a sub-layer. |
protected boolean |
getSubLayersVisibility(StringBuilder ex,
boolean started,
Collection<LayerInfo> layerInfoList)
Used to generate a list of layer IDs for layers that should be hidden. |
TimeExtent |
getTimeExtent()
Gets the valid TimeExtent object for the Layer or null if this service does not support time based queries. |
TimeInfo |
getTimeInfo()
Get all the time awareness information for this layer. |
TimeExtent |
getTimeInterval()
Get the current date/time range that this layer is filtered by. |
LayerTimeOptionsCollection |
getTimeOptions()
This method will return a list of. |
protected void |
init(boolean isVisible,
int[] visibleLayers,
String title,
float opacity)
This method is called only when composing a Map from a Web Map. |
protected void |
internalInit()
|
boolean |
isDynamicLayersSupported()
Indicates whether or not this dynamic map service layer supports dynamic layer functionality; that is the ability to change a layer's renderer and data source. |
protected boolean |
isReadyToDraw()
Returns true if the layer is ready for draw to be called. |
boolean |
isTimeAware()
Indicates whether or not this dynamic map service layer belongs to a service which is time aware. |
void |
setDynamicLayerInfos(DynamicLayerInfoCollection dynamicLayerInfos)
Set a list of DynamicLayerInfo instances that will be used to change the renderers and datasources of
sub-layers of this dynamic map service. |
void |
setTimeInterval(TimeExtent timeInterval)
Set the current date/time range that this layer will be filtered by. |
void |
setTimeOptions(LayerTimeOptionsCollection timeOptions)
Set a list of LayerTimeOptions. |
| Methods inherited from class com.esri.map.DynamicLayer |
|---|
createNativeLayer, getCenterMeridian, getDefaultSpatialReference, getResolution, initializeNativeLayer, isCrossesDateline, refresh, requestImage, setUrl, startlisteningToMapEvents, stopListeningToMapEvents |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ArcGISDynamicMapServiceLayer(String url)
url - the URL to the service.
public ArcGISDynamicMapServiceLayer(String url,
UserCredentials credentials)
url - the URLcredentials - the credentialspublic ArcGISDynamicMapServiceLayer()
public ArcGISDynamicMapServiceLayer(String url,
GPJobResource gpJobResource,
int parameterIndex)
url - URL of service with the result we want to displaygpJobResource - A GPJobResource from a completed geoprocessor taskparameterIndex - Index of parameter we wish to display the result for
public ArcGISDynamicMapServiceLayer(String url,
GPJobResource gpJobResource)
url - URL of service with the result we want to displaygpJobResource - A GPJobResource from a completed geoprocessor task| Method Detail |
|---|
protected void internalInit()
internalInit in class Layerprotected void createResolutionList(TileInfo tileInfo)
tileInfo - the tile infopublic HashMap<String,LayerInfo> getLayers()
public Collection<LayerInfo> getLayersList()
public LayerInfo getSubLayer(String name)
name - Layer name.
public LayerInfo getSubLayer(int id)
id - Layer ID.
public boolean isDynamicLayersSupported()
public boolean isTimeAware()
isTimeAware in interface TimeAwareLayerpublic DynamicLayerInfoCollection getDynamicLayerInfos()
DynamicLayerInfos that can be used to modify the renderer and data source of each layer in the service. If
this property has not been previously set by the user, the returned list will contain a
DynamicLayerInfo instance for each sub-layer in the service.
DynamicLayerInfo instances if dynamic layer functionality is supported, null
otherwisepublic void setDynamicLayerInfos(DynamicLayerInfoCollection dynamicLayerInfos)
DynamicLayerInfo instances that will be used to change the renderers and datasources of
sub-layers of this dynamic map service. Note that this property only works if
dynamicLayerInfos - a list of DynamicLayerInfo instances isDynamicLayersSupported()
returns true. The layers will be rendered in the dynamic map service in the same order as the entries in
this list with the first item at the top and the last item at the bottom.
Items in this list will reflect the current sub-layer visibility settings; any layer marked as invisible
will not render. Any layer marked as visible that doesn't have a corresponding
DynamicLayerInfo instance will be drawn below the other layers using the service default
renderer and data source.public LayerLegendInfoCollection getLegend()
getLegend in class Layerpublic LayerTimeOptionsCollection getTimeOptions()
LayerTimeOptions
that can be used to indicate whether or not each layer should use the time extent specified by the
TimeInterval property or not, whether to draw the layer features cumulatively or not and the time offsets
for the layer. If this property has not been previously set by the user, the returned list will contain a
LayerTimeOptions instance for each sub-layer in the service.public void setTimeOptions(LayerTimeOptionsCollection timeOptions)
LayerTimeOptions. There should be one option for each layer you wish to set the time options
for.
timeOptions - list of LayerTimeOptions to apply to this layerpublic TimeExtent getTimeExtent()
TimeAwareLayer
getTimeExtent in interface TimeAwareLayerpublic TimeExtent getTimeInterval()
TimeAwareLayer
getTimeInterval in interface TimeAwareLayerpublic void setTimeInterval(TimeExtent timeInterval)
TimeAwareLayer
setTimeInterval in interface TimeAwareLayertimeInterval - the new date/time rangepublic TimeInfo getTimeInfo()
TimeAwareLayer
getTimeInfo in interface TimeAwareLayerpublic ArcGISPopupInfo getPopupInfo(int sublayerId)
getPopupInfo in class Layerprotected boolean isReadyToDraw()
protected boolean getSubLayersVisibility(StringBuilder ex,
boolean started,
Collection<LayerInfo> layerInfoList)
ex - this will contain the list of hidden layersstarted - true if we've started the list of hidden layerslayerInfoList - list of layers we are checking the visibility of
protected void init(boolean isVisible,
int[] visibleLayers,
String title,
float opacity)
Layer
init in class Layer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||