Package org.mapfish.print.attribute.map
Class OverviewMapAttribute.OverviewMapAttributeValues
- java.lang.Object
-
- org.mapfish.print.attribute.map.GenericMapAttribute.GenericMapAttributeValues
-
- org.mapfish.print.attribute.map.OverviewMapAttribute.OverviewMapAttributeValues
-
- Enclosing class:
- OverviewMapAttribute
public final class OverviewMapAttribute.OverviewMapAttributeValues extends GenericMapAttribute.GenericMapAttributeValues
The value ofMapAttribute
.
-
-
Field Summary
Fields Modifier and Type Field Description double[]
bbox
An array of 4 doubles, minX, minY, maxX, maxY.double[]
center
An array of 2 doubles, (x, y).java.lang.Double
dpi
The output dpi of the printed map.PArray
layers
The json with all the layer information.java.lang.Double
scale
Ifcenter
is defined then this is the scale of the map centered atcenter
.-
Fields inherited from class org.mapfish.print.attribute.map.GenericMapAttribute.GenericMapAttributeValues
DEFAULT_PROJECTION, dpiSensitiveStyle, height, longitudeFirst, pdfA, projection, rotation, useAdjustBounds, useNearestScale, width
-
-
Constructor Summary
Constructors Constructor Description OverviewMapAttributeValues(Template template)
Constructor.OverviewMapAttributeValues(Template template, java.lang.Integer width, java.lang.Integer height)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Double
getDpi()
Return the DPI value for the map.MapBounds
getMapBounds()
java.lang.String
getProjection()
PArray
getRawLayers()
Return the JSON layer definition.java.lang.String
getStyle()
double
getZoomFactor()
void
postConstruct()
Validate the values provided by the request data and construct MapBounds and parse the layers.void
setRawLayers(PArray newLayers)
Set the JSON layer definition.-
Methods inherited from class org.mapfish.print.attribute.map.GenericMapAttribute.GenericMapAttributeValues
getDpiSuggestions, getHeight, getLayers, getMapSize, getRotation, getTemplate, getValueOr, getWidth, getZoomLevels, getZoomLevelSnapStrategy, getZoomSnapGeodetic, getZoomSnapTolerance, isDpiSensitiveStyle, isUseAdjustBounds, isUseNearestScale, parseProjection, replaceLayer
-
-
-
-
Field Detail
-
layers
public PArray layers
The json with all the layer information. This will be parsed in postConstruct into a list of layers and therefore this field should not normally be accessed.
-
dpi
public java.lang.Double dpi
The output dpi of the printed map.
-
bbox
public double[] bbox
An array of 4 doubles, minX, minY, maxX, maxY. The bounding box of the overview-map.If a bounding box is given, the overview-map shows a fixed extent. The configuration parameter
zoomFactor
is ignored in this case.
-
center
public double[] center
An array of 2 doubles, (x, y). The center of the overview-map.If center and scale are given, the overview-map shows a fixed extent. The configuration parameter
zoomFactor
is ignored in this case.
-
scale
public java.lang.Double scale
Ifcenter
is defined then this is the scale of the map centered atcenter
.
-
-
Constructor Detail
-
OverviewMapAttributeValues
public OverviewMapAttributeValues(Template template)
Constructor.- Parameters:
template
- the template this map is part of.
-
OverviewMapAttributeValues
public OverviewMapAttributeValues(Template template, java.lang.Integer width, java.lang.Integer height)
Constructor.- Parameters:
template
- the template this map is part of.width
- the width of the map.height
- the height of the map.
-
-
Method Detail
-
postConstruct
public void postConstruct() throws org.geotools.api.referencing.FactoryException
Description copied from class:GenericMapAttribute.GenericMapAttributeValues
Validate the values provided by the request data and construct MapBounds and parse the layers.- Overrides:
postConstruct
in classGenericMapAttribute.GenericMapAttributeValues
- Throws:
org.geotools.api.referencing.FactoryException
-
getMapBounds
public MapBounds getMapBounds()
-
getDpi
public java.lang.Double getDpi()
Description copied from class:GenericMapAttribute.GenericMapAttributeValues
Return the DPI value for the map. This method is abstract because the dpi value is optional for the overview map, but must be given for the normal map. So, in the overview map the field is defined with a @HasDefaultValue annotation.- Specified by:
getDpi
in classGenericMapAttribute.GenericMapAttributeValues
-
getRawLayers
public PArray getRawLayers()
Description copied from class:GenericMapAttribute.GenericMapAttributeValues
Return the JSON layer definition. This method is abstract for the same reasons asGenericMapAttribute.GenericMapAttributeValues.getDpi()
.- Specified by:
getRawLayers
in classGenericMapAttribute.GenericMapAttributeValues
-
setRawLayers
public void setRawLayers(PArray newLayers)
Description copied from class:GenericMapAttribute.GenericMapAttributeValues
Set the JSON layer definition. This method is abstract for the same reasons asGenericMapAttribute.GenericMapAttributeValues.getDpi()
.- Specified by:
setRawLayers
in classGenericMapAttribute.GenericMapAttributeValues
- Parameters:
newLayers
- the new layers
-
getZoomFactor
public double getZoomFactor()
-
getStyle
public java.lang.String getStyle()
-
getProjection
public java.lang.String getProjection()
- Overrides:
getProjection
in classGenericMapAttribute.GenericMapAttributeValues
-
-