Readonly
containsGets the datatype of images generated by this source.
Readonly
flipYGets whether images generated from this source should be flipped vertically.
Readonly
formatReadonly
isReadonly
isReadonly
isReadonly
noReadonly
olprojectionReadonly
sourceReadonly
synchronousIf true
, this source can immediately generate images without any delay.
Readonly
typeGets the color space of the textures generated by this source.
Returns an adjusted extent, width and height so that request pixels are aligned with source pixels, and requests do not oversample the source.
The request extent.
The width, in pixels, of the request extent.
The height, in pixels, of the request extent.
The margin, in pixels, around the initial extent.
The adjusted parameters.
Gets whether this source contains the specified extent. If a custom contains function is provided, it will be used. Otherwise, intersects is used.
This method is mainly used to discard non-relevant requests (i.e don't process regions that are not relevant to this source).
The extent to test.
Gets the images for the specified extent and pixel size.
The options.
An array containing the functions to generate the images asynchronously.
Returns an approximation of the memory used by this object, in bytes.
The graphics context.
Optional
target: MemoryUsageReportIf specified, the values computed during this call must be added to the existing values in the target. Otherwise, a new report must be built.
The memory usage report. If target is specified, then this must be returned.
Initializes the source.
Options.
The target projection. Only useful for sources that are able to reproject their data on the fly (typically vector sources).
A promise that resolves when the source is initialized.
Test the intersection between the specified extent and this source's extent. This method may be overriden to perform special logic.
The extent to test.
true
if the extent and this source extent intersects, false
otherwise.
Raises an event to reload the source.
Optional
extent: ExtentStatic
fromConstructs a WmtsSource from a WMTS capabilities document.
The URL to the WMTS capabilities document.
Source options.
A promise that resolve with the created WmtsSource.
const url = 'http://example.com/wmts?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetCapabilities';
// Creates the source with layer 'MyLayer' in the 'PM' tile matrix set.
const wmtsSource = await WmtsSource.fromCapabilities(url, {
layer: 'MyLayer',
matrixSet: 'PM',
imageFormat: 'image/png',
});
A TiledImageSource backed by a single WMTS layer. Note: this is a convenient class that simplifies the usage of TiledImageSource.
Currently, it is not possible to directly create a WmtsSource from its constructor. Use the fromCapabilities static method to build a source from a WMTS capabilities document.