public class MapAttribute.MapAttributeValues extends GenericMapAttribute.GenericMapAttributeValues
MapAttribute.| Modifier and Type | Field and Description |
|---|---|
AreaOfInterest |
areaOfInterest
A GeoJSON geometry that is essentially the area of the area to draw on the map.
|
double[] |
bbox
An array of 4 doubles, minX, minY, maxX, maxY.
|
double[] |
center
An array of 2 doubles, (x, y).
|
double |
dpi
The output dpi of the printed map.
|
PArray |
layers
The json with all the layer information.
|
java.lang.Double |
scale
If center is defined then this is the scale of the map centered at center.
|
ZoomToFeatures |
zoomToFeatures
Zoom the map to the features of a specific layer or all features of the map.
|
DEFAULT_PROJECTION, dpiSensitiveStyle, height, longitudeFirst, projection, rotation, useAdjustBounds, useNearestScale, width| Constructor and Description |
|---|
MapAttributeValues(Template template)
Constructor.
|
MapAttributeValues(Template template,
java.lang.Integer width,
java.lang.Integer height)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
MapAttribute.MapAttributeValues |
copy(int width,
int height,
com.google.common.base.Function<MapAttribute.MapAttributeValues,java.lang.Void> updater)
Create a copy of this instance.
|
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.Double |
getRotation()
Gets the rotation.
|
MapAttribute.OverriddenMapAttributeValues |
getWithOverrides(OverviewMapAttribute.OverviewMapAttributeValues paramOverrides)
Creates an
MapAttribute.OverriddenMapAttributeValues
instance with the current object and a given
OverviewMapAttribute.OverviewMapAttributeValues
instance. |
ZoomLevelSnapStrategy |
getZoomLevelSnapStrategy() |
java.lang.Boolean |
getZoomSnapGeodetic() |
java.lang.Double |
getZoomSnapTolerance() |
java.lang.Boolean |
isUseAdjustBounds()
Return true if requestData has useNearestScale and configuration has some zoom levels defined.
|
java.lang.Boolean |
isUseNearestScale()
Return true if requestData has useNearestScale and configuration has some zoom levels defined.
|
void |
postConstruct()
Validate the values provided by the request data and construct MapBounds and parse the layers.
|
void |
recalculateBounds()
Recalculate the bounds after center or bounds have changed.
|
void |
setMapBounds(MapBounds mapBounds) |
void |
setRawLayers(PArray newLayers)
Set the JSON layer definition.
|
getDpiSuggestions, getHeight, getLayers, getMapSize, getTemplate, getValueOr, getWidth, getZoomLevels, isDpiSensitiveStyle, parseProjectionpublic double[] bbox
public AreaOfInterest areaOfInterest
public double[] center
public java.lang.Double scale
public ZoomToFeatures zoomToFeatures
public PArray layers
The first layer in the array will be the top layer in the map. The last layer in the array will be the bottom layer in the map. There for the last layer will be hidden by the first layer (where not transparent).
public double dpi
public MapAttributeValues(Template template, java.lang.Integer width, java.lang.Integer height)
template - the template this map is part of.width - the width of the map.height - the height of the map.public MapAttributeValues(Template template)
template - the template this map is part of.public java.lang.Double getDpi()
GenericMapAttribute.GenericMapAttributeValuesgetDpi in class GenericMapAttribute.GenericMapAttributeValuespublic final PArray getRawLayers()
GenericMapAttribute.GenericMapAttributeValuesGenericMapAttribute.GenericMapAttributeValues.getDpi().getRawLayers in class GenericMapAttribute.GenericMapAttributeValuespublic void setRawLayers(PArray newLayers)
GenericMapAttribute.GenericMapAttributeValuesGenericMapAttribute.GenericMapAttributeValues.getDpi().setRawLayers in class GenericMapAttribute.GenericMapAttributeValuesnewLayers - the new layerspublic final void postConstruct()
throws org.opengis.referencing.FactoryException
GenericMapAttribute.GenericMapAttributeValuespostConstruct in class GenericMapAttribute.GenericMapAttributeValuesorg.opengis.referencing.FactoryExceptionpublic MapBounds getMapBounds()
public void setMapBounds(MapBounds mapBounds)
public void recalculateBounds()
public java.lang.String getProjection()
getProjection in class GenericMapAttribute.GenericMapAttributeValuespublic java.lang.Double getZoomSnapTolerance()
getZoomSnapTolerance in class GenericMapAttribute.GenericMapAttributeValuespublic ZoomLevelSnapStrategy getZoomLevelSnapStrategy()
getZoomLevelSnapStrategy in class GenericMapAttribute.GenericMapAttributeValuespublic java.lang.Boolean getZoomSnapGeodetic()
getZoomSnapGeodetic in class GenericMapAttribute.GenericMapAttributeValuespublic java.lang.Double getRotation()
GenericMapAttribute.GenericMapAttributeValuesgetRotation in class GenericMapAttribute.GenericMapAttributeValuespublic java.lang.Boolean isUseNearestScale()
GenericMapAttribute.GenericMapAttributeValuesisUseNearestScale in class GenericMapAttribute.GenericMapAttributeValuespublic java.lang.Boolean isUseAdjustBounds()
GenericMapAttribute.GenericMapAttributeValuesisUseAdjustBounds in class GenericMapAttribute.GenericMapAttributeValuespublic final MapAttribute.OverriddenMapAttributeValues getWithOverrides(OverviewMapAttribute.OverviewMapAttributeValues paramOverrides)
MapAttribute.OverriddenMapAttributeValues
instance with the current object and a given
OverviewMapAttribute.OverviewMapAttributeValues
instance.paramOverrides - Attributes set in this instance will override attributes in the
current instance.public MapAttribute.MapAttributeValues copy(int width, int height, @Nonnull com.google.common.base.Function<MapAttribute.MapAttributeValues,java.lang.Void> updater)
width - the width of the new map attribute values to createheight - the height of the new map attribute values to createupdater - a function which will be called after copy is made but before postConstruct
is called in order to do other configuration changes.