Package com.kheops.jmap.client.layers
Class Layer
java.lang.Object
com.kheops.jmap.metadata.LocalizedObject
com.kheops.jmap.client.layers.Layer
- All Implemented Interfaces:
JMapEventDispatcher,ILayer,LayerConstants,LayerNode,Serializable,Cloneable,Comparable<Layer>
- Direct Known Subclasses:
RasterLayer,VectorLayer
public abstract class Layer
extends LocalizedObject
implements ILayer, LayerNode, LayerConstants, JMapEventDispatcher, Cloneable, Comparable<Layer>
This abstract class represents a layer of information on the map. A layer is
an organized set of spatial data and attributes that are displayed together.
All layer instances are managed by a layer manager (LayerManager). When the map is drawn on a view (View), all layers managed by the layer manager associated with this view are drawn, one on top of the other, starting with the lower position layer up to the higher position layer. Every layer has one or more style objects (Style) that define how the content of the layer is rendered in the view.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final K2DTransformprotected StringThe description of the layer.static final intConstant used to specify that layer drawing should be done synchronously.protected K2DTransformprotected intprotected K2DElementFactoryprotected intThe type of elements this layer contains.protected final LayerEventDispatcherprotected intThe id of the layer.protected JMapClientInfoReportConfigprotected longstatic final intThis constant refers to the reserved layer id for the layer containing highlight objects NOTE: different than SYS_DRAWINGS layer because the highlight tool constantly changes its location depending on the highlighted layerstatic final intThis constant refers to a reserved layer id used by the administration extension.static final intThis constant refers to the reserved layer id for the layer containing the labelsstatic final intThis constant refers to a reserved layer id used for the View Markers.static final intThis constant refers to a reserved layer id used by drawing tools.static final intThis constant refers to the reserved layer id for the layer containing the temporary drawings Ex: DistanceTool, temporary line drawn when the user moves the mouse 3D Distance/routing, possible route choicesstatic final intSet the correct numbers for the constants below, and use constants instead of specifying the ID everywhere in JMap This constant refers to the reserved layer id for the layer containing the user drawingsstatic final intThis constant refers to a reserved layer id used for user layer labeling.protected longLayer properties are stored as bitwise values in this property.protected doubleprotected Stringprotected doubleprotected StringThe name of the layer.protected PrecisionModelprotected longprotected StyleManagerprotected booleanFields inherited from interface com.kheops.jmap.client.layers.ILayer
serialVersionUIDFields inherited from interface com.kheops.jmap.client.layers.LayerConstants
DEFAULT_MAXIMUM_SCALE, DEFAULT_MINIMUM_SCALE, PERSONAL_LAYER_BASE_ID, PERSONAL_LAYER_MAX_ID, PROJECT_LAYER_BASE_ID, PROJECT_LAYER_MAX_ID, PROPERTY_ALL_SETTINGS, PROPERTY_ALWAYS_DRAW_SELECTION, PROPERTY_DRAW_GRID, PROPERTY_EDITABLE, PROPERTY_EDITING, PROPERTY_INCLUDE_IN_CONTEXT, PROPERTY_INDEX, PROPERTY_LISTED, PROPERTY_LOCAL, PROPERTY_MAX_SCALE, PROPERTY_MIN_SCALE, PROPERTY_PUBLISHED, PROPERTY_QUERIABLE, PROPERTY_SELECTABLE, PROPERTY_USE_CLIENT_CACHE, PROPERTY_VISIBLE, REQUEST_MODE_BY_REGION, REQUEST_MODE_BY_TILE, RESERVED_LAYER_BASE_ID, RESERVED_LAYER_MAX_ID, SYSTEM_LAYER_BASE_AUTO_ID, SYSTEM_LAYER_BASE_ID, SYSTEM_LAYER_MAX_ID, TILING_MODE_AUTO, TILING_MODE_MANUAL, USER_LAYER_BASE_AUTO_ID, USER_LAYER_BASE_ID, USER_LAYER_MAX_ID -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedLayer()Empty constructor.Deprecated.Creates a new Layer using the specified parameters.
The new layer will be configured with only one tile with an infinite size.Initializes the new layer using the specified JMapClientLayerInfo. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddLayerEventListener(LayerEventListener listener) Added the specified listener to the layer listeners list.abstract Objectclone()Returns a deep clone of the current LayerInfo instance.protected voidImplementation of the clone method.abstract voidclose()Frees all resources used by the layer.intCompares this object with the specified layer for order.voiddispatchEvent(JMapEvent event) ThedispatchEventmethod is used to dispatch synchronously JMap events to all registered listeners.voiddraw(GraphicsRef gr, ViewState vs, OrientedRectangle region, double scale, int drawOptions) Deprecated.abstract voiddraw(GraphicsRef gr, ViewState vs, OrientedRectangle region, double scale, DrawParameters parameters) Draws layer contained in the specified region to the specified graphics object and applying the specified transformation.booleandrawGrid()Returns the draw grid state.abstract voiddrawGrid(GraphicsRef gr, K2DTransform t) Draws the tile grid for the layer.protected voidfireLayerPropertyBeforeChangeEvent(byte property) protected voidfireLayerPropertyChangedEvent(byte property) protected voidfireLayerReceivedDataEvent(LayerReceivedDataEvent event, boolean sync) protected voidFires refresh request event so that the listener can handle the event properlyprotected voidReturns the description of the layer.getDescription(Locale locale) Returns the description of this layer for a specific locale.intGets the time at which a layer is automatically refreshedReturns the K2DElementFactory configured for the layer.intReturns the layer element type.abstract RectangleReturns the extent of the layer.intgetId()Returns the id of the layer.Return the information report configuration of the layer.longGets the last updated timelongReturns a bitwise value that contains all layer properties.doubleGets the maximum scale at which the layer should be visible.Returns the metadata URL.doubleGets the minimum scale at which the layer should be visible.getName()Returns the name of the layer.Returns the name of this layer for a specific locale.static intstatic intReturns the precision model to use for geometrical operations.longReturns the a mask which contains all read-only properties for this layer.abstract intReturns the request mode for this layer.Returns the default selection style object associated with the layer.
Note: If this layer has more than one style (depending on the zoom level), the lowest level selection style is returned.getSelectionStyle(double scale) Returns the selection style object associated with the layer for the specified scale.getStyle()Returns the default style object associated with the layer.
Note: If this layer has more than one style (depending on the zoom level), the lowest level style is returned.getStyle(double scale) Returns the style object associated with the layer (used to draw elements of the layer).Returns the StyleManager instance used by the Layer.booleanReturns whether the verbose mode is enabled.protected LayerEventDispatchervoidInvalidates the cached data for vector and raster layers.booleanisDrawable(double scale) Returns true if this layer should be drawn at the specified scale.booleanbooleanReturns whether this layer should be included in contexts.booleanisIndex()Returns whether this layer should be drawn in the client overview.booleanisListed()Returns the current listed state of the layer.booleanisLocal()Returns the current local state of the layer.booleanChecks if the layer is named (including available translations, case insensitive) as the specified value.static booleanisPersonalLayerId(int layerId) static booleanisProjectLayerId(int layerId) booleanDeprecated.As of release 4.0, the QUERIABLE property is not used anymorestatic booleanisReservedLayerId(int layerId) booleanReturns the current selectable state of the layer.static booleanisSystemLayerId(int layerId) static booleanisUserLayerId(int layerId) booleanReturns the current visibility state of the layerabstract voidThis method automatically loads the data intersecting with the specified geometry.voidremoveLayerEventListener(LayerEventListener listener) Removes the specified listener from the layer listeners list.voidremoveTranslationsOtherThan(Locale[] locales) Removes anyLocalefrom this object that are not in the specifiedlocales.voidRevalidates cached data based on the specified affine transformation.voidsetDescription(String description) Sets the description string for the layer.voidsetDescription(String description, Locale locale) Sets the description of this layer for the specified Locale.voidsetDrawGrid(boolean drawGrid) Sets the draw grid state.voidsetDynamicRefresh(int seconds) Sets the time at which a layer is automatically refreshed.voidsetElementFactory(K2DElementFactory elementFactory) Sets the K2DElementFactory to be used by this layer.voidsetElementType(int elementType) Sets the layer element type.voidsetId(int id) Sets the id of the layer.voidsetIncludeInContext(boolean includeInContext) Sets whether this layer should be included in contexts.voidsetIndex(boolean flag) Sets whether this layer should be drawn in the client overview.voidsetInfoReportConfig(JMapClientInfoReportConfig infoReportConfig) Sets the information report configuration of the layer.voidsetLastUpdateTime(long lastUpdateTime) Sets the last updated timevoidsetLayerProperties(long value) Sets all layer properties.voidsetListed(boolean listed) Sets the listed state of the layer.voidsetLocal(boolean flag) Sets the local state of the layer.voidsetMaximumVisibleScale(double scale) Sets the maximum scale at which the layer should be visible.voidsetMetadataUrl(String metadataUrl) Sets the metadata URL.voidsetMinimumVisibleScale(double scale) Sets the minimum scale at which the layer should be visible.voidSets the layer name.voidSets the name of this layer for the specified Locale.voidsetPrecisionModel(PrecisionModel precisionModel) Sets the precision model to use for geometrical operations.final voidsetProperty(long property, boolean enabled) Sets the state for the specified property.voidsetQueriable(boolean flag) Deprecated.As of release 4.0, the QUERIABLE property is not used anymorevoidsetReadOnlyProperties(long value) Sets all read-only properties for the layer.final voidsetReadOnlyProperty(long property, boolean isReadOnly) Sets the read-only state for the specified property.voidsetSelectable(boolean flag) Sets the selectable state of the layer.voidDeprecated.since JMap 2.5voidSets the default style at the specified scale for this layer.voidsetStyleManager(StyleManager styleManager) Sets the StyleManager object to be used by the Layer.voidsetVerbose(boolean verbose) Sets the verbose mode of the layer.voidsetVisible(boolean flag) Sets the visibility state of the layer.voidsetVisible(boolean flag, boolean fireEvent) Sets the visibility state of the layer.abstract LayerInfotoString()Returns the name of the current layer.voidMethods inherited from class com.kheops.jmap.metadata.LocalizedObject
getAvailableLocales, getTranslation, isTranslationExists, setTranslation, updateTranslations
-
Field Details
-
LAYER_ID_LABELS
public static final int LAYER_ID_LABELSThis constant refers to the reserved layer id for the layer containing the labels -
LAYER_ID_HIGHLIGHT
public static final int LAYER_ID_HIGHLIGHTThis constant refers to the reserved layer id for the layer containing highlight objects NOTE: different than SYS_DRAWINGS layer because the highlight tool constantly changes its location depending on the highlighted layer -
LAYER_ID_USER_DRAWINGS
public static final int LAYER_ID_USER_DRAWINGSSet the correct numbers for the constants below, and use constants instead of specifying the ID everywhere in JMap This constant refers to the reserved layer id for the layer containing the user drawings -
LAYER_ID_TMP_DRAWINGS
public static final int LAYER_ID_TMP_DRAWINGSThis constant refers to the reserved layer id for the layer containing the temporary drawings Ex: DistanceTool, temporary line drawn when the user moves the mouse 3D Distance/routing, possible route choices -
LAYER_ID_SYS_DRAWINGS
public static final int LAYER_ID_SYS_DRAWINGSThis constant refers to a reserved layer id used by drawing tools. -
LAYER_ID_USER_LABELS
public static final int LAYER_ID_USER_LABELSThis constant refers to a reserved layer id used for user layer labeling. -
LAYER_ID_INITIAL_VIEW_BOUNDS
public static final int LAYER_ID_INITIAL_VIEW_BOUNDSThis constant refers to a reserved layer id used by the administration extension. -
LAYER_ID_MARKERS
public static final int LAYER_ID_MARKERSThis constant refers to a reserved layer id used for the View Markers. -
DRAW_OPTIONS_SYNC
public static final int DRAW_OPTIONS_SYNCConstant used to specify that layer drawing should be done synchronously.- See Also:
-
DEFAULT_DRAW_STATE
-
id
protected int idThe id of the layer. -
name
The name of the layer. -
description
The description of the layer. -
elementType
protected int elementTypeThe type of elements this layer contains. -
layerProperties
protected long layerPropertiesLayer properties are stored as bitwise values in this property. -
readOnlyProperties
protected long readOnlyProperties -
maximumVisibleScale
protected double maximumVisibleScale -
minimumVisibleScale
protected double minimumVisibleScale -
styleManager
-
eventDispatcher
-
lastUpdateTime
protected long lastUpdateTime -
elementFactory
-
infoReportConfig
-
verbose
protected boolean verbose -
drawState
-
precisionModel
-
metadataUrl
-
dynamicRefresh
protected int dynamicRefresh
-
-
Constructor Details
-
Layer
protected Layer()Empty constructor. Useful for subclasses. -
Layer
Creates a new Layer using the specified parameters.
The new layer will be configured with only one tile with an infinite size.- Parameters:
id- the id of the new layer.name- the name.elementType- the element type.
-
Layer
Deprecated.Creates a new Layer using the specified parameters.
The new layer will be configured with one infinite tile.- Parameters:
id- the id of the new layer.geometryType- the geometry type.elementType- the element type.name- the name.isVisible- whether this layer is visible.
-
Layer
Initializes the new layer using the specified JMapClientLayerInfo.- Parameters:
layerInfo- the new layer configuration.
-
-
Method Details
-
getNextUserLayerId
public static int getNextUserLayerId() -
getNextSystemLayerId
public static int getNextSystemLayerId() -
isProjectLayerId
public static boolean isProjectLayerId(int layerId) -
isSystemLayerId
public static boolean isSystemLayerId(int layerId) -
isReservedLayerId
public static boolean isReservedLayerId(int layerId) -
isUserLayerId
public static boolean isUserLayerId(int layerId) -
isPersonalLayerId
public static boolean isPersonalLayerId(int layerId) -
initEventDispatcher
-
setVerbose
public void setVerbose(boolean verbose) Sets the verbose mode of the layer.- Parameters:
verbose- the verbose mode
-
getVerbose
public boolean getVerbose()Returns whether the verbose mode is enabled.- Returns:
- the verbose mode.
-
setProperty
public final void setProperty(long property, boolean enabled) Sets the state for the specified property.- Specified by:
setPropertyin interfaceILayer- Parameters:
property- the property to set.enabled- the property state.
-
setReadOnlyProperty
public final void setReadOnlyProperty(long property, boolean isReadOnly) Sets the read-only state for the specified property.- Specified by:
setReadOnlyPropertyin interfaceILayer- Parameters:
property- the property to set.isReadOnly- the read-only state.
-
getReadOnlyProperties
public long getReadOnlyProperties()Returns the a mask which contains all read-only properties for this layer.- Specified by:
getReadOnlyPropertiesin interfaceILayer- Returns:
- the mask which defines read-only properties of the layer.
-
setReadOnlyProperties
public void setReadOnlyProperties(long value) Sets all read-only properties for the layer.- Specified by:
setReadOnlyPropertiesin interfaceILayer- Parameters:
value- a bitwise value that contains all read-only layer properties.
-
getLayerProperties
public long getLayerProperties()Returns a bitwise value that contains all layer properties.- Specified by:
getLayerPropertiesin interfaceILayer- Returns:
- a value that contains all layer properties.
-
setLayerProperties
public void setLayerProperties(long value) Sets all layer properties.- Specified by:
setLayerPropertiesin interfaceILayer- Parameters:
value- a bitwise value that contains all layer properties.
-
getLastUpdateTime
public long getLastUpdateTime()Gets the last updated time- Specified by:
getLastUpdateTimein interfaceILayer- Returns:
- the time of the last update
-
setLastUpdateTime
public void setLastUpdateTime(long lastUpdateTime) Sets the last updated time- Specified by:
setLastUpdateTimein interfaceILayer- Parameters:
lastUpdateTime- the last updated time
-
addLayerEventListener
Added the specified listener to the layer listeners list.- Parameters:
listener- the listener to add.
-
removeLayerEventListener
Removes the specified listener from the layer listeners list.- Parameters:
listener- the listener to remove.
-
isDrawable
public boolean isDrawable(double scale) Returns true if this layer should be drawn at the specified scale. This is based on the minimum and maximum zoom scales stored in the style of this layer.- Parameters:
scale- the scale used for the calculation.- Returns:
- true if this layer should be drawn at the specified scale.
-
getName
Returns the name of the layer. -
getName
Returns the name of this layer for a specific locale. -
isNamed
Checks if the layer is named (including available translations, case insensitive) as the specified value.- Parameters:
value-- Returns:
-
getDescription
Returns the description of the layer.- Specified by:
getDescriptionin interfaceILayer- Returns:
- the description of the layer
-
getDescription
Returns the description of this layer for a specific locale.- Specified by:
getDescriptionin interfaceILayer- Parameters:
locale-- Returns:
- description.
-
setDescription
Sets the description string for the layer.- Specified by:
setDescriptionin interfaceILayer- Parameters:
description- the description string
-
setDescription
Sets the description of this layer for the specified Locale.- Specified by:
setDescriptionin interfaceILayer- Parameters:
description- the new given description.locale- the locale for this description
-
getId
public int getId()Returns the id of the layer. -
setId
public void setId(int id) Sets the id of the layer. -
setVisible
public void setVisible(boolean flag) Sets the visibility state of the layer. If a layer is invisible, it is not drawn in a view.- Specified by:
setVisiblein interfaceILayer- Specified by:
setVisiblein interfaceLayerNode- Parameters:
flag- if true, the layer will be visible otherwise invisible
-
setVisible
public void setVisible(boolean flag, boolean fireEvent) Sets the visibility state of the layer. If a layer is invisible, it is not drawn in a view.- Parameters:
flag- if true, the layer will be visible otherwise invisiblefireEvent- if true, firePropertyChangedEvent and fireVisibilityEvent are fired
-
isVisible
public boolean isVisible()Returns the current visibility state of the layer -
setQueriable
Deprecated.As of release 4.0, the QUERIABLE property is not used anymoreSets the queriable state of the layer. Tools can check this state using the method isQueriable to determine if this layer should be processed.- Parameters:
flag- if true, the layer will be queriable otherwise not queriable
-
isQueriable
Deprecated.As of release 4.0, the QUERIABLE property is not used anymoreReturns the current queriable state of the layer.- Returns:
- true if the layer is queriable, false otherwise
-
setSelectable
public void setSelectable(boolean flag) Sets the selectable state of the layer. Selection tools can check this state using the method getSelectable to determine if this layer should be processed.- Specified by:
setSelectablein interfaceILayer- Parameters:
flag- if true, the layer will be selectable otherwise not selectable
-
isSelectable
public boolean isSelectable()Returns the current selectable state of the layer.- Specified by:
isSelectablein interfaceILayer- Returns:
- true if the layer is selectable, false otherwise
-
setLocal
public void setLocal(boolean flag) Sets the local state of the layer. A local layer is generated on the client side and therefore should not generate data requests to the server. -
isLocal
public boolean isLocal()Returns the current local state of the layer. -
setListed
public void setListed(boolean listed) Sets the listed state of the layer. This flag can be used to determine if the layer should be hidden to the user in a list of layers. -
isListed
public boolean isListed()Returns the current listed state of the layer. -
setIncludeInContext
public void setIncludeInContext(boolean includeInContext) Sets whether this layer should be included in contexts.- Parameters:
includeInContext- true defines that this layer should be included in contexts.
-
isIncludeInContext
public boolean isIncludeInContext()Returns whether this layer should be included in contexts.- Returns:
- true if this layer should be included in contexts.
-
drawGrid
public boolean drawGrid()Returns the draw grid state.- Returns:
- true is the layer grid is drawn
-
setDrawGrid
public void setDrawGrid(boolean drawGrid) Sets the draw grid state.- Parameters:
drawGrid- if true, the grid will be drawn
-
isIndex
public boolean isIndex()Returns whether this layer should be drawn in the client overview. -
setIndex
public void setIndex(boolean flag) Sets whether this layer should be drawn in the client overview. -
getStyle
Returns the default style object associated with the layer.
Note: If this layer has more than one style (depending on the zoom level), the lowest level style is returned.- Returns:
- the default style of the layer
- See Also:
-
getStyle
Returns the style object associated with the layer (used to draw elements of the layer).- Parameters:
scale- the scale of the current View.- Returns:
- the default style of the layer.
- See Also:
-
getSelectionStyle
Returns the default selection style object associated with the layer.
Note: If this layer has more than one style (depending on the zoom level), the lowest level selection style is returned.- Returns:
- the default selection style of the layer
- See Also:
-
getSelectionStyle
Returns the selection style object associated with the layer for the specified scale.- Parameters:
scale- the scale of the current View.- Returns:
- the selection style of the layer for the specified scale.
- See Also:
-
setStyle
Deprecated.since JMap 2.5Sets the default style for this layer. Fires a LayerStyleReplacedEvent.- Parameters:
style- the new default style for the layer- See Also:
-
setStyleManager
Sets the StyleManager object to be used by the Layer.- Specified by:
setStyleManagerin interfaceILayer- Parameters:
styleManager- the style manager to be used.
-
getStyleManager
Returns the StyleManager instance used by the Layer.- Specified by:
getStyleManagerin interfaceILayer- Returns:
- the StyleManager instance used by the Layer.
-
setStyle
Sets the default style at the specified scale for this layer. Fires a LayerStyleChangedEvent.- Parameters:
style- the new default style for the layerscale- the scale of the Style to replace.- See Also:
-
fireStyleChangedEvent
protected void fireStyleChangedEvent() -
getRequestMode
public abstract int getRequestMode()Returns the request mode for this layer. The request mode can be either by tile (REQUEST_MODE_TILE) or by random region (REQUEST_MODE_REGION). When using requests by tile, predimensionned tiles are exchanged between JMapServer and the client application. When using requests by region, random regions of data are exchanged depending on the region the user is viewing. Requests by tiles are generally more performant because they allow caching on the server and client sides. Requests by region are useful when data must always be up-to-date, as it will be requested each time from the spatial data source.- Returns:
- the current request mode in use by this layer.
-
getExtent
Returns the extent of the layer. -
drawGrid
Draws the tile grid for the layer.- Parameters:
gr- the Graphics wrapper object used to draw the gridt- the 2D transformation matrix used to draw the grid
-
draw
@Deprecated public void draw(GraphicsRef gr, ViewState vs, OrientedRectangle region, double scale, int drawOptions) Deprecated.Draws layer contained in the specified region to the specified graphics object and applying the specified transformation.- Parameters:
gr- the graphics wrapper object to use.vs- the view state that provides context information to draw the layer.region- the world coordinate region to redraw.scale- the scale of the current View.drawOptions- draw options to use. Options can be retrieved with bitwise operations usingLayerManager.DRAW_*constants.- See Also:
-
draw
public abstract void draw(GraphicsRef gr, ViewState vs, OrientedRectangle region, double scale, DrawParameters parameters) Draws layer contained in the specified region to the specified graphics object and applying the specified transformation.- Parameters:
gr- the graphics wrapper object to use.vs- the view state that provides context information to draw the layer.region- the world coordinate region to redraw.scale- the scale of the current View.parameters- draw parameters.- Since:
- 7.0
-
close
public abstract void close()Frees all resources used by the layer. -
dispatchEvent
ThedispatchEventmethod is used to dispatch synchronously JMap events to all registered listeners. The main use of theJMapEventDispatcherinterface is to dispatch events that were previously added to the JMap event queue.
Note: onlyLayerEventwill be accepted by this method. Any other JMap event types will cause the layer to throw an exception.- Specified by:
dispatchEventin interfaceJMapEventDispatcher- Parameters:
event- the event to be dispatched.- Throws:
IllegalArgumentException- will be thrown if theJMapEventinstance is no an instance of theLayerEventclass.- See Also:
-
fireLayerReceivedDataEvent
-
fireRefreshRequestEvent
protected void fireRefreshRequestEvent()Fires refresh request event so that the listener can handle the event properly -
fireLayerPropertyChangedEvent
protected void fireLayerPropertyChangedEvent(byte property) -
fireLayerPropertyBeforeChangeEvent
protected void fireLayerPropertyBeforeChangeEvent(byte property) -
setMinimumVisibleScale
public void setMinimumVisibleScale(double scale) Sets the minimum scale at which the layer should be visible.- Specified by:
setMinimumVisibleScalein interfaceILayer- Parameters:
scale- the minimum scale limit for the layer
-
getMinimumVisibleScale
public double getMinimumVisibleScale()Gets the minimum scale at which the layer should be visible.- Specified by:
getMinimumVisibleScalein interfaceILayer- Returns:
- the minimum scale limit for the layer
-
setMaximumVisibleScale
public void setMaximumVisibleScale(double scale) Sets the maximum scale at which the layer should be visible.- Specified by:
setMaximumVisibleScalein interfaceILayer- Parameters:
scale- the maximum scale limit for the layer
-
getMaximumVisibleScale
public double getMaximumVisibleScale()Gets the maximum scale at which the layer should be visible.- Specified by:
getMaximumVisibleScalein interfaceILayer- Returns:
- the maximum scale limit for the layer
-
setName
Sets the layer name. -
setName
Sets the name of this layer for the specified Locale. -
getElementFactory
Returns the K2DElementFactory configured for the layer.- Specified by:
getElementFactoryin interfaceILayer- Returns:
- the current K2DElementFactory of the layer.
-
setElementFactory
Sets the K2DElementFactory to be used by this layer.- Specified by:
setElementFactoryin interfaceILayer- Parameters:
elementFactory- the K2DElementFactory to use.
-
getElementType
public int getElementType()Returns the layer element type.- Specified by:
getElementTypein interfaceILayer- Returns:
- the element type.
- See Also:
-
setElementType
public void setElementType(int elementType) Sets the layer element type.- Specified by:
setElementTypein interfaceILayer- Parameters:
elementType- the element type to set.- See Also:
-
getInfoReportConfig
Return the information report configuration of the layer.- Specified by:
getInfoReportConfigin interfaceILayer- Returns:
- the layer information report configuration.
-
setInfoReportConfig
Sets the information report configuration of the layer.- Specified by:
setInfoReportConfigin interfaceILayer- Parameters:
infoReportConfig- the infoReportConfig to set.
-
toString
Returns the name of the current layer. -
compareTo
Compares this object with the specified layer for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.It implements the compareTo from the Comparable interface If the object is null, the method returns -1
- Specified by:
compareToin interfaceComparable<Layer>- Parameters:
layer- the layer to compare to.- Returns:
- the corresponding integer value
- See Also:
-
clone
Description copied from interface:ILayerReturns a deep clone of the current LayerInfo instance. -
clone
Implementation of the clone method.- Parameters:
layer- the new layer instance.
-
update
-
toLayerInfo
-
loadData
This method automatically loads the data intersecting with the specified geometry. For now, it is only implemented for VectorLayer, where it will load the intersecting tiles.- Parameters:
bounds- the geometry used to delimit the boundssync- whether his method is synchronized
-
invalidate
public void invalidate()Invalidates the cached data for vector and raster layers. Consequently, cached data will be discarded and reloaded at the next view drawing.
Since 6.5, this method also affects layers loaded by tiles. Note that for tiled layers, calling the layer's invalidate method will not invalidate the local disk cache. To invalidate the local disk cache, the invalidateLayer method of the LayerManager must be called.- Since:
- 4.0.2
-
revalidate
Revalidates cached data based on the specified affine transformation.- Parameters:
tr- the transformation to set. If null is specified, this method has the same effect as theinvalidate()method.- Since:
- 4.0.2
-
setPrecisionModel
Sets the precision model to use for geometrical operations.- Parameters:
precisionModel- the precision model to use.- Since:
- 4.0.3
-
getPrecisionModel
Returns the precision model to use for geometrical operations.- Returns:
- the precision model to use for geometrical operations.
- Since:
- 4.0.3
-
getMetadataUrl
Returns the metadata URL.- Specified by:
getMetadataUrlin interfaceILayer- Returns:
- metadata URL
- Since:
- 4.0.3
-
setMetadataUrl
Sets the metadata URL.- Specified by:
setMetadataUrlin interfaceILayer- Parameters:
metadataUrl- the metadata URL- Since:
- 4.0.3
-
isDynamic
public boolean isDynamic() -
getDynamicRefresh
public int getDynamicRefresh()Gets the time at which a layer is automatically refreshed- Specified by:
getDynamicRefreshin interfaceILayer- Returns:
- the time in seconds
-
setDynamicRefresh
public void setDynamicRefresh(int seconds) Sets the time at which a layer is automatically refreshed. A zero or negative value indicates that the layer is not dynamic.- Specified by:
setDynamicRefreshin interfaceILayer- Parameters:
seconds-
-
removeTranslationsOtherThan
Description copied from class:LocalizedObjectRemoves anyLocalefrom this object that are not in the specifiedlocales.locales[0]should be the default language- Overrides:
removeTranslationsOtherThanin classLocalizedObject- Parameters:
locales-
-
draw(GraphicsRef, ViewState, OrientedRectangle, double, DrawParameters)instead.