API (v3.0.0-dev) - Giro3D
    Preparing search index...

    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.

    WmtsSource.fromCapabilities('http://example.com/wmts?SERVICE=WMTS&REQUEST=GetCapabilities', {
    layer: 'MyLayerName',
    })
    .then(wmtsSource => {
    // Do something with the source.
    });

    Hierarchy (View Summary)

    Index

    Properties

    containsFn: CustomContainsFn | undefined
    datatype: TextureDataType

    Gets the datatype of images generated by this source.

    flipY: boolean

    Gets whether images generated from this source should be flipped vertically.

    format: ImageFormat | undefined
    isImageSource: boolean = ...
    isMemoryUsage: true = ...

    Readonly flag to indicate that his object implements MemoryUsage.

    isTiledImageSource: true = ...
    noDataValue: number | undefined
    olprojection: Projection
    priority: RequestPriority = 'auto'
    source: UrlTile
    synchronous: boolean = false

    If true, this source can immediately generate images without any delay.

    transparent: boolean
    type: "TiledImageSource" = ...

    Accessors

    • get colorSpace(): ColorSpace

      Gets the color space of the textures generated by this source.

      Returns ColorSpace

    Methods

    • Returns an adjusted extent, width and height so that request pixels are aligned with source pixels, and requests do not oversample the source.

      Parameters

      • requestExtent: Extent

        The request extent.

      • requestWidth: number

        The width, in pixels, of the request extent.

      • requestHeight: number

        The height, in pixels, of the request extent.

      • margin: number = 0

        The margin, in pixels, around the initial extent.

      Returns GridExtent

      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).

      Parameters

      • extent: Extent

        The extent to test.

      Returns boolean

    • Disposes unmanaged resources of this source.

      Returns void

    • Returns the extent of this source expressed in the CRS of the source. Might be null if the extent of the source is not known.

      Returns Extent

      The extent of the source, if any.

    • Initializes the source.

      Parameters

      • options: { targetProjection: CoordinateSystem }

        Options.

        • targetProjection: CoordinateSystem

          The target projection. Only useful for sources that are able to reproject their data on the fly (typically vector sources).

      Returns Promise<void>

      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.

      Parameters

      • extent: Extent

        The extent to test.

      Returns boolean

      true if the extent and this source extent intersects, false otherwise.

    • Raises an event to reload the source.

      Returns void

    • Constructs a WmtsSource from a WMTS capabilities document.

      Parameters

      Returns Promise<WmtsSource>

      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',
      });