Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface TileLayerOptions

Hierarchy

  • TileLayerOptions

Index

Properties

Optional attribution

attribution: string

e.g. "© CloudMade" — the string used by the attribution control, describes the layer data.

Default value: ''.

Optional continuousWorld

continuousWorld: boolean

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).

Default value: false.

Optional detectRetina

detectRetina: boolean

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.

Default value: false.

Optional errorTileUrl

errorTileUrl: string

URL to the tile image to show in place of the tile that failed to load.

Default value: ''.

Optional maxNativeZoom

maxNativeZoom: number

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.

Default value: null.

Optional maxZoom

maxZoom: number

Maximum zoom number.

Default value: 18.

Optional minZoom

minZoom: number

Minimum zoom number.

Default value: 0.

Optional noWrap

noWrap: boolean

If set to true, the tiles just won't load outside the world width (-180 to 180 longitude) instead of repeating.

Default value: false.

Optional opacity

opacity: number

The opacity of the tile layer.

Default value: 1.0.

Optional reuseTiles

reuseTiles: boolean

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.

Default value: false.

Optional subdomains

subdomains: string[]

Subdomains of the tile service. Can be passed in the form of one string (where each letter is a subdomain name) or an array of strings.

Default value: 'abc'.

Optional tileSize

tileSize: number

Tile size (width and height in pixels, assuming tiles are square).

Default value: 256.

Optional tms

tms: boolean

If true, inverses Y axis numbering for tiles (turn this on for TMS services).

Default value: false.

Optional unloadInvisibleTiles

unloadInvisibleTiles: boolean

If true, all the tiles that are not visible after panning are removed (for better performance). true by default on mobile WebKit, otherwise false.

Optional updateWhenIdle

updateWhenIdle: boolean

If false, new tiles are loaded during panning, otherwise only after it (for better performance). true by default on mobile WebKit, otherwise false.

Optional zIndex

zIndex: number

The explicit zIndex of the tile layer. Not set by default.

Optional zoomOffset

zoomOffset: number

The zoom number used in tile URLs will be offset with this value.

Default value: 0.

Optional zoomReverse

zoomReverse: boolean

If set to true, the zoom number used in tile URLs will be reversed (maxZoom

  • zoom instead of zoom)

Default value: false.