Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MapRequest

An object that is responsible for configuring and performing a single request to the Aeris Weather API.

export

Hierarchy

  • MapRequest

Index

Constructors

constructor

  • Initializes a new request instance configured with the specified client access keys.

    Parameters

    Returns MapRequest

Methods

base

  • Sets the base layers, which will be rendered at the bottom of the layer stack.

    memberof

    MapRequest

    Parameters

    • Optional value: string | string[] | Layer[]

    Returns MapRequest

bounds

  • Sets the bounding box coordinates for the rendered map region.

    memberof

    MapRequest

    Parameters

    Returns MapRequest

center

  • Sets the center for the map request. The center can be a place name or a geographical coordinate value.

    memberof

    MapRequest

    Parameters

    Returns MapRequest

clone

  • Returns a copy of the request.

    memberof

    MapRequest

    Returns MapRequest

data

  • Sets the weather data layers, which will be rendered above the base layers but below overlays and text.

    memberof

    MapRequest

    Parameters

    • Optional value: string | string[] | Layer[]

    Returns MapRequest

date

  • Sets the time offset value using the specified date.

    memberof

    MapRequest

    Parameters

    • value: Date

    Returns MapRequest

get

  • Perform the request.

    Parameters

    Returns Promise<MapResult>

layers

  • Sets all layers, which will be rendered in the order in which they are provided by value.

    memberof

    MapRequest

    Parameters

    • Optional value: string | string[] | Layer[]

    Returns MapRequest

metric

  • Sets whether text data should be rendered as Metric units.

    memberof

    MapRequest

    Parameters

    • Optional value: boolean

    Returns MapRequest

offset

  • Sets the time offset value.

    memberof

    MapRequest

    Parameters

    • Optional value: string | number

    Returns MapRequest

overlays

  • Sets the overlay layers, which will be rendered above weather data layers but below text layers.

    memberof

    MapRequest

    Parameters

    • Optional value: string | string[] | Layer[]

    Returns MapRequest

param

  • param(key: string, value?: any): MapRequest | any
  • Sets or returns the specified parameter.

    Parameters

    • key: string
    • Optional value: any

    Returns MapRequest | any

place

  • Sets the location the map will be centered on.

    memberof

    MapRequest

    Parameters

    • Optional value: string

    Returns MapRequest

range

  • Sets the server subdomain range for the request, e.g. [1, 2, 3, 4].

    memberof

    MapRequest

    Parameters

    • Optional value: number[]

    Returns MapRequest | number[]

setParams

  • Sets multiple request parameters.

    memberof

    MapRequest

    Parameters

    • params: any

    Returns MapRequest

size

  • Sets the map width and height.

    memberof

    MapRequest

    Parameters

    • w: number
    • h: number

    Returns MapRequest

text

  • Sets the text layers, which will be rendered at the top of the layer stack.

    memberof

    MapRequest

    Parameters

    • Optional value: string | string[] | Layer[]

    Returns MapRequest

type

  • Sets the type of map image to request, either image (default) or tile.

    memberof

    MapRequest

    Parameters

    Returns MapRequest

url

  • url(groups?: string[]): string
  • Returns the url string for the request based on the configured parameters and options.

    memberof

    MapRequest

    Parameters

    • Default value groups: string[] = []

    Returns string

zoom

  • Sets the zoom level.

    memberof

    MapRequest

    Parameters

    • Optional value: number

    Returns MapRequest

Object literals

config

config: object

Base configuration for the request.

memberof

MapRequest

server

server: string = "https://maps.api.xweather.com"

client

client: object

id

id: undefined = undefined

secret

secret: undefined = undefined

Generated using TypeDoc