| Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Open Street Map options.
|
|||||||||||||||||||||||||||||||||||||||||
Fires:
-
change(module:ol/events/Event~Event) - Generic change event. Triggered when the revision counter is increased. -
propertychange(module:ol/Object.ObjectEvent) - Triggered when a property is changed. -
tileloadend(module:ol/source/Tile.TileSourceEvent) - Triggered when a tile finishes loading, either when its data is loaded, or when loading was aborted because the tile is no longer needed. -
tileloaderror(module:ol/source/Tile.TileSourceEvent) - Triggered if tile loading results in an error. -
tileloadstart(module:ol/source/Tile.TileSourceEvent) - Triggered when a tile starts loading.
Extends
Methods
-
Return the tile load function of the source.
Returns:
TileLoadFunction
-
Return the tile URL function of the source.
Returns:
TileUrlFunction
-
Return the URLs used for this source. When a tileUrlFunction is used instead of url or urls, null will be returned.
Returns:
URLs.
-
Sets whether to render reprojection edges or not (usually for debugging).
Name Type Description renderboolean Render the edges.
-
Sets the tile grid to use when reprojecting the tiles to the given projection instead of the default tile grid for the projection.
This can be useful when the default tile grid cannot be created (e.g. projection has no extent defined) or for optimization reasons (custom tile size, resolutions, ...).
Name Type Description projectionmodule:ol/proj~ProjectionLike Projection.
tilegridmodule:ol/tilegrid/TileGrid~TileGrid Tile grid to use for the projection.
-
Set the tile load function of the source.
Name Type Description tileLoadFunctionmodule:ol/Tile~LoadFunction Tile load function.
-
Set the tile URL function of the source.
Name Type Description tileUrlFunctionmodule:ol/Tile~UrlFunction Tile URL function.
keystring Optional new tile key for the source.
-
Set the URL to use for requests.
Name Type Description urlstring URL.
-
Set the URLs to use for requests.
Name Type Description urlsArray.<string> URLs.