Options
All
  • Public
  • Public/Protected
  • All
Menu

@aerisweather/javascript-sdk

Index

Modules

Enumerations

Classes

Interfaces

Type aliases

Variables

Functions

Type aliases

AnimationOptions

AnimationOptions: object

A data type that represents the configuration options for an animation.

Type declaration

  • Optional alwaysShow?: boolean

    Whether to always show this animation, meaning it will also be visible if the animation is not a future animation and the current playhead is in the future, or the animation is a future animation and the playhead is in the past.

  • Optional autoplay?: boolean

    Whether to begin playing the animation as soon as it's initialized. Default value is false.

  • Optional duration?: number

    Duration of the animation in seconds.

  • Optional enabled?: boolean

    Whether the animation is enabled.

  • Optional endDelay?: number

    End delay in seconds, which is the duration of the hold time on the last frame before restarting playback at the beginning.

  • Optional from?: number

    Start time offset in seconds relative to the current time, e.g. -5 * 3600 for five hours ago.

  • Optional future?: boolean

    Whether this animation is considered a future animation.

  • Optional intervals?: number

    Total number of intervals to request data for, specifically for image-related animations.

  • Optional key?: string

    Animation identifier.

  • Optional refresh?: number

    Refresh duration in seconds. This is typically only used for data-related animations that may need to reload stale data after a determined length of time.

  • Optional to?: number

    End time offset in seconds relative to the current time, e.g. 2 * 3600 for two hours from now.

AnimationTargets

AnimationTargets: object

Type declaration

  • future: HTMLElement
  • futureText: HTMLElement
  • past: HTMLElement
  • pastText: HTMLElement

ApiConfig

ApiConfig: object

A data type that represents the configuration options for an API request.

Type declaration

  • client: object

    API client configuration to use with the request.

    type

    {{ id: string, secret: string }}

    • id: string

      Client access id.

      type

      {string}

    • secret: string

      Client access secret.

      type

      {string}

  • Optional server?: string

    The API base server path.

    type

    {string}

ApiRequestOptions

ApiRequestOptions: object

A data type that represents the configuration options for an API data request.

Type declaration

  • Optional action?: string

    Request action.

    type

    {string}

  • Optional bounds?: ICoordinateBounds

    Coordinate bounds to search within.

    type

    {ICoordinateBounds}

  • endpoint: string

    Request endpoint (required).

    type

    {string}

  • Optional fields?: string

    A comma-delimited list of response properties for the API to return. This parameter is often used to limit the amount of data returned.

    type

    {string}

  • Optional filter?: string

    Predefined filters for limiting the results. The filter value can be a single, comma-delimited or a semicolon delimited string of filter names.

    type

    {string}

  • Optional from?: string | Date

    Either a Date or valid time string from which to return results for.

    type

    {(string | Date)}

  • Optional limit?: number

    Maximum number of results to return.

    type

    {number}

  • Optional place?: string

    Location to request data for. Refer to the list of supported place values.

    type

    {string}

  • Optional plimit?: number

    Applied only on the periods response property, the total number of periods to return as an integer.

    type

    {number}

  • Optional pskip?: number

    Applied only on the periods response property, used to skip over a specific number of periods in the data set.

    type

    {number}

  • Optional psort?: string

    Applied only on the periods response property, used to sort results based on certain fields contained within the periods.

    type

    {string}

  • Optional query?: string

    Filters results based on certain fields and values in the dataset. Refer to the advanced queries documentation.

    type

    {string}

  • Optional radius?: string

    When requesting the closest results within a circle, the radius determines how far from the specified location to search. A valid unit value must be included in your radius value, e.g., 5mi, 10km, 25miles. If no unit is provided, your value is assumed to be in meters by default.

    type

    {string}

  • Optional skip?: number

    Skips over a specific number of results in the dataset.

    type

    {number}

  • Optional sort?: string

    Sorts results based on certain fields in the dataset. Refer to the sorting documentation.

    type

    {string}

  • Optional to?: string | Date

    Either a Date or valid time string up to which to return results for. When used in conjunction with from(), this value be relative to the from value, not relative to the current time.

    type

    {(string | Date)}

CalloutFormatter

CalloutFormatter: function

Type declaration

    • (): string
    • Returns string

EventObject

EventObject: object

Type declaration

  • Optional data?: any
  • Optional stopImmediatePropagation?: Function
  • Optional stopPropagation?: Function
  • type: string

GroupedLegendOptions

GroupedLegendOptions: LegendOptions & object

A data type that represents the configuration options for a grouped legend.

GroupedLegendType

GroupedLegendType: LegendOptions & object

A data type that represents the configuration options for a grouped legend item.

ImageAnimationOptions

ImageAnimationOptions: AnimationOptions & object

A data type that represents the configuration options for an image-based animation.

InteractiveMapOptions

InteractiveMapOptions: object

A data type that represents the configuration options for a Map instance.

Type declaration

  • Optional account?: Account

    Aeris account to use when requesting map data and imagery.

    type

    {Account}

  • Optional center?: ICoordinate

    Center coordinate to initialize the map view.

    type

    {ICoordinate}

  • Optional layers?: string | string[] | object[]

    Initial layers to add to the map at initialization.

    type

    {(string | string[] | { layer: string; options?: LayerOptions; }[])}

  • Optional reloadOnBoundsChange?: boolean

    Whether map content source data should be reloaded automatically when the map bounds have changed.

    Default value is true. Set this value to false to reduce data and map unit usage.

    type

    {boolean}

  • Optional strategy?: string

    Map strategy.

    The following strategy values are supported:

    • leaflet: Uses the Leaflet.js mapping library
    • mapbox: Uses the MapboxGL mapping library
    • 'openlayers': Uses the OpenLayers mapping library
    • 'google': Uses the Google Maps mapping library
    type

    {string}

  • Optional styles?: object

    Style overrides per layer code.

    type

    {{ [layer: string]: IStyleProvider }}

  • Optional timeline?: AnimationOptions & object

    Configuration options for the map's animation timeline.

    type

    {AnimationOptions}

    see

    {Timeline}

  • Optional zoom?: number

    Zoom level to initialize the map view.

    type

    {number}

LatLonValue

LatLonValue: number[]

A lat/lon numberical value array, e.g. [37.3604, -105.1893] or [-105.1893, 37.3604].

export

LayerConfig

LayerConfig: object

A data type that represents metadata for an Aeris Maps (AMP) layer.

Type declaration

  • Optional bundle?: string[]

    Array of Aeris account levels that are required for accessing the layer.

    type

    {string[]}

  • Optional category?: string

    Layer category.

    type

    {string}

  • Optional code?: string

    Layer code.

    type

    {string}

  • Optional description?: string

    Layer description.

    type

    {string}

  • id: string

    Layer identifier.

    type

    {string}

  • Optional interval?: string

    Layer update interval.

    type

    {string}

  • Optional legendSrc?: string

    Legend source URL to use for the layer.

    type

    {string}

  • Optional modifiers?: LayerModifier[]

    Array of modifier information supported by the layer.

    type

    {LayerModifier[]}

  • name: string

    Layer name.

    type

    {string}

  • Optional regions?: string

    List of regions covered by the layer.

    type

    {string}

  • Optional thumbSrc?: string

    Layer thumbnail URL.

    type

    {string}

  • Optional use?: string

    Layer identifier to inherit metadata from.

    type

    {string}

LayerDataType

LayerDataType: object

A data type that represents the data objects that can be added to a map view.

Type declaration

  • Optional markers?: any

    Marker objects by identifier

  • Optional polygons?: any[]

    Polygon objects

  • Optional polylines?: any[]

    Polyline objects

LayerGroups

LayerGroups: object

A data type that represents a series of layer groups.

Type declaration

  • base: string[]

    Base map layers.

    type

    {string[]}

  • data: string[]

    Weather data layers.

    type

    {string[]}

  • overlays: string[]

    Map overlay layers.

    type

    {string[]}

  • text: string[]

    Weather text data layers.

    type

    {string[]}

LayerOptions

LayerOptions: object

A data type that represents the configuration options for a map content source instance.

Type declaration

  • Optional request?: object

    Request options (for point and shape content sources only).

    type

    {{ action?: ApiAction; paramemters?: any; property?: { time: string, value: string }; }}

    • Optional action?: ApiAction

      API action to use for the request. Default value is ApiAction.WITHIN for point content sources and ApiAction.SEARCH for shape content sources.

      type

      {ApiAction}

    • Optional paramemters?: any

      Defines the request parameters to use when requesting data for the layer.

    • Optional property?: object

      Defines the property key paths to use for the time and value information for point content sources.

      • time: string

        Key path of the property that contains the data's time value for each object in the response.

      • value: string | function

        Key path of the property that contains the data's value for each object in the response. This can also be a function that receives the model's data and returns the value to use in case additional formatting needs to occur on the value.

  • Optional style?: RasterStyle | MarkerStyle | MarkerStyleProvider | VectorStyle | VectorStyleProvider

    Style options for the layer.

    type

    {(RasterStyle | MarkerStyle | MarkerStyleProvider | VectorStyle | VectorStyleProvider)}

  • Optional type?: string

    The map content source type to use. If not provided, the default for the associated layer code will be used.

    The following types are supported:

    • tile: render the layer using raster tiles
    • point: render the layer using map annotations
    • shape: render the layer using vector polygons and polylines
    • text: render the layer using text labels
    type

    {string}

LayerStyle

LayerStyleGroups

LayerStyleGroups: object

Type declaration

LegendConfig

LegendConfig: object

A data type that represents the configuration options for a legend.

Type declaration

  • Optional enabled?: boolean
  • Optional grouped?: boolean

    Whether the legend is a grouped legend.

    type

    {boolean}

  • Optional items?: any
  • Optional layers?: [string]

    Map layer codes associated with the legend type.

    type

    {[string]}

  • Optional range?: [number]

    Data value range to display in the legend.

    type

    {[number]}

  • Optional styles?: LegendStyle

    Style options.

    type

    {LegendStyle}

  • Optional title?: string

    Legend title.

    type

    {string}

  • Optional type?: string

    Legend type code.

    type

    {string}

  • Optional units?: any

    Units configuration.

    type

    {*}

  • Optional use?: string

    Legend type code to inherit options from.

    type

    {string}

LegendImageOptions

LegendImageOptions: object

A data type that represents the configuration options for a legend image request.

Type declaration

  • Optional autosize?: boolean

    Whether the image should be sized automatically based on its configuration.

    type

    {boolean}

  • Optional cell?: object

    Bar legend cell options.

    type

    {{ size?: ISize pad?: number }}

    • Optional pad?: number

      Cell spacing.

      type

      {number}

    • Optional size?: ISize

      Cell size.

      type

      {ISize}

  • Optional columns?: number

    Number of columns to restrict the legend elements to.

    type

    {number}

  • Optional format?: string

    Image output format.

    type

    {string}

  • Optional gutter?: object

    Amount of spacing between elements in x and y directions.

    type

    {{ x: number; y: number; }}

    • x: number
    • y: number
  • Optional interval?: string | number

    Data value interval for color stops.

    type

    {(string | number)}

  • Optional keys?: string
  • Optional label?: object

    Text label options.

    type

    {({ interval?: string | number; fontsize?: number; color?: string; position?: LegendLabelPosition; custom?: string; })}

    • Optional color?: string
    • Optional custom?: string
    • Optional fontsize?: number
    • Optional interval?: string | number
    • Optional position?: LegendLabelPosition
  • Optional metric?: boolean

    Whether to render data in metric units.

    type

    {boolean}

  • Optional orientation?: LegendOrientation

    Layout orientation.

    type

    {LegendOrientation}

  • Optional radius?: number

    Circle radius for point legends.

    type

    {number}

  • Optional range?: number[]

    Data value range to include.

    type

    {number[]}

  • Optional size?: ISize

    Output size.

    type

    {ISize}

  • Optional type?: string

    Legend type code.

    type

    {string}

LegendMetadata

LegendMetadata: object

Type declaration

LegendOptions

LegendOptions: object

A data type that represents the configuration options for a legend.

Type declaration

  • Optional account?: Account

    Aeris account used when requesting data for dynamic legends.

    type

    {Account}

  • Optional autosize?: boolean

    Whether the view should be sized automatically based on its configuration.

    type

    {boolean}

  • Optional filter?: string
  • Optional format?: "svg" | "png"

    Output format.

    type

    {('svg' | 'png')}

  • Optional keys?: string
  • Optional metric?: boolean

    Whether data units should be output in Metric.

    type

    {boolean}

  • Optional size?: ISize

    Output size.

    type

    {ISize}

  • Optional styles?: LegendStyle

    Style options.

    type

    {LegendStyle}

  • Optional units?: object

    Units configuration.

    type

    {{ metric?: string; imperial?: string; }}

    • Optional imperial?: string

      Imperial unit string.

      type

      {string}

    • Optional metric?: string

      Metric unit string.

      type

      {string}

  • Optional within?: any

LegendRequestParams

LegendRequestParams: object

A data type that represents the possible legend image request parameters.

Type declaration

  • Optional filter?: string
  • Optional keys?: string
  • Optional labels?: string
  • Optional lc?: string
  • Optional ls?: string
  • Optional range?: number[]
  • Optional units?: string

LegendStyle

LegendStyle: object

A data type that represents the configuration options for a legend style.

Type declaration

  • Optional cell?: object

    Bar legend cell styles.

    type

    {{ size?: { width: number; height: number; } }}

    • Optional size?: object

      Size for color cells in a bar legend.

      type

      {{ width: number; height: number; }}

      • height: number
      • width: number
  • Optional columns?: number
    type

    {number}

  • Optional gutter?: string
    type

    {string}

  • Optional interval?: number | string

    Data value interval for which to draw cells between color stops.

    type

    {number}

  • Optional label?: object

    Text label styles.

    type

    {{ interval?: number; position?: LegendLabelPosition; fontsize?: number; color?: string; }}

    • Optional color?: string

      Text color for labels.

      type

      {string}

    • Optional fontsize?: number

      Font size for text labels.

      type

      {number}

    • Optional interval?: number | string

      Data value interval for which to display value text labels.

      type

      {number}

    • Optional position?: LegendLabelPosition

      Position of value labels relative to the color bar (bar legends only).

      type

      {LegendLabelPosition}

  • Optional metric?: boolean

    Whether to display value labels in Metric units.

    type

    {boolean}

  • Optional orientation?: LegendOrientation

    Layout orientation (bar legends only).

    type

    {LegendOrientation}

  • Optional radius?: number

    Circle radius for point-related legends.

    type

    {number}

MapAnimationOptions

MapAnimationOptions: AnimationOptions & object

A data type that represents the configuration options for a map view's animation.

type

{{ enabled?: boolean; autoplay?: boolean; alwaysShowPast?: boolean; alwaysShowFuture?: boolean; }}

MapConfigLayersOptions

MapConfigLayersOptions: object

A data type that represents the configuration options for map layers.

Type declaration

  • Optional base?: string[]

    Base layer codes, which will be rendered at the bottom of the layer stack.

    type

    {string[]}

  • Optional data?: string[]

    Weather data layer codes, which will be rendered above base layers but below overlay layers.

    type

    {string[]}

  • Optional overlays?: string[]

    Overlay layer codes, which will be rendered above data layers.

    type

    {string[]}

  • Optional text?: string[]

    Text layer codes, which will be rendered at the top of the layer stack.

    type

    {string[]}

MapConfigOptions

MapConfigOptions: object

A data type that represents the configuration options a map configuration instance.

Type declaration

  • Optional autoFuture?: boolean

    Whether corresponding future layers should automatically be added to the map when adding a data layer when available. Default is true.

    type

    {boolean}

  • Optional bounds?: ICoordinateBounds

    Coordinate bounds of the visible region.

    type

    {ICoordinateBounds}

  • Optional center?: string | ICoordinate

    Center of the map, either as a place string or coordinate object.

    type

    {(string | ICoordinate)}

  • Optional combined?: boolean

    Whether all layers should be combined together into a single image. This results in fewer requests but increased map units since base and overlay layers will be requested each time data and/or text layers change.

    Default value is false.

    type

    {boolean}

  • Optional date?: Date | number

    Date and time either as a Date object or UNIX timestamp as a number (e.g. 20180601174100).

    type

    {(Date | number)}

  • Optional layers?: MapConfigLayersOptions

    Defines the layers to display on the map grouped by category.

    type

    {MapConfigLayersOptions}

  • Optional metric?: boolean

    Whether text layers should display values in Metric units. Default is false.

    type

    {boolean}

  • Optional offset?: string

    Time offset either as a UNIX timestamp as a string (e.g. 20180601174100) or a relative offset as a string (e.g. -6hours).

    type

    {(string)}

  • Optional size?: object

    Map size.

    type

    {({ width?: number; height?: number | 'auto'; factor?: number; })}

    • Optional factor?: number

      Aspect ratio of width-to-height. This value is used when calculating an auto height based on the configured width.

      type

      {number}

    • Optional height?: number | "auto"

      Image height, which can either be a number or auto. If auto is used, then the image height will be determined by the configured width and the value for factor.

      type

      {(number | 'auto')}

    • Optional width?: number

      Image width

      type

      {number}

  • Optional zoom?: number

    Zoom level.

    type

    {number}

MapControlOptions

MapControlOptions: object

A data type that represents the configuration options for a map view's interface controls.

Type declaration

  • Optional layers?: object[]

    The layer-related controls to display above the map view.

  • Optional regions?: object[]

    The region/zoom-related controls to display along the bottom of the map view.

MapOverlayOptions

MapOverlayOptions: object

A data type that represents the configuration options for a map view's overlays.

Type declaration

  • Optional branding?: object

    Optional branding element to display over the map view.

    Element can either be a static image (url) or and HTML string. If both properties are provided, the HTML string will be used. This branding element can be customized using CSS overrides as needed.

    • Optional html?: string

      HTML string content. Takes precedence over img when both are provided.

    • Optional img?: string

      URL for the image source.

  • Optional timestamp?: string

    Timestamp output format.

  • Optional title?: string

    Map title, which will be displayed in a title bar element across the top-left of the map view. Title bar can be customized using CSS overrides as needed.

MapRequestOptions

MapRequestOptions: object

A data type that represents the configuration options for an API map request.

Type declaration

  • Optional bounds?: ICoordinateBounds

    Coordinate bounds defining the visible region.

    type

    {ICoordinateBounds}

  • Optional format?: string

    Output format, e.g. png or jpg.

    type

    {string}

  • Optional layers?: string[] | LayerGroups

    Layer groups.

    type

    {(string[] | LayerGroups)}

  • Optional metric?: boolean

    Whether text values should be output in Metric units.

    type

    {boolean}

  • Optional offset?: string

    Time offset for the map data.

    type

    {string}

  • Optional p?: string

    Location the map will be centered on.

    type

    {string}

  • Optional size?: object

    Output image size.

    type

    {{ width: number; height: number; }}

    • height: number
    • width: number
  • Optional type?: MapRequestType

    Type of map request, which determines the request URL format.

    type

    {MapRequestType}

  • Optional zoom?: number

    Zoom level.

    type

    {number}

MapState

MapState: object

Type declaration

MapViewAnimatorOptions

MapViewAnimatorOptions: object

Type declaration

  • alwaysShowFuture: boolean
  • alwaysShowPast: boolean
  • autoplay: boolean
  • enabled: boolean

MapViewOptions

MapViewOptions: object

A data type that represents the configuration options for a MapView instance.

Type declaration

MarkerData

MarkerData: object

Type declaration

  • [key: string]: any

MarkerDef

MarkerDef: object

Type declaration

  • Optional config?: any
  • marker: any
  • style: any

MarkerStyle

MarkerStyle: object

A data type that provides style options for marker objects on a map.

Type declaration

  • Optional callout?: string | CalloutFormatter

    Function used to format the marker callout content based on the provided object data.

  • Optional className?: string

    Style class name to add to the marker's DOM element.

    type

    {string}

  • Optional html?: string

    HTML content to use when rendering the icon.

    type

    {string}

  • Optional icon?: object

    Provides the icon options for the style. If a value for html is provided, the marker will be rendered as HTML and this value will be ignored.

    type

    {string}

    • Optional anchor?: number[]

      The point coordinates of the tip of the icon (relative to the top-left corner).

      type

      {number[]}

    • Optional retinaUrl?: string

      URL to a retina sized version of the icon image. If not provided, the url icon path will be used for retina devices.

      type

      {string}

    • url: string

      The URL to the icon image (absolute or relative to the script path).

      type

      {string}

  • Optional size?: number[]

    Size of the icon as [width, height], e.g. [20,15]

    type

    {number[]}

  • Optional spacing?: number

    Minimum distance, in screen pixels/points, between rendered markers on the map. If not specified or 0, then all markers will be rendered (default).

  • Optional svg?: object

    Provides the options for rendering the icon as an SVG element. If a value for html is provided, the marker will be rendered as HTML and this value will be ignored.

    type

    {VectorStyle}

    • Optional shape?: VectorStyle & object

      The shape options.

      type

      {{ type: string; }}

    • Optional text?: object

      The text style options.

      type

      {{ value: string; x: number; y: number; size: number; style?: string; color?: string; padding?: number[]; }}

      • Optional autosize?: boolean

        Whether to automatically size the marker based on the width and height of the text. Default is true.

        type

        {boolean}

      • Optional color?: string

        Text color.

        type

        {string}

      • Optional padding?: number[]

        Amount of padding to insert around the text as [x, y], where x is the amount of padding on the left and right, and y is the amount of padding on the top and bottom.

        type

        {number[]}

      • size: number

        Font size.

        type

        {number}

      • Optional style?: string

        Font style, e.g. normal or bold.

        type

        {string}

      • value: string

        Text value to display.

        type

        {string}

      • x: number

        Determines the x-coordinate of the starting point of the text baseline.

        type

        {number}

      • y: number

        Determines the y-coordinate of the starting point of the text baseline.

        type

        {number}

MarkerStyleProvider

MarkerStyleProvider: MarkerStyle | function

Parameters

Parameters: object

Type declaration

  • [key: string]: any

PointSourceOptions

PointSourceOptions: object

A data type that provides the configuration options for a tile source instance.

Type declaration

  • style: MarkerStyle

    Style associated with the source.

    type

    {MarkerStyle}

Procedure

Procedure: function

Type declaration

    • (...args: any[]): void
    • Parameters

      • Rest ...args: any[]

      Returns void

RGB

RGB: object

A data type that represents the individual RGB color components for a color.

Type declaration

  • Optional a?: number
  • b: number
  • g: number
  • r: number

RasterStyle

RasterStyle: object

A data type that provides style options for raster layers on a map, such as images and tiles.

Type declaration

  • Optional blendMode?: string

    Blend mode to apply to the image.

    type

    {string}

  • Optional blur?: number

    Amount to blur the image.

    type

    {number}

  • Optional filters?: string[]
  • Optional opacity?: number

    Opacity of the layer on the map view.

    type

    {number}

RegionType

RegionType: object

A data type that represents a pre-defined region based on a center coordinate or coordinate bounds.

Type declaration

SVGCircleOptions

SVGCircleOptions: SVGShapeOptions & object

A data type that represents SVG circle configuration options.

type

{{ radius?: number; center?: { x: number; y: number; } }}

SVGPathOptions

SVGPathOptions: SVGShapeOptions & object

A data type that represents SVG path configuration options.

type

{{ viewBox?: string; }}

SVGRectOptions

SVGRectOptions: SVGShapeOptions & object

A data type that represents SVG rectangle configuration options.

type

{{ margin?: number; radius?: number; }}

SVGShapeOptions

SVGShapeOptions: object

A data type that represents SVG shape configuration options.

Type declaration

  • Optional fill?: object
    • Optional color?: string
    • Optional opacity?: number
  • Optional stroke?: object
    • Optional color?: string
    • Optional opacity?: number
    • Optional width?: number

SVGTextOptions

SVGTextOptions: object

A data type that represents SVG text configuration options.

Type declaration

  • Optional anchor?: string
  • Optional color?: string
  • Optional font?: string
  • Optional size?: number
  • Optional style?: string
  • Optional value?: string | number
  • Optional x?: number
  • Optional y?: number

ShapeDef

ShapeDef: object

Type declaration

  • Optional data?: any
  • polygon: any
  • style: any

ShapeGroup

ShapeGroup: object

Type declaration

ShapeSourceOptions

ShapeSourceOptions: object

A data type that provides the configuration options for a tile source instance.

Type declaration

  • style: VectorStyle

    Style associated with the source.

    type

    {VectorStyle}

TextAnimationData

TextAnimationData: object

A data type that represents a series of ITimeValueRepresentable objects keyed by unique identifier.

Type declaration

TileAnimationOptions

TileAnimationOptions: AnimationOptions & object

A data type that represents the configuration options for an tile-based animation.

TileSourceOptions

TileSourceOptions: object

A data type that provides the configuration options for a tile source instance.

Type declaration

  • Optional alwaysShow?: boolean

    Whether this tile source should always be visible regardless of past or future state. Default value is false.

  • Optional animation?: object

    Animation options for the tile source.

    • enabled: boolean

      Whether animation is enabled.

      type

      {boolean}

    • type: string

      Type of animation, either tile or image. Default value is tile.

      type

      {string}

  • Optional future?: boolean

    A Boolean indicating whether the tile source represents future data.

    type

    {boolean}

  • Optional style?: RasterStyle

    Style associated with the source.

    type

    {RasterStyle}

  • time: Date | number

    The timestamp to use for the source data, either as a Date or an Epoch time in milliseconds.

    type

    {(Date | number)}

VectorStyle

VectorStyle: object

A data type that provides style options for vector objects on a map, such as text, polygons and polylines.

Type declaration

  • Optional className?: string

    Style class name to add to the shape's DOM element.

    type

    {string}

  • Optional fill?: object

    The shape's fill style options.

    type

    {{ color?: string; opacity?: number; rule?: string; }}

  • Optional id?: string
  • Optional path?: string

    Defines the shape of the path for SVG elements.

    type

    {string}

  • Optional smoothing?: number

    The amount to simplify the shape path on each zoom level. More smoothing means better performance and a smoother appearance, and less means more accurate representation.

    This value is not supported for all mapping strategies.

    type

    {number}

  • Optional stroke?: object

    The shape's stroke style options.

    type

    {{ color?: string; opacity?: number; width?: number; lineCap?: string; lineJoin?: string; dashArray?: string; dashOffset?: string; }}

VectorStyleProvider

VectorStyleProvider: VectorStyle | function

Variables

Const CancelToken

CancelToken: CancelTokenStatic = axios.CancelToken

Const combinedLayers

combinedLayers: string[] = ['stormcells']

Const layers

layers: any = require('./layers').default

Const pointLayers

pointLayers: string[] = ['air-quality', 'earthquakes', 'fires', 'records', 'rivers', 'stormreports']

Const shapeLayers

shapeLayers: string[] = ['convective-outlook', 'drought-monitor', 'fire-outlook']

Const textLayers

textLayers: string[] = ['observations']

Functions

Const boundsStrFromCenter

  • boundsStrFromCenter(lat: number, lon: number, zoom: number, size: ISize): string
  • Parameters

    • lat: number
    • lon: number
    • zoom: number
    • size: ISize

    Returns string

Const camelcase

  • camelcase(str: string): string
  • Returns a new string by converting the specified string to camelcase.

    Parameters

    • str: string

    Returns string

Const cloneDeep

  • cloneDeep(obj: any): any
  • Parameters

    • obj: any

    Returns any

Const countries

  • countries(): object
  • Returns a country collection keyed by two-letter country abbreviation.

    Returns object

    • [key: string]: string

Const debounce

  • debounce<F>(fn: F, wait: number, isImmediate?: boolean): F
  • Type parameters

    Parameters

    • fn: F
    • wait: number
    • Default value isImmediate: boolean = false

    Returns F

extend

  • extend(...args: any[]): any
  • Parameters

    • Rest ...args: any[]

    Returns any

Const flatten

  • flatten(arr: any[], result?: any[]): any[]
  • Parameters

    • arr: any[]
    • Default value result: any[] = []

    Returns any[]

Const get

  • get(obj: any, path: string): any
  • Access a deep value inside a object. Works by passing a path like "foo.bar", also works with nested arrays like "foo[0][1].baz"

    Parameters

    • obj: any
    • path: string

    Returns any

Const has

  • has(obj: any, path: string): boolean
  • Parameters

    • obj: any
    • path: string

    Returns boolean

Const hyphenate

  • hyphenate(str: string): string
  • Returns a new string by converting a camelcase string to hyphenated.

    Parameters

    • str: string

    Returns string

Const isArray

  • isArray(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

Const isBoolean

  • isBoolean(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

Const isCombined

  • isCombined(layer: string): boolean
  • Parameters

    • layer: string

    Returns boolean

Const isCoord

  • isCoord(str: string): boolean
  • Parameters

    • str: string

    Returns boolean

Const isDOM

  • isDOM(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

Const isDate

  • isDate(obj: any): boolean
  • Parameters

    • obj: any

    Returns boolean

Const isEmpty

  • isEmpty(obj: any): boolean
  • Parameters

    • obj: any

    Returns boolean

Const isFunction

  • isFunction(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

Const isLight

  • isLight(color: string | RGB): boolean
  • Returns whether the specified color is light based on its luminance.

    The value for color can either be a hex color string, #ffcc00, or an RGB object, { r: 100, g: 150, b: 50 }.

    Parameters

    • color: string | RGB

    Returns boolean

Const isMergebleObject

  • isMergebleObject(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

Const isNull

  • isNull(obj: any): boolean
  • Parameters

    • obj: any

    Returns boolean

Const isNumber

  • isNumber(obj: any): boolean
  • Parameters

    • obj: any

    Returns boolean

Const isObject

  • isObject(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

Const isPlainObject

  • isPlainObject(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

Const isPoint

  • isPoint(layer: string): boolean
  • Parameters

    • layer: string

    Returns boolean

Const isShape

  • isShape(layer: string): boolean
  • Parameters

    • layer: string

    Returns boolean

Const isString

  • isString(obj: any): boolean
  • Parameters

    • obj: any

    Returns boolean

Const isText

  • isText(layer: string): boolean
  • Parameters

    • layer: string

    Returns boolean

Const isTile

  • isTile(layer: string): boolean
  • Parameters

    • layer: string

    Returns boolean

Const isUndefined

  • isUndefined(obj: any): boolean
  • Parameters

    • obj: any

    Returns boolean

Const isValidKey

  • isValidKey(key: string): boolean
  • Parameters

    • key: string

    Returns boolean

Const isZipcode

  • isZipcode(str: string): boolean
  • Parameters

    • str: string

    Returns boolean

Const isset

  • isset(obj: any): boolean
  • Parameters

    • obj: any

    Returns boolean

Const loadScript

  • loadScript(src: string): Promise<any>
  • Parameters

    • src: string

    Returns Promise<any>

Const loadStyles

  • loadStyles(src: string): Promise<any>
  • Parameters

    • src: string

    Returns Promise<any>

Const luminance

  • luminance(color: any): number
  • Returns the luminance of the specified color.

    The value for color can either be a hex color string, #ffcc00, or an RGB object, { r: 100, g: 150, b: 50 }.

    Parameters

    • color: any

    Returns number

Const mapTimestampFromDate

  • mapTimestampFromDate(date: Date): string
  • Parameters

    • date: Date

    Returns string

Const merge

  • merge<T>(target: T, ...sources: T[]): T
  • Type parameters

    • T: any

    Parameters

    • target: T
    • Rest ...sources: T[]

    Returns T

Const normalize

  • Parameters

    • params: any

    Returns any

  • Parameters

    • params: any

    Returns any

  • Parameters

    Returns ICoordinate

Const offsetToTime

  • offsetToTime(str: string): number
  • Parameters

    • str: string

    Returns number

Const pick

  • pick(obj: any, paths: string[]): any
  • Parameters

    • obj: any
    • paths: string[]

    Returns any

Const pickBy

  • pickBy(obj: any, predicate: Function): any
  • Parameters

    • obj: any
    • predicate: Function

    Returns any

Const set

  • set(obj: any, path: string, val: any): any
  • Set a deep property on nested objects.

    Parameters

    • obj: any

      A object

    • path: string

      A path

    • val: any

      Anything that can be set

    Returns any

Const states

  • states(): object
  • Returns a states collection keyed by country (us or ca) and the two-letter state abbreviation.

    Returns object

    • [key: string]: object
      • [key: string]: string

Const timestampFromDate

  • timestampFromDate(date: Date): string
  • Parameters

    • date: Date

    Returns string

Const toArray

  • toArray(str: string): string[]
  • Parameters

    • str: string

    Returns string[]

Const toBounds

  • Converts the specified coordinate bounds object to a string whose values are rounded to the nearest decimal place according to places.

    Parameters

    Returns string

Const toCodeArray

  • toCodeArray(value?: string | string[] | Layer[]): string[]
  • Parameters

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

    Returns string[]

Const toCoord

  • toCoord(lat: number, lon: number, places?: number): string
  • Converts the specified coordinate to a string whose values are rounded to the nearest decimal place according to places.

    Parameters

    • lat: number
    • lon: number
    • Default value places: number = 3

    Returns string

Const toName

  • toName(str: string): string
  • Returns a new string by formatting the specified string as a place name.

    Parameters

    • str: string

    Returns string

Const toQueryStr

  • toQueryStr(obj: any): string
  • Parameters

    • obj: any

    Returns string

Const toRGB

  • toRGB(hex: string): RGB
  • Converts the specified hex color string to an RGB object.

    Parameters

    • hex: string

    Returns RGB

Const toTimeStr

  • toTimeStr(date: Date, from?: Date): string
  • Parameters

    • date: Date
    • Optional from: Date

    Returns string

Const toType

  • toType(a: any): any
  • Parameters

    • a: any

    Returns any

Const ucfirst

  • ucfirst(str: string): string
  • Returns a new string by capitalizing the first letter in the specified string.

    Parameters

    • str: string

    Returns string

Const ucwords

  • ucwords(str: string): string
  • Returns a new string by capitalizing the first letter of each word in the specified string.

    Parameters

    • str: string

    Returns string

Const unitsForProp

  • unitsForProp(prop: string, metric: boolean): string
  • Parameters

    • prop: string
    • metric: boolean

    Returns string

Generated using TypeDoc