public class MapfishMapContext
extends java.lang.Object
AffineTransform to render the layer graphics.| Constructor and Description |
|---|
MapfishMapContext(MapBounds bounds,
java.awt.Dimension mapSize,
double rotationInDegree,
double dpi,
double requestorDpi,
java.lang.Boolean forceLongitudeFirst,
boolean dpiSensitiveStyle)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
MapBounds |
getBounds() |
double |
getDPI() |
java.awt.Dimension |
getMapSize() |
java.awt.Rectangle |
getPaintArea() |
double |
getRequestorDPI() |
MapBounds |
getRotatedBounds() |
java.awt.Dimension |
getRotatedMapSize() |
double |
getRotation() |
double |
getRoundedScale()
Get a nicely rounded scale for to use for displaying the map scale.
|
Scale |
getScale() |
java.awt.geom.AffineTransform |
getTransform()
Returns an
AffineTransform taking the rotation into account. |
java.lang.Boolean |
isDpiSensitiveStyle() |
java.lang.Boolean |
isForceLongitudeFirst() |
org.geotools.geometry.jts.ReferencedEnvelope |
toReferencedEnvelope()
Get the bounds as a referenced envelope.
|
public MapfishMapContext(MapBounds bounds, java.awt.Dimension mapSize, double rotationInDegree, double dpi, double requestorDpi, java.lang.Boolean forceLongitudeFirst, boolean dpiSensitiveStyle)
bounds - the map boundsmapSize - the map sizerotationInDegree - the rotation in degreedpi - the dpi of the printed maprequestorDpi - the dpi of the client mapforceLongitudeFirst - If true then force longitude coordinates as the first coordinate.dpiSensitiveStyle - Scale the vector styles?public final double getRotation()
public final MapBounds getBounds()
public final MapBounds getRotatedBounds()
public final java.awt.Dimension getMapSize()
public final Scale getScale()
public final double getRoundedScale()
One of the output parameters of the CreateMapProcessor is 'mapContext' which can
be accessed in a template. If the scale is required in the template then it can be accessed via:
$P{mapContext}.getRoundedScale()
public final java.awt.Dimension getRotatedMapSize()
public final java.awt.geom.AffineTransform getTransform()
AffineTransform taking the rotation into account.public final double getDPI()
public final double getRequestorDPI()
public final java.awt.Rectangle getPaintArea()
public final java.lang.Boolean isForceLongitudeFirst()
public final java.lang.Boolean isDpiSensitiveStyle()
public final org.geotools.geometry.jts.ReferencedEnvelope toReferencedEnvelope()