Class GenericMapAttribute

    • Field Detail

      • JSON_DPI_SUGGESTIONS

        public static final java.lang.String JSON_DPI_SUGGESTIONS
        The json key for the suggested DPI values in the client config.
        See Also:
        Constant Field Values
      • JSON_MAX_DPI

        public static final java.lang.String JSON_MAX_DPI
        The json key for the max DPI value in the client config.
        See Also:
        Constant Field Values
      • JSON_MAP_WIDTH

        public static final java.lang.String JSON_MAP_WIDTH
        The json key for the width of the map in the client config.
        See Also:
        Constant Field Values
      • JSON_MAP_HEIGHT

        public static final java.lang.String JSON_MAP_HEIGHT
        The json key for the height of the map in the client config.
        See Also:
        Constant Field Values
      • JSON_MAX_WIDTH

        public static final java.lang.String JSON_MAX_WIDTH
        The json key for the max width of the map in the client config (for mapExport).
        See Also:
        Constant Field Values
      • JSON_MAX_HEIGHT

        public static final java.lang.String JSON_MAX_HEIGHT
        The json key for the max height of the map in the client config (for mapExport).
        See Also:
        Constant Field Values
    • Constructor Detail

      • GenericMapAttribute

        public GenericMapAttribute()
    • Method Detail

      • parseProjection

        public static org.geotools.api.referencing.crs.CoordinateReferenceSystem parseProjection​(java.lang.String projection,
                                                                                                 java.lang.Boolean longitudeFirst)
        Parse the given projection.
        Parameters:
        projection - The projection string.
        longitudeFirst - longitudeFirst
      • getMaxDpi

        public final java.lang.Double getMaxDpi()
      • setMaxDpi

        public final void setMaxDpi​(java.lang.Double maxDpi)
        The maximum DPI allowed for maps.

        If a request is made with a higher DPI, the request fails.

        Parameters:
        maxDpi - the value
      • getDpiSuggestions

        public final double[] getDpiSuggestions()
        Get DPI suggestions.
        Returns:
        DPI suggestions
      • setDpiSuggestions

        public final void setDpiSuggestions​(double[] dpiSuggestions)
        Suggestions for DPI values to use. Typically these are used by the client to create a UI for a user.
        Parameters:
        dpiSuggestions - DPI suggestions
      • getWidth

        public final java.lang.Integer getWidth()
      • setWidth

        public final void setWidth​(java.lang.Integer width)
        The width of the map in pixels. This value should match the width of the sub-report in the JasperReport template.
        Parameters:
        width - Width
      • getHeight

        public final java.lang.Integer getHeight()
      • setHeight

        public final void setHeight​(java.lang.Integer height)
        The height of the map in pixels. This value should match the height of the sub-report in the JasperReport template.
        Parameters:
        height - Height
      • getMaxWidth

        public final java.lang.Integer getMaxWidth()
      • setMaxWidth

        public final void setMaxWidth​(java.lang.Integer maxWidth)
        Limits the maximum width of the map.
        Parameters:
        maxWidth - the value
      • getMaxHeight

        public final java.lang.Integer getMaxHeight()
      • setMaxHeight

        public final void setMaxHeight​(java.lang.Integer maxHeight)
        Limits the maximum height of the map.
        Parameters:
        maxHeight - the value
      • setZoomLevels

        public final void setZoomLevels​(ZoomLevels zoomLevels)
        The list of Zoom Levels.

        Depending on the zoomLevelSnapStrategy, this will be used to compute the actual zoom level of the map.

        Parameters:
        zoomLevels - the value
      • setZoomSnapTolerance

        public final void setZoomSnapTolerance​(java.lang.Double zoomSnapTolerance)
        The zoom level tolerance.

        Used in ZoomLevelSnapStrategy.HIGHER_SCALE and ZoomLevelSnapStrategy.LOWER_SCALE to specify the cutoff value.

        Parameters:
        zoomSnapTolerance - the value
      • setZoomLevelSnapStrategy

        public final void setZoomLevelSnapStrategy​(ZoomLevelSnapStrategy zoomLevelSnapStrategy)
        The strategy to use to compute the actual zoom level to use.

        If you specify this value, you must set the zoomLevels as well.

        Possible values are:

        • CLOSEST_LOWER_SCALE_ON_TIE: Find the closest zoom level. If the targetScale is directly between two zoomLevels then the smaller/higher resolution scale will be chosen.
        • CLOSEST_HIGHER_SCALE_ON_TIE: Find the closest zoom level. If the targetScale is directly between two zoomLevels then the larger/lower resolution scale will be chosen.
        • HIGHER_SCALE: Always choose the zoom-level that is just higher than the target value.
        • LOWER_SCALE: Always choose the zoom-level that is just lower than the target value.

        Parameters:
        zoomLevelSnapStrategy - the value
        See Also:
        ZoomLevelSnapStrategy
      • setZoomSnapGeodetic

        public final void setZoomSnapGeodetic​(java.lang.Boolean zoomSnapGeodetic)
        If true, snap to geodetic scales.
        Parameters:
        zoomSnapGeodetic - the value
      • validate

        public void validate​(java.util.List<java.lang.Throwable> validationErrors,
                             Configuration configuration)
        Description copied from interface: ConfigurationObject
        validate that the configuration was correct.
        Parameters:
        validationErrors - a list to add any detected errors to.
        configuration - the containing configuration