public final class FeatureQueryConfiguration extends Object implements AutoCloseable
FeatureQueryConfiguration
specifies which conditions to use for feature querying based on the map's current scale.Modifier and Type | Class and Description |
---|---|
static class |
FeatureQueryConfiguration.Builder
Builder for the FeatureQueryConfiguration class. |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected void |
finalize() |
Expression |
getCondition(long scaleLevel)
Returns the model query condition at a certain scale level, or
null if no condition is set for this scale level i.e. |
List<MapScale> |
getScaleBreaks()
Returns the scales at which the model query condition changes, ordered from zoomed out to zoomed in.
|
long |
getScaleLevelCount() |
static FeatureQueryConfiguration.Builder |
newBuilder()
Returns a new builder for creating a
FeatureQueryConfiguration . |
public void close()
close
in interface AutoCloseable
@NotNull public static FeatureQueryConfiguration.Builder newBuilder()
FeatureQueryConfiguration
.FeatureQueryConfiguration
.@NotNull public List<MapScale> getScaleBreaks()
This set contains every min or max scale that was passed to the builder through FeatureQueryConfiguration.Builder#addCondition
once. The values MapScale#maxZoomedOut()
or MapScale#maxZoomedIn()
are an exception and will never be contained in this set, as these values are considered to be the bounds of valid scale values and therefore not an actual scale break.
Scale breaks define the borders of the defined scale levels. This means that there is one more scale level than there are scale breaks. Imagine for example that 3 scale levels were added:
These 3 scale levels correspond with:
FeatureQueryConfiguration#getCondition
method: {condition1, condition2, condition3}
@Nullable public Expression getCondition(long scaleLevel) throws IllegalArgumentException
null
if no condition is set for this scale level i.e.
all features are selected.
scaleLevel
- the desired scale level to retrieve the condition for. This value must be smaller than the count returned by FeatureQueryConfiguration#getScaleLevelCount
. If not, an exception is thrown.null
if no condition is set for this scale level i.e. all features are selected.IllegalArgumentException
- If scaleLevel parameter is greater or equal than the scale level count.FeatureQueryConfiguration#getScaleLevelCount
public long getScaleLevelCount()
FeatureQueryConfiguration#getCondition