Class OsmLayerParam

    • Constructor Summary

      Constructors 
      Constructor Description
      OsmLayerParam()  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static com.google.common.collect.Multimap<java.lang.String,​java.lang.String> convertToMultiMap​(PObject objectParams)
      convert a param object to a multimap.
      java.lang.String createCommonUrl()
      Create a URL that is common to all image requests for this layer.
      java.lang.String getBaseUrl()
      Get the base url for all tile requests.
      com.google.common.collect.Multimap<java.lang.String,​java.lang.String> getCustomParams()
      Read the customParams into a Multimap.
      org.locationtech.jts.geom.Envelope getMaxExtent()
      Get the max extent as a envelop object.
      java.awt.Dimension getTileSize()  
      void postConstruct()
      Validate the properties have the correct values.
      void setCustomParam​(java.lang.String name, java.lang.String value)
      Set a custom parameter.
      boolean validateBaseUrl()
      Validates the provided base url.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • baseURL

        public java.lang.String baseURL
        The URL used for the tile requests.

        Supported formats:

        • The base part of the URL, for example 'http://tile.openstreetmap.org'. This results in an URL like 'http://tile.openstreetmap.org/12/123/456.png'.
        • An URL template with the placeholders '{x}', '{y}' or '{-y}', and '{z}'. For example: 'http://tile.openstreetmap.org/{z}/{x}/{y}.png'.
          The placeholder '{-y}' provides support for OSGeo TMS tiles.
      • maxExtent

        public double[] maxExtent
        The maximum extent of the osm layer. Must have 4 coordinates, minX, minY, maxX, maxY

        Default: [-20037508.34, -20037508.34, 20037508.34, 20037508.34]

      • tileSize

        public int[] tileSize
        The size of each tile. Must have 2 values: width, height

        Default: [256, 256]

      • resolutions

        public java.lang.Double[] resolutions
        The allowed resolutions for this layer.
      • resolutionTolerance

        public double resolutionTolerance
        The amount of difference between a resolution and a target resolution to consider the two equal. The value is a value from 0-1.
      • dpi

        public java.lang.Double dpi
        The DPI of the OSM tiles.
      • imageExtension

        public java.lang.String imageExtension
        The image extension. for example png, jpeg, etc...
      • customParams

        public PObject customParams
        Custom query parameters to use when making http requests. customParams.

        The json should look something like:

        
         {
             "param1Name": "value",
             "param2Name": ["value1", "value2"]
         }
         
    • Constructor Detail

      • OsmLayerParam

        public OsmLayerParam()
    • Method Detail

      • convertToMultiMap

        public static com.google.common.collect.Multimap<java.lang.String,​java.lang.String> convertToMultiMap​(PObject objectParams)
        convert a param object to a multimap.
        Parameters:
        objectParams - the parameters to convert.
        Returns:
        the corresponding Multimap.
      • getCustomParams

        public com.google.common.collect.Multimap<java.lang.String,​java.lang.String> getCustomParams()
        Read the customParams into a Multimap.
      • setCustomParam

        public void setCustomParam​(java.lang.String name,
                                   java.lang.String value)
        Set a custom parameter.
        Parameters:
        name - the parameter name
        value - the parameter value
      • postConstruct

        public void postConstruct()
        Validate the properties have the correct values.
      • getMaxExtent

        public org.locationtech.jts.geom.Envelope getMaxExtent()
        Get the max extent as a envelop object.
      • getTileSize

        public java.awt.Dimension getTileSize()
      • createCommonUrl

        public java.lang.String createCommonUrl()
        Description copied from class: AbstractTiledLayerParams
        Create a URL that is common to all image requests for this layer. It will take the base url and append all mergeable and custom params to the base url.
        Specified by:
        createCommonUrl in class AbstractTiledLayerParams