public final class TileLayerWMSOptions extends Object
TileLayerWMS
.Constructor and Description |
---|
TileLayerWMSOptions(String layers)
Creates a
TileLayerWMSOptions object |
Modifier and Type | Method and Description |
---|---|
TileLayerWMSOptions |
setAttribution(String attribution)
Sets the attribution option
|
TileLayerWMSOptions |
setBounds(LatLngBounds bounds)
Sets the bounds option
|
TileLayerWMSOptions |
setContinuousWorld(boolean continuousWorld)
Sets the continuousWorld option
|
TileLayerWMSOptions |
setCRS(ICRS crs)
Sets the CRS option
|
TileLayerWMSOptions |
setDetectRetina(boolean detectRetina)
Sets the detectRetina option
|
TileLayerWMSOptions |
setErrorTileUrl(String url)
Sets the error tile url option
|
TileLayerWMSOptions |
setFormat(String format)
Sets the format option.
|
TileLayerWMSOptions |
setId(String id)
Sets the id option
|
TileLayerWMSOptions |
setMaxNativeZoom(int maxNativeZoom)
Sets the maxNativeZoom option
|
TileLayerWMSOptions |
setMaxZoom(int maxZoom)
Sets the maxZoom option
|
TileLayerWMSOptions |
setMinZoom(int minZoom)
Sets the minZoom option.
|
TileLayerWMSOptions |
setNoWrap(boolean noWrap)
Sets the noWrap option
|
TileLayerWMSOptions |
setopacity(int opacity)
Sets the opacity option
|
TileLayerWMSOptions |
setReuseTiles(boolean reuseTiles)
Sets the reuseTiles option
|
TileLayerWMSOptions |
setStyles(String styles)
Sets the styles option
|
TileLayerWMSOptions |
setSubdomains(String subdomain)
Sets the subdomains option
|
TileLayerWMSOptions |
setSubdomains(String[] subdomains)
Sets the subdomains option
|
TileLayerWMSOptions |
setTileSize(int tileSize)
Sets the tileSize option
|
TileLayerWMSOptions |
setTms(boolean tms)
Sets the tms option
|
TileLayerWMSOptions |
setTransparent(boolean transparent)
Sets the transparent option
|
TileLayerWMSOptions |
setUnloadInvisibleTiles(boolean unload)
Sets the unload invisible tiles option
|
TileLayerWMSOptions |
setUpdateWhenIdle(boolean updateWhenIdle)
Sets the updateWhenIdle option
|
TileLayerWMSOptions |
setVersion(String version)
Sets the version option
|
TileLayerWMSOptions |
setZIndex(int zIndex)
Sets the zIndex option
|
TileLayerWMSOptions |
setZoomOffset(int zoomOffset)
Sets the zoomOffset option
|
TileLayerWMSOptions |
setZoomReverse(boolean zoomReverse)
Sets the zoomReverse option
|
public TileLayerWMSOptions(String layers)
TileLayerWMSOptions
objectlayers
- Comma-separated list of WMS layers to show.public TileLayerWMSOptions setMinZoom(int minZoom)
minZoom
- Minimum zoom numberpublic TileLayerWMSOptions setMaxZoom(int maxZoom)
maxZoom
- Maximum zoom numberpublic TileLayerWMSOptions setMaxNativeZoom(int maxNativeZoom)
maxNativeZoom
- Maximum zoom number the tiles source has available. If it is specified, the tiles on all zoom levels higher than maxNativeZoom
will be loaded from maxZoom
level and auto-scaled.public TileLayerWMSOptions setTileSize(int tileSize)
tileSize
- Tile size (width and height in pixels, assuming tiles are square).public TileLayerWMSOptions setSubdomains(String subdomain)
subdomain
- Subdomains of the tile service. Each letter of the String is a subdomain name.public TileLayerWMSOptions setSubdomains(String[] subdomains)
subdomains
- Subdomains of the tile service.public TileLayerWMSOptions setErrorTileUrl(String url)
url
- URL to the tile image to show in place of the tile that failed to load.public TileLayerWMSOptions setAttribution(String attribution)
attribution
- The string used by the attribution control, describes the layer data.public TileLayerWMSOptions setTms(boolean tms)
tms
- If true
, inverses Y axis numbering for tiles (turn this on for TMS services)public TileLayerWMSOptions setContinuousWorld(boolean continuousWorld)
continuousWorld
- If set to true
, the tile coordinates won't be wrapped by world width (-180 to 180 longitude) or clamped to lie within world height (-90 to 90). Use this if you use Leaflet for maps that don't reflect the real world (e.g. game, indoor or photo maps).public TileLayerWMSOptions setNoWrap(boolean noWrap)
noWrap
- If set to true
, the tiles just won't load outside the world width (-180 to 180 longitude) instead of repeating.public TileLayerWMSOptions setZoomOffset(int zoomOffset)
zoomOffset
- The zoom number used in tile URLs will be offset with this value.public TileLayerWMSOptions setZoomReverse(boolean zoomReverse)
zoomReverse
- If set to true
, the zoom number used in tile URLs will be reversed (maxZoom - zoom
instead of zoom
)public TileLayerWMSOptions setopacity(int opacity)
opacity
- The opacity of the tile layer.public TileLayerWMSOptions setZIndex(int zIndex)
zIndex
- The explicit zIndex of the tile layer. Not set by default.public TileLayerWMSOptions setUnloadInvisibleTiles(boolean unload)
unload
- If true
, all the tiles that are not visible after panning are removed (for better performance). true
by default on mobile WebKit, otherwise false
.public TileLayerWMSOptions setUpdateWhenIdle(boolean updateWhenIdle)
updateWhenIdle
- If false
, new tiles are loaded during panning, otherwise only after it (for better performance). true
by default on mobile WebKit, otherwise false
.public TileLayerWMSOptions setDetectRetina(boolean detectRetina)
detectRetina
- If true
and user is on a retina display, it will request four tiles of half the specified size and a bigger zoom level in place of one to utilize the high resolution.public TileLayerWMSOptions setReuseTiles(boolean reuseTiles)
reuseTiles
- If true
, all the tiles that are not visible after panning are placed in a reuse queue from which they will be fetched when new tiles become visible (as opposed to dynamically creating new ones). This will in theory keep memory usage low and eliminate the need for reserving new memory whenever a new tile is needed.public TileLayerWMSOptions setBounds(LatLngBounds bounds)
bounds
- When this option is set, the TileLayer only loads tiles that are in the given geographical bounds.public TileLayerWMSOptions setId(String id)
id
- (Unique) identifier for a layer.public TileLayerWMSOptions setStyles(String styles)
styles
- Comma-separated list of WMS styles.public TileLayerWMSOptions setFormat(String format)
format
- WMS image format (use 'image/png'
for layers
with transparency).public TileLayerWMSOptions setTransparent(boolean transparent)
transparent
- If true
, the WMS service will return
images with transparency.public TileLayerWMSOptions setVersion(String version)
version
- Version of the WMS service to use.public TileLayerWMSOptions setCRS(ICRS crs)
crs
- Coordinate Reference System to use for the WMS requests,
defaults to map CRS. Don't change this if you're not sure what it means.Copyright © 2017. All rights reserved.