|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectLayer
StyleLayer
FeatureLayer
public class FeatureLayer
Layer responsible for rendering vector information provided by a FeatureSource.
The FeatureLayer combines:
Field Summary | |
---|---|
protected FeatureSource<? extends FeatureType,? extends Feature> |
featureSource
FeatureSource offering content for display |
protected Query |
query
Query use to limit content of featureSource |
protected FeatureListener |
sourceListener
Listener to forward feature source events as layer events |
Fields inherited from class StyleLayer |
---|
style |
Fields inherited from class Layer |
---|
listenerList, LOGGER, selected, title, userData, visible |
Constructor Summary | |
---|---|
FeatureLayer(FeatureCollection collection,
Style style)
|
|
FeatureLayer(FeatureCollection collection,
Style style,
String title)
|
|
FeatureLayer(FeatureSource featureSource,
Style style)
Creates a new instance of FeatureLayer |
|
FeatureLayer(FeatureSource featureSource,
Style style,
String title)
|
Method Summary | |
---|---|
protected void |
connectDataListener(boolean listen)
Used to connect/disconnect a FeatureListener if any map layer listeners are registered. |
void |
dispose()
Allows a Layer to clean up any listeners, or internal caches or resources it has added during use. |
ReferencedEnvelope |
getBounds()
The bounds of the Layer content (if known). |
FeatureSource<?,?> |
getFeatureSource()
Get the feature source for this layer. |
Query |
getQuery()
Returns the definition query (filter) for this layer. |
SimpleFeatureSource |
getSimpleFeatureSource()
Get the feature source for this layer. |
void |
setQuery(Query query)
Sets a definition query for the layer which acts as a filter for the features that the layer will draw. |
Methods inherited from class StyleLayer |
---|
getStyle, setStyle |
Methods inherited from class Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected FeatureSource<? extends FeatureType,? extends Feature> featureSource
protected Query query
protected FeatureListener sourceListener
Constructor Detail |
---|
public FeatureLayer(FeatureSource featureSource, Style style)
featureSource
- the data source for this layerstyle
- the style used to represent this layerpublic FeatureLayer(FeatureSource featureSource, Style style, String title)
public FeatureLayer(FeatureCollection collection, Style style)
public FeatureLayer(FeatureCollection collection, Style style, String title)
Method Detail |
---|
protected void connectDataListener(boolean listen)
connectDataListener
in class Layer
listen
- true to connect, false to disconnectpublic void dispose()
Layer
dispose
in class StyleLayer
public FeatureSource<?,?> getFeatureSource()
getFeatureSource
in class Layer
public SimpleFeatureSource getSimpleFeatureSource()
public Query getQuery()
Query.ALL
is returned.
getQuery
in class Layer
public void setQuery(Query query)
A consumer must ensure that this query is used in combination with the bounding box filter generated on each map interaction to limit the number of features returned to those that complains both the definition query and relies inside the area of interest.
IMPORTANT: only include attribute names in the query if you want them to be ALWAYS returned. It is desirable to not include attributes at all but let the layer user (a renderer?) to decide wich attributes are actually needed to perform its requiered operation.
query
- public ReferencedEnvelope getBounds()
Layer
The returned bounds are a ReferencedEnvelope using the same CoordinateReferenceSystem as the layers contents.
getBounds
in class Layer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |