public class ZoomLevelFunction extends FunctionExpressionImpl
Note: EPSG:3857 is currently the only supported srid, and zoom levels are assumed to be at the
equator.
Example:
ff.function("zoomLevel",
ff.function("env", ff.literal("wms_scale_denominator")),
ff.literal("EPSG:3857")
);
The above function would evaluate to the zoomLevel that corresponds to the current environment's
wms_scale_denominator, for EPSG:3857.
ff.function("zoomLevel",
ff.literal(136494.693347),
ff.literal("EPSG:3857")
);
The above function would evaluate to a zoomLevel of 12.| Modifier and Type | Field and Description |
|---|---|
static double |
EPSG_3857_O_SCALE
Scale denominator of the root tile.
|
static String |
MBSTYLE_ROOT_TILE_PIXELS_KEY
Name of the system variable controlling
ROOT_TILE_PIXELS |
static FunctionName |
NAME |
static int |
ROOT_TILE_PIXELS
Number of pixels in the side of the root tile.
|
fallback, functionName, name, paramsNIL| Constructor and Description |
|---|
ZoomLevelFunction() |
| Modifier and Type | Method and Description |
|---|---|
Object |
evaluate(Object feature)
Subclass should override, default implementation returns null.
|
int |
getArgCount() |
accept, equals, functionName, getExpression, getFallbackValue, getFunctionName, getImplementationHints, getName, getParameters, hashCode, setFallbackValue, setParameters, toStringisAttributeExpression, isExpression, isFunctionExpression, isGeometryExpression, isLiteralExpression, isMathExpressionevaluateevaluatepublic static final FunctionName NAME
public static final String MBSTYLE_ROOT_TILE_PIXELS_KEY
ROOT_TILE_PIXELSpublic static final int ROOT_TILE_PIXELS
public static final double EPSG_3857_O_SCALE
public int getArgCount()
public Object evaluate(Object feature)
ExpressionAbstractevaluate in interface Expressionevaluate in class FunctionExpressionImplCopyright © 1996–2021 Geotools. All rights reserved.