Options
All
  • Public
  • Public/Protected
  • All
Menu

Class InteractiveMapApp

An InteractiveMapApp object provides an full-featured weather map application that manages an interactive map and enables runtime interaction of map content using a series of panel view components.

export

Hierarchy

Index

Constructors

constructor

  • Initializes an interactive map application with the specified DOM target and configuration object.

    memberof

    InteractiveMapApp

    Parameters

    Returns InteractiveMapApp

Properties

id

id: string

mapsgl

Accessors

$el

  • get $el(): any
  • Primary DOM element associated with the view.

    readonly
    memberof

    MapView

    Returns any

account

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

    readonly
    memberof

    InteractiveMapApp

    Returns Account

map

  • Returns the underlying interactive map instance.

    readonly
    memberof

    InteractiveMapApp

    Returns InteractiveMap

modules

  • Returns ModuleManager

options

panels

sources

  • get sources(): {}
  • Returns the set of custom data sources for the application.

    readonly
    memberof

    InteractiveMapApp

    Returns {}

    • [key: string]: any

Methods

addSource

  • addSource(key: string, type: string, config: any): any
  • Adds a map content source to the application cache that can be toggled on and off using the unique key identifier. Note that this method does not render the source to the interactive map.

    memberof

    InteractiveMapApp

    Parameters

    • key: string

      Identifier for the source

    • type: string

      Type of map content source to use, tile, vector, geojson or text

    • config: any

      Configuration options for the source

    Returns any

closeInfoPanel

  • closeInfoPanel(): void
  • Dismisses the application info panel if currently visible.

    memberof

    InteractiveMapApp

    Returns void

getPanel

  • Returns the panel view associated with the specified key, if any.

    memberof

    InteractiveMapApp

    see

    panels

    Parameters

    • key: string

    Returns AnyPanel

getSource

  • getSource(id: string): any
  • Parameters

    • id: string

    Returns any

has

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

    memberof

    EventDispatcher

    Parameters

    • type: string

    Returns boolean

initialLayers

  • initialLayers(): string[]
  • Returns string[]

isReady

  • isReady(): boolean
  • Returns whether the application has finished initializing.

    memberof

    InteractiveMapApp

    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

setMetric

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

    memberof

    InteractiveMapApp

    Parameters

    • isMetric: boolean

    Returns void

setMode

  • setMode(mode: "light" | "dark"): void
  • Parameters

    • mode: "light" | "dark"

    Returns void

showInfo

  • showInfo(view: string, title?: string, data?: any): InfoPanel
  • Shows the application info panel component using the specified view key, title and data.

    memberof

    InteractiveMapApp

    Parameters

    • view: string

      Identifier associated with the view to render

    • Optional title: string
    • Optional data: any

    Returns InfoPanel

showInfoAtCoord

  • Shows the application info panel component for the specified geographical coordinate. Data will be requested for the coordinate using the view's request instance

    memberof

    InteractiveMapApp

    Parameters

    • coord: Coordinate

      Coordinate to request data for

    • view: string

      Identifier associated with the view to render

    • Optional title: string
    • Optional marker: MarkerStyle

    Returns InfoPanel

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

updatePanel

  • updatePanel(key: string, config: any): void
  • Updates the configuration for the panel view associated with the specified key, if any.

    The new options provided will be applied to the existing options for the panel, meaning new values will override the existing option values while other existing values will remain.

    memberof

    InteractiveMapApp

    Parameters

    • key: string
    • config: any

    Returns void

Generated using TypeDoc