Interface WxAPIOptions

Options to construct WxAPI object

Example

    const requestInit: RequestInit = {
headers
}; // add more options if needed such as headers, mode, credentials, etc
const options = {
dataServerURL:'https://tiles.metoceanapi.com/data/',
requestInit: { headers: myHeaders },
}
const wxapi = new WxAPI(options);

Hierarchy

  • WxTilesLibOptions
    • WxAPIOptions

Properties

colorSchemes?: WxColorSchemes

Additional color schemes to use for the library

Additional Color styles to use for the library

dataServerURL: string

base URL of the server

ext?: string

extension of the tiles

maskChannel?: "A" | "R" | "G" | "B"

channel to use for masking from RGBA masks 0 - for the masks from Sarah (current), 3 - for the masks from Mapbox

Default

'R'

maskDepth?: number

maximum zoom level for mask tiles on the server

Default

9

maskURL?: string

full masks tiles URL, Example: https://server.com/masks/{z}/{x}/{y}.png

Default

'auto' - will be set to dataServerURL + 'masks/{z}/{x}/{y}.png' 'none' - will disable masks

qtreeURL?: string

URL to qtree file. QTree is a hierarchical structure, that allows to quickly find tile's belonging to the sea/land.

Default

'auto' - will be set to dataServerURL + 'masks/9+1.seamask.qtree' 'none' - will disable the use of QTree

requestInit?: RequestInit

parameters to be passed to every fetch() aka headers, credentials, cors, etc for interaction with backend data server

units?: WxUnits

Additional units to use for the library

Generated using TypeDoc