|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.core.internal.value.DynamicLayerInfoCollection
public class DynamicLayerInfoCollection
This class maintains a collection of DynamicLayerInfo
instances. Each
instance allows you to change the renderer and data source of a given
sublayer in a supported dynamic map service.
ArcGISDynamicMapServiceLayer
by calling its
getDynamicLayerInfos
method. If the service does not support
dynamic layers, this will return null. If the service does support dynamic
layers and the user has not set their own list, the returned
DynamicLayerInfoCollection
will contain one
DynamicLayerInfo
instance for each layer in the service. By
default, each DynamicLayerInfo
will be set to use the sublayer's
default renderer and data source. To modify a particular
DynamicLayerInfo
instance, use the get(int)
method and
modify the returned instance.
A new instance of this list can be created and populated with
DynamicLayerInfo
instances. The order these are added to the
list will affect the draw order when the dynamic map service is rendered: the
first item in this list will be drawn on top and the last will be drawn at
the bottom.
The items in this list will respect the sublayer visibility settings of the
dynamic map service: any layer that is currently invisible will not render.
Any layers that are marked as visible but do not have a corresponding
DynamicLayerInfo
instance will be drawn below the other layers
using the service's default renderer and data source.
A particular sublayer that has a custom renderer and/or data source can be
reset to the default renderer and datasource either by calling
DynamicLayerInfo.resetToDefault()
or by removing it from this list.
If you wish to retain the drawing order, use the resetToDefault
method. If you remove the DynamicLayerInfo instance from the list, the
corresponding sublayer will be drawn below the other customized layers.
If you wish to reset all sublayers to their default renderer and datasource,
use the resetToDefault()
method on this class. Note that this will
also reset the drawing order as it is equivalent to removing all the list's
entries.
Constructor Summary | |
---|---|
DynamicLayerInfoCollection(Collection<LayerInfo> layerInfos)
|
|
DynamicLayerInfoCollection(Collection<LayerInfo> layerInfos,
boolean addDefaults)
|
Method Summary | ||
---|---|---|
boolean |
add(T e)
Add a new item to this collection. |
|
boolean |
addAll(Collection<? extends T> c)
This method is equivalent to iterating through the given collection calling #add(T) for each item. |
|
void |
clear()
Remove all T instances from this list. |
|
boolean |
contains(Object o)
|
|
boolean |
containsAll(Collection<?> c)
|
|
T |
get(int layerId)
Return the T instance representing
the layer with the given id, if it exists. |
|
protected DynamicLayerInfo |
getDefaultItem(int id)
|
|
protected HashMap<Integer,T> |
getDynamicLayerItemInfos()
|
|
protected HashMap<Integer,LayerInfo> |
getLayersList()
|
|
List<DynamicLayerInfo> |
getVisibleList()
Gets the visible layers list. |
|
boolean |
isEmpty()
|
|
Iterator<T> |
iterator()
|
|
boolean |
remove(Object o)
Remove the given item from the list. |
|
boolean |
removeAll(Collection<?> c)
This method is equivalent to iterating through the given collection and calling remove(Object) for each item. |
|
void |
resetToDefault()
Call this method to reset all the sublayer renderers back to the service defaults. |
|
boolean |
retainAll(Collection<?> c)
This method is equivalent to calling remove(Object) for all the
items in this list that are not contained in the given list. |
|
int |
size()
|
|
Object[] |
toArray()
|
|
|
toArray(T[] a)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.Collection |
---|
equals, hashCode |
Constructor Detail |
---|
public DynamicLayerInfoCollection(Collection<LayerInfo> layerInfos)
public DynamicLayerInfoCollection(Collection<LayerInfo> layerInfos, boolean addDefaults)
parentLayer
- addDefaults
- Method Detail |
---|
public List<DynamicLayerInfo> getVisibleList()
DynamicLayerInfo
instances for the layers in the service
that are currently visible.
protected DynamicLayerInfo getDefaultItem(int id)
public int size()
size
in interface Collection<T extends LayerInfoItem>
public boolean isEmpty()
isEmpty
in interface Collection<T extends LayerInfoItem>
public boolean contains(Object o)
contains
in interface Collection<T extends LayerInfoItem>
public Iterator<T> iterator()
iterator
in interface Iterable<T extends LayerInfoItem>
iterator
in interface Collection<T extends LayerInfoItem>
public Object[] toArray()
toArray
in interface Collection<T extends LayerInfoItem>
public <T> T[] toArray(T[] a)
toArray
in interface Collection<T extends LayerInfoItem>
public boolean add(T e)
add
in interface Collection<T extends LayerInfoItem>
Collection.add(java.lang.Object)
public boolean remove(Object o)
remove
in interface Collection<T extends LayerInfoItem>
Collection.remove(java.lang.Object)
public boolean containsAll(Collection<?> c)
containsAll
in interface Collection<T extends LayerInfoItem>
public boolean addAll(Collection<? extends T> c)
#add(T)
for each item.
addAll
in interface Collection<T extends LayerInfoItem>
Collection.addAll(java.util.Collection)
public boolean removeAll(Collection<?> c)
remove(Object)
for each item. See the documentation
for the remove(Object)
method for information on the behaviour
of this method.
removeAll
in interface Collection<T extends LayerInfoItem>
Collection.removeAll(java.util.Collection)
public boolean retainAll(Collection<?> c)
remove(Object)
for all the
items in this list that are not contained in the given list. See the
documentation for the remove(Object)
method for information on
the behaviour of this method.
retainAll
in interface Collection<T extends LayerInfoItem>
Collection.retainAll(java.util.Collection)
public void clear()
T
instances from this list. This
will have the effect of reseting all the dynamic map service layers
back to their default behaviour.
clear
in interface Collection<T extends LayerInfoItem>
Collection.clear()
public T get(int layerId)
T
instance representing
the layer with the given id, if it exists.
layerId
-
DynamicLayerInfo
matching layerId or null.protected HashMap<Integer,T> getDynamicLayerItemInfos()
protected HashMap<Integer,LayerInfo> getLayersList()
public void resetToDefault()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |