public class IlvScaleVisibilityFilter extends IlvZoomFactorVisibilityFilter
NO_LIMIT
value if the layer should be visible
for any scale smaller than a minimum scale (this could be the case for
layers containing low-resolution map data), or conversely, for any
scale larger than a maximum scale (this could be the case for layers
containing high-resolution map data).NO_LIMIT
Constructor and Description |
---|
IlvScaleVisibilityFilter(double minScale,
double maxScale,
IlvLinearUnit managerUnit)
Initializes an
IlvScaleVisibilityFilter object. |
IlvScaleVisibilityFilter(IlvInputStream stream)
Initializes an
IlvScaleVisibilityFilter from an
IlvInputStream . |
Modifier and Type | Method and Description |
---|---|
double |
getMaxScale()
Returns the maximum scale.
|
double |
getMinScale()
Returns the minimum scale.
|
IlvLinearUnit |
getUnit()
Returns the linear unit.
|
boolean |
isVisible(IlvManagerLayer layer,
IlvManagerView view)
Returns true if the scale of the layer in the argument
view is between
the maximum and the minimum scales. |
void |
setMaxScale(double maxScale)
Sets the maximal scale at which the filtered layer is visible.
|
void |
setMinScale(double minScale)
Sets the minimal scale at which the filtered layer is visible.
|
void |
write(IlvOutputStream stream)
Writes the filter to an
IlvOutputStream . |
getMaxZoomFactor, getMinZoomFactor, isPersistent, setMaxZoomFactor, setMinZoomFactor, setPersistent
public IlvScaleVisibilityFilter(double minScale, double maxScale, IlvLinearUnit managerUnit)
IlvScaleVisibilityFilter
object.
The layer will be visible if its scale is between minScale
and maxScale
.minScale
- The minimum scale at which the layer will be visible
(for instance, 1/100000). If no minimum scale is required,
you must pass the value NO_LIMIT
.maxScale
- The maximum scale at which the layer will be visible
(for instance, 1/20000). If no maximum scale is required,
you must pass the value NO_LIMIT
.managerUnit
- The unit of the manager. Specifies the
equivalence between manager coordinates and meters.IlvZoomFactorVisibilityFilter.NO_LIMIT
public IlvScaleVisibilityFilter(IlvInputStream stream) throws IlvReadFileException
IlvScaleVisibilityFilter
from an
IlvInputStream
.IlvReadFileException
public boolean isVisible(IlvManagerLayer layer, IlvManagerView view)
view
is between
the maximum and the minimum scales.isVisible
in class IlvZoomFactorVisibilityFilter
public void write(IlvOutputStream stream) throws IOException
IlvOutputStream
.write
in interface IlvPersistentObject
write
in class IlvZoomFactorVisibilityFilter
stream
- The output stream.IOException
- standard IO error.public IlvLinearUnit getUnit()
public double getMinScale()
public void setMinScale(double minScale)
minScale
- The minimum scalepublic double getMaxScale()
public void setMaxScale(double maxScale)
maxScale
- The maximum scale© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.