public enum ZoomLevelSnapStrategy extends java.lang.Enum<ZoomLevelSnapStrategy>
| Modifier and Type | Class and Description |
|---|---|
static class |
ZoomLevelSnapStrategy.SearchResult
The results of a search.
|
| Enum Constant and Description |
|---|
CLOSEST_HIGHER_SCALE_ON_TIE
Find the closest zoom level.
|
CLOSEST_LOWER_SCALE_ON_TIE
Find the closest zoom level.
|
HIGHER_SCALE
Always choose the zoom-level that is just higher than the target value.
|
LOWER_SCALE
Always choose the zoom-level that is just lower than the target value.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract ZoomLevelSnapStrategy.SearchResult |
search(Scale scale,
double tolerance,
ZoomLevels zoomLevels)
Search the provided zoomLevels for the scale that is the closest according to the current strategy.
|
static ZoomLevelSnapStrategy |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ZoomLevelSnapStrategy[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ZoomLevelSnapStrategy CLOSEST_LOWER_SCALE_ON_TIE
public static final ZoomLevelSnapStrategy CLOSEST_HIGHER_SCALE_ON_TIE
public static final ZoomLevelSnapStrategy HIGHER_SCALE
public static final ZoomLevelSnapStrategy LOWER_SCALE
public static ZoomLevelSnapStrategy[] values()
for (ZoomLevelSnapStrategy c : ZoomLevelSnapStrategy.values()) System.out.println(c);
public static ZoomLevelSnapStrategy valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullprotected abstract ZoomLevelSnapStrategy.SearchResult search(Scale scale, double tolerance, ZoomLevels zoomLevels)
scale - the reference scaletolerance - the amount from one of the zoomLevels to still be considered at the
scale. This is important for all strategies other than CLOSEST in order to prevent the scale
from jumping to a different version even when it is very close to one of the zoomLevels.zoomLevels - the allowed zoomLevels.