Classes
Members
-
module:ol/source/OSM.ATTRIBUTION{string}
-
The attribution containing a link to the OpenStreetMap Copyright and License page.
Type Definitions
-
Options{Object}
-
Properties:
Name Type Description attributions
AttributionLike | undefined Attributions.
cacheSize
number | undefined Deprecated. Use the cacheSize option on the layer instead.
crossOrigin
null | string
(defaults to 'anonymous')The
crossOrigin
attribute for loaded images. Note that you must provide acrossOrigin
value if you want to access pixel data with the Canvas renderer. See https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image for more detail.interpolate
boolean
(defaults to true)Use interpolated values when resampling. By default, linear interpolation is used when resampling. Set to false to use the nearest neighbor instead.
maxZoom
number
(defaults to 19)Max zoom.
reprojectionErrorThreshold
number
(defaults to 0.5)Maximum allowed reprojection error (in pixels). Higher values can increase reprojection performance, but decrease precision.
tileLoadFunction
LoadFunction | undefined Optional function to load a tile given a URL. The default is
function(imageTile, src) { imageTile.getImage().src = src; };
transition
number
(defaults to 250)Duration of the opacity transition for rendering. To disable the opacity transition, pass
transition: 0
.url
string
(defaults to 'https://tile.openstreetmap.org/{z}/{x}/{y}.png')URL template. Must include
{x}
,{y}
or{-y}
, and{z}
placeholders.wrapX
boolean
(defaults to true)Whether to wrap the world horizontally.
zDirection
number | NearestDirectionFunction
(defaults to 0)Choose whether to use tiles with a higher or lower zoom level when between integer zoom levels. See
getZForResolution
.