public final class OsmLayerParam extends AbstractTiledLayerParams
| Modifier and Type | Field and Description |
|---|---|
java.lang.String |
baseURL
The URL used for the tile requests.
|
PObject |
customParams
Custom query parameters to use when making http requests.
|
java.lang.Double |
dpi
The DPI of the OSM tiles.
|
java.lang.String |
imageExtension
The image extension.
|
double[] |
maxExtent
The maximum extent of the osm layer.
|
java.lang.Double[] |
resolutions
The allowed resolutions for this layer.
|
double |
resolutionTolerance
The amount of difference between a resolution and a target resolution to consider the two equal.
|
int[] |
tileSize
The size of each tile.
|
rasterStylefailOnError, name, opacity| Constructor and Description |
|---|
OsmLayerParam() |
| Modifier and Type | Method and 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. |
com.vividsolutions.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.
|
public java.lang.String baseURL
Supported formats:
public double[] maxExtent
Default: [-20037508.34, -20037508.34, 20037508.34, 20037508.34]
public int[] tileSize
Default: [256, 256]
public java.lang.Double[] resolutions
public double resolutionTolerance
public java.lang.Double dpi
public java.lang.String imageExtension
public PObject customParams
customParams.
The json should look something like:
{
"param1Name": "value",
"param2Name": ["value1", "value2"]
}
public com.google.common.collect.Multimap<java.lang.String,java.lang.String> getCustomParams()
customParams into a Multimap.public void setCustomParam(java.lang.String name,
java.lang.String value)
name - the parameter namevalue - the parameter valuepublic void postConstruct()
throws java.net.URISyntaxException
java.net.URISyntaxExceptionpublic com.vividsolutions.jts.geom.Envelope getMaxExtent()
public java.lang.String getBaseUrl()
AbstractTiledLayerParamsgetBaseUrl in class AbstractTiledLayerParamspublic java.awt.Dimension getTileSize()
public java.lang.String createCommonUrl()
AbstractTiledLayerParamscreateCommonUrl in class AbstractTiledLayerParamspublic boolean validateBaseUrl()
AbstractTiledLayerParamsvalidateBaseUrl in class AbstractTiledLayerParamspublic static com.google.common.collect.Multimap<java.lang.String,java.lang.String> convertToMultiMap(PObject objectParams)
objectParams - the parameters to convert.