Class: UrlTile

ol/source/UrlTile~UrlTile


Base class for sources providing tiles divided into a tile grid over http.

Fires:
  • module:ol/source/TileEvent experimental

Methods

getTileLoadFunction(){module:ol/Tile~LoadFunction}

source/UrlTile.js, line 96

Return the tile load function of the source.

Returns:
TileLoadFunction

getTileUrlFunction(){module:ol/Tile~UrlFunction}

source/UrlTile.js, line 105

Return the tile URL function of the source.

Returns:
TileUrlFunction

getUrls(){!Array.<string>|null}

source/UrlTile.js, line 116

Return the URLs used for this source. When a tileUrlFunction is used instead of url or urls, null will be returned.

Returns:
URLs.

setTileLoadFunction(tileLoadFunction)

source/UrlTile.js, line 149

Set the tile load function of the source.

Name Type Description
tileLoadFunction module:ol/Tile~LoadFunction

Tile load function.

setTileUrlFunction(tileUrlFunction, opt_key)

source/UrlTile.js, line 161

Set the tile URL function of the source.

Name Type Description
tileUrlFunction module:ol/Tile~UrlFunction

Tile URL function.

key string

Optional new tile key for the source.

setUrl(url)

source/UrlTile.js, line 176

Set the URL to use for requests.

Name Type Description
url string

URL.

setUrls(urls)

source/UrlTile.js, line 188

Set the URLs to use for requests.

Name Type Description
urls Array.<string>

URLs.