Options
All
  • Public
  • Public/Protected
  • All
Menu

Class InteractiveMap

An InteractiveMap object provides an abstract interface for displaying weather-related data on an interactive map view using one of the supported third-party mapping libraries.

export
implements

{MapStrategyDataSource}

Hierarchy

Implements

Index

Constructors

constructor

  • Initializes a map instance with the specified target and configuration object.

    memberof

    InteractiveMap

    Parameters

    • target: any

      Either the HTMLElement where you want your map view to be rendered, or an existing map object instance that pertains to one of the supported third-party mapping libraries. If a map object instance if provided, then that instance will be used for rendering weather data instead of the library creating a new instance.

    • Optional opts: InteractiveMapOptions
    • Optional onInit: (map: InteractiveMap) => void

    Returns InteractiveMap

Properties

update

update: (Anonymous function) = debounce(() => {this._loadForBounds(true);}, 250)

Updates the map timeline and all active map content sources on the map.

memberof

InteractiveMap

Accessors

account

  • The Aeris account to use when requesting data for the map.

    memberof

    InteractiveMap

    Returns Account

  • The Aeris account to use when requesting data for the map.

    memberof

    InteractiveMap

    Parameters

    Returns void

config

  • Configuration and style manager for the map content sources and associated layers.

    readonly
    memberof

    InteractiveMap

    Returns MapLayerConfig

isMetric

  • get isMetric(): boolean
  • Returns whether the current map units are set to metric.

    readonly
    memberof

    InteractiveMap

    Returns boolean

layerInfo

  • Returns the layer metadata info instance.

    readonly
    memberof

    InteractiveMap

    Returns Layers

map

  • get map(): any
  • Returns the underlying third-party map object instance associated with the current map strategy.

    readonly
    memberof

    InteractiveMap

    Returns any

opts

  • Returns the configured options for the map.

    readonly
    memberof

    InteractiveMap

    Returns InteractiveMapOptions

strategy

  • Returns the current map strategy being used.

    readonly
    memberof

    InteractiveMap

    Returns AnyMapStrategy

timeline

  • Returns the map's animation timeline.

    readonly
    memberof

    InteractiveMap

    Returns Timeline

Methods

addLayer

  • Adds an AMP layer to the map for the specified layer code.

    memberof

    InteractiveMap

    Parameters

    • layer: string
    • Optional opts: LayerOptions

    Returns InteractiveMap

addLayers

  • Adds a series of AMP layers for the specified array of layer codes.

    memberof

    InteractiveMap

    Parameters

    • layers: string[]

    Returns InteractiveMap

addModule

  • addModule(module: any, overrides?: any, constructorOpts?: any): void
  • Adds the map content source associated with a map module.

    memberof

    InteractiveMap

    Parameters

    • module: any
    • Default value overrides: any = null
    • Default value constructorOpts: any = null

    Returns void

addSource

  • Adds a new map content source for the specified layer code.

    memberof

    InteractiveMap

    Parameters

    • source: any
    • Optional opts: LayerOptions

    Returns InteractiveMap

bringLayerToFront

  • bringLayerToFront(layer: string): void
  • Updates the layer's zIndex order by bringing it to the top of the layer stack. This only affects tile and image layers.

    memberof

    InteractiveMap

    Parameters

    • layer: string

    Returns void

createSource

  • createSource(key: string, type: string, config: any): any
  • Instantiates and returns a new map content source instance based on the specified type and configuration options.

    memberof

    InteractiveMap

    Parameters

    • key: string
    • type: string
    • config: any

    Returns any

disableAutoUpdate

  • disableAutoUpdate(): void
  • Disables auto-updating of map data.

    memberof

    InteractiveMap

    Returns void

enableAutoUpdate

  • enableAutoUpdate(seconds: number): void
  • Enables auto-updating of map data on regular intervals based on the specified number of seconds.

    memberof

    InteractiveMap

    Parameters

    • seconds: number

    Returns void

fitBounds

  • fitBounds(bounds: GeoBounds, padding?: number[]): void
  • Sets the map bounds to contain the specified geographical bounds with optional padding insets.

    memberof

    InteractiveMap

    Parameters

    • bounds: GeoBounds
    • Optional padding: number[]

    Returns void

getBounds

  • Returns the geographical bounds for the visible map region.

    memberof

    InteractiveMap

    Returns GeoBounds

getCenter

  • Returns the map's center coordinate.

    memberof

    InteractiveMap

    Returns Coordinate

getSource

  • getSource(key: string): any
  • Returns the map content source associated with the specified key, if any.

    memberof

    InteractiveMap

    Parameters

    • key: string

    Returns any

getSourceForId

  • getSourceForId(id: string): any
  • Returns the map content source associated with the specified identifier, if any.

    memberof

    InteractiveMap

    Parameters

    • id: string

    Returns any

getSourceForLayer

  • getSourceForLayer(layer: string): any
  • Returns the map content source associated with the specified layer code, if any.

    memberof

    InteractiveMap

    Parameters

    • layer: string

    Returns any

getZoom

  • getZoom(): number
  • Returns the current map zoom level.

    memberof

    InteractiveMap

    Returns number

has

  • has(type: string): boolean
  • Returns whether the listeners are registered for the specified event name.

    memberof

    EventDispatcher

    Parameters

    • type: string

    Returns boolean

hasSource

  • hasSource(key: string): boolean
  • Returns whether a data source exists on the map for the specified key.

    memberof

    InteractiveMap

    Parameters

    • key: string

    Returns boolean

isReady

  • isReady(): boolean
  • Returns whether the map is ready, meaning the underlying map view and events have been fully setup and initialized.

    memberof

    InteractiveMap

    Returns boolean

off

  • Removes a registered listener function for the specified event.

    memberof

    EventDispatcher

    Parameters

    • type: string

      Name of the event to remove the listener for.

    • callback: Function

      Handler function to remove so it won't be executed next time the event is triggered.

    • Default value scope: any = null

    Returns EventDispatcher

offAll

on

  • on(type: string, callback: Function, scope?: any, priority?: number): EventDispatcher
  • Registers a listener function to be executed each time an event occurs

    memberof

    EventDispatcher

    Parameters

    • type: string

      Name of the event to listen for. Value can contain multiple event names separated by spaces to trigger the same handler function for each event name.

    • callback: Function

      Handler function to be called when the event occurs

    • Default value scope: any = null
    • Default value priority: number = 0

    Returns EventDispatcher

once

  • once(type: string, callback: Function, scope?: any, priority?: number): EventDispatcher
  • Registers a listener function to be executed the first time an event occurs.

    memberof

    EventDispatcher

    Parameters

    • type: string

      Name of the event to listen for. Value can contain multiple event names separated by spaces to trigger the same handler function for each event name.

    • callback: Function

      Handler function to be called when the event occurs

    • Default value scope: any = null
    • Default value priority: number = 0

    Returns EventDispatcher

removeAllSources

  • Removes all active data sources from the map.

    memberof

    InteractiveMap

    Returns InteractiveMap

removeLayer

  • Removes an AMP layer from the map for the specified layer code.

    memberof

    InteractiveMap

    Parameters

    • layer: string

    Returns InteractiveMap

removeLayerForId

  • removeLayerForId(id: string): this
  • Removes an AMP layer from the map for the specified identifier.

    memberof

    InteractiveMap

    Parameters

    • id: string

    Returns this

removeLayers

  • Removes a series of AMP layers associated with the specified array of layer codes.

    memberof

    InteractiveMap

    Parameters

    • layers: string[]

    Returns InteractiveMap

removeSource

  • Removes the map content source associated with the specified layer code.

    memberof

    InteractiveMap

    Parameters

    • source: any

    Returns InteractiveMap

sendLayerToBack

  • sendLayerToBack(layer: string): void
  • Updates the layer's zIndex order by sending it to the bottom of the layer stack. This only affects tile and image layers.

    memberof

    InteractiveMap

    Parameters

    • layer: string

    Returns void

setBounds

  • Sets the map bounds to contain the specified geographical bounds.

    memberof

    InteractiveMap

    Parameters

    Returns void

setCenter

  • Sets the map's center coordinate.

    memberof

    InteractiveMap

    Parameters

    Returns void

setLayerOrder

  • setLayerOrder(layer: string, zIndex: number): void
  • Updates the layer's zIndex order. This only affects tile and image layers.

    memberof

    InteractiveMap

    Parameters

    • layer: string
    • zIndex: number

    Returns void

setMetric

  • setMetric(isMetric: boolean): void
  • Sets the units to display on the map.

    Map content sources that display measurement values should observe the change:unit event and update their content on the map accordingly.

    memberof

    InteractiveMap

    Parameters

    • isMetric: boolean

    Returns void

setView

  • Sets the map's center coordinate and zoom level.

    memberof

    InteractiveMap

    Parameters

    Returns void

setZoom

  • setZoom(zoom: number): void
  • Sets the map zoom level.

    memberof

    InteractiveMap

    Parameters

    • zoom: number

    Returns void

showCallout

  • showCallout(target: any, content: any, opts?: any): void
  • Presents a callout bubble on the map from the specified target. The target can either be an Coordinate object or a native marker object for the current mapping strategy.

    You can provide native options to configure the callout via the opts parameter, which is a configuration object as supported by the strategy's mapping library.

    memberof

    InteractiveMap

    Parameters

    • target: any
    • content: any
    • Optional opts: any

    Returns void

trigger

  • Triggers the specified event so that all registered listeners will be executed with the specified parameters.

    memberof

    EventDispatcher

    Parameters

    • type: any

      Event name to trigger

    • Default value data: any = null

    Returns EventDispatcher

Generated using TypeDoc