Constructor and Description |
---|
TileLayerOptions()
Creates a
TileLayerOptions object |
Modifier and Type | Method and Description |
---|---|
TileLayerOptions |
setAttribution(String attribution)
Sets the attribution option
|
TileLayerOptions |
setBounds(LatLngBounds bounds)
Sets the bounds option
|
TileLayerOptions |
setContinuousWorld(boolean continuousWorld)
Sets the continuousWorld option
|
TileLayerOptions |
setDetectRetina(boolean detectRetina)
Sets the detectRetina option
|
TileLayerOptions |
setErrorTileUrl(String url)
Sets the error tile url option
|
TileLayerOptions |
setId(String id)
Sets the id option
|
TileLayerOptions |
setMaxNativeZoom(int maxNativeZoom)
Sets the maxNativeZoom option
|
TileLayerOptions |
setMaxZoom(int maxZoom)
Sets the maxZoom option
|
TileLayerOptions |
setMinZoom(int minZoom)
Sets the minZoom option.
|
TileLayerOptions |
setNoWrap(boolean noWrap)
Sets the noWrap option
|
TileLayerOptions |
setopacity(int opacity)
Sets the opacity option
|
TileLayerOptions |
setReuseTiles(boolean reuseTiles)
Sets the reuseTiles option
|
TileLayerOptions |
setSubdomains(String subdomain)
Sets the subdomains option
|
TileLayerOptions |
setSubdomains(String[] subdomains)
Sets the subdomains option
|
TileLayerOptions |
setTileSize(int tileSize)
Sets the tileSize option
|
TileLayerOptions |
setTms(boolean tms)
Sets the tms option
|
TileLayerOptions |
setUnloadInvisibleTiles(boolean unload)
Sets the unload invisible tiles option
|
TileLayerOptions |
setUpdateWhenIdle(boolean updateWhenIdle)
Sets the updateWhenIdle option
|
TileLayerOptions |
setZIndex(int zIndex)
Sets the zIndex option
|
TileLayerOptions |
setZoomOffset(int zoomOffset)
Sets the zoomOffset option
|
TileLayerOptions |
setZoomReverse(boolean zoomReverse)
Sets the zoomReverse option
|
public TileLayerOptions setMinZoom(int minZoom)
minZoom
- Minimum zoom numberpublic TileLayerOptions setMaxZoom(int maxZoom)
maxZoom
- Maximum zoom numberpublic TileLayerOptions 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 TileLayerOptions setTileSize(int tileSize)
tileSize
- Tile size (width and height in pixels, assuming tiles are square).public TileLayerOptions setSubdomains(String subdomain)
subdomain
- Subdomains of the tile service. Each letter of the String is a subdomain name.public TileLayerOptions setSubdomains(String[] subdomains)
subdomains
- Subdomains of the tile service.public TileLayerOptions setErrorTileUrl(String url)
url
- URL to the tile image to show in place of the tile that failed to load.public TileLayerOptions setAttribution(String attribution)
attribution
- The string used by the attribution control, describes the layer data.public TileLayerOptions setTms(boolean tms)
tms
- If true
, inverses Y axis numbering for tiles (turn this on for TMS services)public TileLayerOptions 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 TileLayerOptions 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 TileLayerOptions setZoomOffset(int zoomOffset)
zoomOffset
- The zoom number used in tile URLs will be offset with this value.public TileLayerOptions setZoomReverse(boolean zoomReverse)
zoomReverse
- If set to true
, the zoom number used in tile URLs will be reversed (maxZoom - zoom
instead of zoom
)public TileLayerOptions setopacity(int opacity)
opacity
- The opacity of the tile layer.public TileLayerOptions setZIndex(int zIndex)
zIndex
- The explicit zIndex of the tile layer. Not set by default.public TileLayerOptions 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 TileLayerOptions 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 TileLayerOptions 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 TileLayerOptions 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 TileLayerOptions setBounds(LatLngBounds bounds)
bounds
- When this option is set, the TileLayer only loads tiles that are in the given geographical bounds.public TileLayerOptions setId(String id)
id
- (Unique) identifier for a layer.Copyright © 2017. All rights reserved.