Layer source for tile data with URLs in a set XYZ format that are
defined in a URL template. By default, this follows the widely-used
Google grid where x 0 and y 0 are in the top left. Grids like
TMS where x 0 and y 0 are in the bottom left can be used by
using the {-y} placeholder in the URL template, so long as the
source does not have a custom tile grid. In this case,
module:ol/source/TileImage~TileImage can be used with a tileUrlFunction
such as:
The crossOrigin attribute for loaded images. Note that
you must provide a crossOrigin value if you are using the WebGL renderer or 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.
The pixel ratio used by the tile service.
For example, if the tile service advertizes 256px by 256px tiles but actually sends 512px
by 512px images (for retina/hidpi devices) then tilePixelRatio
should be set to 2.
Optional function to get
tile URL given a tile coordinate and the projection.
Required if url or urls are not provided.
url
string
URL template. Must include {x}, {y} or {-y},
and {z} placeholders. A {?-?} template pattern, for example subdomain{a-f}.domain.com,
may be used instead of defining each one separately in the urls option.
urls
Array.<string>
An array of URL templates.
wrapX
boolean
true
Whether to wrap the world horizontally.
transition
number
Duration of the opacity transition for rendering.
To disable the opacity transition, pass transition: 0.