Package org.geotools.styling.zoom
Class RatioZoomContext
Object
MedialZoomContext
ContinuousZoomContext
RatioZoomContext
- All Implemented Interfaces:
ZoomContext
- Direct Known Subclasses:
RatioZoomContext
ZoomContext defined by an initial scale and a ratio between levels.
- Author:
- Kevin Smith, Boundless
-
Field Summary
Fields inherited from interface ZoomContext
HINT_ID -
Constructor Summary
ConstructorsConstructorDescriptionRatioZoomContext(double initialScale, double ratio) Create a zoom context where zoom level 0 has a scale denominator ofinitial, and each subsequent level isratiotimes that.RatioZoomContext(int initialLevel, double initialScale, double ratio) Create a zoom context where zoom levelinitialLevelhas a scale denominator ofinitial, and each subsequent level isratiotimes that. -
Method Summary
Modifier and TypeMethodDescriptionprotected doublegetMedialScale(int level) Get a scale between the given zoom level and the nextprotected doublegetScaleDenominator(double level) Find the reciprocal of the scale at a specified zoom level in this context.booleanisInRange(int level) Is the given level within the range for which the context has clearly defined scales.Methods inherited from class ContinuousZoomContext
getScaleDenominatorMethods inherited from class MedialZoomContext
getRangeMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ZoomContext
getRange, getScaleDenominator
-
Constructor Details
-
RatioZoomContext
public RatioZoomContext(double initialScale, double ratio) Create a zoom context where zoom level 0 has a scale denominator ofinitial, and each subsequent level isratiotimes that.- Parameters:
initialScale- scale denominator at level 0ratio- ratio between zoom levels
-
RatioZoomContext
public RatioZoomContext(int initialLevel, double initialScale, double ratio) Create a zoom context where zoom levelinitialLevelhas a scale denominator ofinitial, and each subsequent level isratiotimes that.- Parameters:
initialLevel- Level to use as initialinitialScale- scale denominator at levelinitialLevelratio- ratio between the scale at consecutive zoom levels. Zoom level z+1 has a scale ratio times that of z and a scale denominator 1/ratio times that of z.
-
-
Method Details
-
getScaleDenominator
protected double getScaleDenominator(double level) Description copied from class:ContinuousZoomContextFind the reciprocal of the scale at a specified zoom level in this context.- Specified by:
getScaleDenominatorin classContinuousZoomContext- Parameters:
level- The level- Returns:
- The scale denominator
-
getMedialScale
protected double getMedialScale(int level) Description copied from class:ContinuousZoomContextGet a scale between the given zoom level and the next- Overrides:
getMedialScalein classContinuousZoomContext
-
isInRange
public boolean isInRange(int level) Description copied from interface:ZoomContextIs the given level within the range for which the context has clearly defined scales.- Specified by:
isInRangein interfaceZoomContext
-