WxAPI is an initialisation object for the library. See WxAPIOptions for options.

Example

import { WxAPI } from 'wx-tiles';
const wxapi = new WxAPI({
dataServerURL: 'https://server.com/',
// other options
});

Hierarchy

  • WxAPI

Constructors

Properties

dataServerURL: string
ext: string
initDone: Promise<void>

resolved when WxAPI is ready to be used

loadMaskFunc: ((__namedParameters: XYZ) => Promise<ImageData>)

Type declaration

    • (__namedParameters: XYZ): Promise<ImageData>
    • Internal

      function to load mask tiles

      Parameters

      • __namedParameters: XYZ

      Returns Promise<ImageData>

maskChannel: number
maskDepth: number
maskURL: string
qtree: QTree

instance of the qtree object

requestInit?: RequestInit

Methods

  • Creates a new instance of the WxDataSetManager class WxDataSetManager for the given dataset name.

    Returns

    • A new instance of the WxDataSetManager class for the given dataset name.

    Throws

    • If the dataset or instance is not found.

    Parameters

    • datasetName: string

      The name of the dataset to create a manager for.

    Returns Promise<WxDataSetManager>

  • Filters the list of all available datasets' names by the given variable name.

    Returns

    • A list of all available datasets' names that have the given variable name.

    Parameters

    • varName: string

      The variable name to filter by.

    Returns Promise<string[]>

  • Returns a list of all available datasets' names.

    Returns

    • A list of all available datasets' names.

    Returns Promise<string[]>

  • Returns the list of all available variables for the given dataset name.

    Returns

    • A list of all available variables for the given dataset name, or undefined if the dataset is not found.

    Parameters

    • datasetName: string

      The name of the dataset to get the variables for.

    Returns Promise<undefined | string[]>

Generated using TypeDoc