JAXA Earth API for JavaScript
    Preparing search index...

    Class TileGenerator

    Creates tile images using WMTS (Web Map Tile Service) style parameters. Use this when integrating with a map API, for example by using ImageTile from OpenLayers.

    Index

    Constructors

    • Parameters

      • __namedParameters: {
            collectionUrl: string;
            date?: Date;
            band?: string;
            resampling?: Resampling;
            colorMapObject?: ColorMapObject;
            tileSize?: number;
            delay?: number;
        }
        • collectionUrl: string

          The URL of the dataset's collection.json.

        • Optionaldate?: Date

          The date and time of the data to retrieve. If omitted, it behaves as if the current date and time new Date() was specified.

        • Optionalband?: string

          The band of the dataset to use. If omitted, the first band included in the dataset (the first in the order defined in collection.json) is used.

        • Optionalresampling?: Resampling

          The resampling method to use. If omitted, it behaves as if nearest neighbor (je.Resampling.NEAREST) was specified.

        • OptionalcolorMapObject?: ColorMapObject

          The color map conditions for visualization. If omitted, it behaves as if {min: 0, max: 255, colors: ["000000", "ffffff"]} was specified. For color images or classification-type data (data where photometricInterpretation == 1 is not true), this is ignored and the colors originally specified in each dataset take precedence. To avoid issues when sending and receiving rendering conditions between threads such as web workers, this uses ColorMapObject rather than ColorMap.

        • OptionaltileSize?: number

          The size of the tile to create (the number of pixels in width and height). Operation has been verified with 256 and 512. If not specified, it behaves as if 256 was specified.

        • Optionaldelay?: number

          Tiles are retrieved in batches at this interval [milliseconds]. If not specified, it behaves as if 500 was specified. Increasing this value can make communication more efficient by aggregating multiple tile rendering instructions that arrive within this interval and retrieving the data in a batch, but it takes longer for the results to be returned.

      Returns TileGenerator

    Methods

    • Initializes the instance. This must be executed.

      Returns Promise<void>

    • Retrieves the tile data as a DataObject.

      Parameters

      • x: number

        The tile coordinate X.

      • y: number

        The tile coordinate Y.

      • z: number

        The tile coordinate Z.

      • OptionalabortSignal: AbortSignal

        Pass an AbortSignal to enable abort handling.

      Returns Promise<DataObject>

    • Retrieves the tile image as an HTMLCanvasElement.

      Parameters

      • x: number

        The tile coordinate X.

      • y: number

        The tile coordinate Y.

      • z: number

        The tile coordinate Z.

      • OptionalabortSignal: AbortSignal

        Pass an AbortSignal to enable abort handling.

      Returns Promise<HTMLCanvasElement>

      Available only on the browser main thread.

    • Retrieves the tile image as an OffscreenCanvas.

      Parameters

      • x: number

        The tile coordinate X.

      • y: number

        The tile coordinate Y.

      • z: number

        The tile coordinate Z.

      • OptionalabortSignal: AbortSignal

        Pass an AbortSignal to enable abort handling.

      Returns Promise<OffscreenCanvas>

      Available only on the browser main thread or in a web worker.

    • Retrieves the tile image as a Uint8Array of a PNG image.

      Parameters

      • x: number

        The tile coordinate X.

      • y: number

        The tile coordinate Y.

      • z: number

        The tile coordinate Z.

      • OptionalabortSignal: AbortSignal

        Pass an AbortSignal to enable abort handling.

      Returns Promise<Uint8Array<ArrayBufferLike>>