Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MapSourceModule<T>

A map source module is a container for providing all of the required configuration and functionality needed for rendering and controlling a map content source on an interactive map application.

A module can be a direct instance of MapSourceModule, in which case a configuration object must be provided when instantiating the instance. Or, a module can be provided as a subclass of MapSourceModule, in which case the subclass can override the necessary properties and methods of the parent class to provide the necessary configuration and functionality.

Regardless which implementation method is used, a module must return a valid map content source from the source() method.

implements

{IMapSourceModule}

Type parameters

Hierarchy

Implements

Index

Constructors

constructor

  • Initializes and returns a map source module instance configured with the specified options if provided.

    memberof

    MapSourceModule

    Parameters

    • Default value opts: any = null

    Returns MapSourceModule

Accessors

account

  • Aeris account associated with the module.

    readonly
    memberof

    MapSourceModule

    Returns Account

app

  • Application the module was initialized with.

    readonly
    memberof

    MapSourceModule

    Returns InteractiveMapApp

data

  • get data(): any
  • Data associated with the module.

    If the module loads remote data when added to a map, this value will return the data that was last returned by the remote request.

    readonly
    memberof

    MapSourceModule

    Returns any

dataSource

  • get dataSource(): any
  • set dataSource(value: any): void
  • Map data source created for the module.

    memberof

    MapSourceModule

    Returns any

  • Sets the module's map data source.

    memberof

    MapSourceModule

    Parameters

    • value: any

    Returns void

group

  • Parent module group the module belongs to, if any.

    memberof

    MapSourceModule

    Returns ModuleGroup

  • Sets the parent module group.

    memberof

    MapSourceModule

    Parameters

    Returns void

id

  • get id(): string
  • Module identifier.

    readonly
    memberof

    MapSourceModule

    Returns string

map

  • Application map instance.

    readonly
    memberof

    MapSourceModule

    Returns InteractiveMap

opts

  • get opts(): T
  • Returns the module's configuration options.

    Returns T

Methods

controls

  • controls(): any
  • Returns the application controls configuration.

    see

    ButtonOptions

    see

    SegmentedButtonOptions

    see

    ButtonGroupOptions

    memberof

    MapSourceModule

    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

infopanel

  • infopanel(): any
  • Returns the configuration for the info panel content view.

    see

    InfoPanelContentViewOptions

    memberof

    MapSourceModule

    Returns any

initialize

legend

  • legend(): any
  • Returns the legend configuration.

    see

    LegendOptions

    memberof

    MapSourceModule

    Returns any

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

onAdd

  • onAdd(): void
  • Called when the module's map content source has been added to the map.

    memberof

    MapSourceModule

    Returns void

onData

  • onData(result: any): void
  • Called when the module's map content source has loaded data.

    memberof

    MapSourceModule

    Parameters

    • result: any

    Returns void

onInit

  • onInit(): void
  • Called when the module has been initialized with an application.

    memberof

    MapSourceModule

    Returns void

onMarkerClick

  • onMarkerClick(marker: any, data: any): void
  • Called when a marker associated with the module's map content source is clicked on the map.

    memberof

    MapSourceModule

    Parameters

    • marker: any
    • data: any

    Returns void

onRemove

  • onRemove(): void
  • Called when the module's map content source is removed from the map.

    memberof

    MapSourceModule

    Returns void

onShapeClick

  • onShapeClick(shape: any, data: any): void
  • Called when a polygon or polyline associated with the module's map content source is clicked on the map.

    memberof

    MapSourceModule

    Parameters

    • shape: any
    • data: any

    Returns void

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

showInfoPanel

  • showInfoPanel(title: string, data?: any): InfoPanel
  • Shows the map info panel using the specified title and data for the configured view associated with the module.

    memberof

    MapSourceModule

    Parameters

    • title: string
    • Optional data: any

    Returns InfoPanel

source

  • source(): LayerOptions
  • Returns the map content source configuration.

    see

    LayerOptions

    memberof

    MapSourceModule

    Returns LayerOptions

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