java.lang.Object | |
↳ | com.carto.components.Layers |
Container for all raster and vector layers of the map view.
The order in which layers are added is important for vector elements like Points, Lines
and Polygons. For these elements the layer ordering defines their draw order.
Other elements like NMLModels and Polygon3Ds are z ordered and are drawn using the depth buffer.
For Billboard elements like Markers and Labels, the layer ordering is unimportant, because
they will be sorted from back to front and drawn in that order on top of all other vector elements.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
add(Layer layer)
Adds a new layer to the layer stack.
| ||||||||||
void |
addAll(LayerVector layers)
Adds a a list of layers to the layer stack.
| ||||||||||
void |
clear()
Clears the layer stack.
| ||||||||||
int |
count()
Returns the current layer count.
| ||||||||||
synchronized void | delete() | ||||||||||
boolean |
equals(Object obj)
Checks if this object is equal to the specified object.
| ||||||||||
Layer |
get(int index)
Returns the layer at the specified index.
| ||||||||||
LayerVector |
getAll()
Returns the list of all layers.
| ||||||||||
int |
hashCode()
Returns the hash value of this object.
| ||||||||||
void |
insert(int index, Layer layer)
Inserts a new layer at the specified position.
| ||||||||||
boolean |
remove(Layer layer)
Removes a layer from the layer stack.
| ||||||||||
boolean |
removeAll(LayerVector layers)
Removes a list of layers from the layer stack.
| ||||||||||
void |
set(int index, Layer layer)
Replaces the layer at the specified index.
| ||||||||||
void |
setAll(LayerVector layers)
Replaces all the layers with the given layer list.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() |
Adds a new layer to the layer stack. The new layer will be the last (and topmost) layer.
layer | The layer to be added. |
---|
Adds a a list of layers to the layer stack. The new layers will be the last (and topmost) layers.
layers | The layer list to be added. |
---|
Clears the layer stack.
Returns the current layer count.
Checks if this object is equal to the specified object.
obj | The reference object. |
---|
Returns the layer at the specified index.
index | The layer index to return. Must be between 0 and count (exclusive). |
---|
IndexOutOfBoundsException | If the index is out of range. |
---|
Returns the list of all layers. The layers are in the order in which they were added.
Returns the hash value of this object.
Inserts a new layer at the specified position.
All previous layers starting from this index will be moved to the next position.
index | The layer index. Must be between 0 and count (inclusive). |
---|---|
layer | The new layer. |
IndexOutOfBoundsException | If the index is out of range. |
---|
Removes a layer from the layer stack.
layer | The layer to be removed. |
---|
Removes a list of layers from the layer stack.
layers | The list of layers to be removed. |
---|
Replaces the layer at the specified index.
index | The layer index to replace. Must be between 0 and count (exclusive). |
---|---|
layer | The new layer. |
IndexOutOfBoundsException | If the index is out of range. |
---|
Replaces all the layers with the given layer list.
layers | The new list of layers. |
---|