Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MapConfig

A map configuration object stores and manages various map-related options associated with a MapView instance.

export

Hierarchy

Index

Constructors

constructor

  • Initializes and returns a map configuration instance for the specified map options.

    memberof

    MapConfig

    Parameters

    Returns MapConfig

Accessors

layers

  • Aeris Maps (AMP) layers metadata.

    memberof

    MapConfig

    Returns Layers

  • Aeris Maps (AMP) layers metadata.

    memberof

    MapConfig

    Parameters

    Returns void

Methods

base

  • base(): any
  • Returns the base layer codes.

    memberof

    MapConfig

    Returns any

bounds

  • Returns the coordinate bounds.

    memberof

    MapConfig

    Returns GeoBounds

center

  • Returns the center place string or coordinate object.

    memberof

    MapConfig

    Returns string | Coordinate

data

  • data(): any
  • Returns the data layer codes.

    memberof

    MapConfig

    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

hasOverlays

  • hasOverlays(): boolean
  • Returns whether the layer configuration contains overlay layer codes.

    memberof

    MapConfig

    Returns boolean

hasText

  • hasText(): boolean
  • Returns whether the layer configuration contains text layer codes.

    memberof

    MapConfig

    Returns boolean

metric

  • metric(): boolean
  • Returns whether to use Metric units for text layers.

    memberof

    MapConfig

    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

offset

  • offset(): string
  • Returns the time offset.

    memberof

    MapConfig

    Returns string

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

opts

  • opts(key: string, value?: any): any
  • Returns or sets an option by key.

    memberof

    MapConfig

    Parameters

    • key: string
    • Optional value: any

    Returns any

overlays

  • overlays(): any
  • Returns the overlay layer codes.

    memberof

    MapConfig

    Returns any

setBase

  • Sets the base layer codes.

    memberof

    MapConfig

    Parameters

    • base: string[]

    Returns MapConfig

setBounds

  • Sets the coordinate bounds.

    memberof

    MapConfig

    Parameters

    Returns MapConfig

setCenter

  • Sets the center place string or coordinate object.

    memberof

    MapConfig

    Parameters

    • center: Coordinate | string
    • Default value zoom: number = null

    Returns MapConfig

setData

  • Sets the data layer codes.

    memberof

    MapConfig

    Parameters

    • data: string[]

    Returns MapConfig

setDate

  • setDate(date: Date | number): void
  • Parameters

    • date: Date | number

    Returns void

setLayers

  • Sets all layer codes grouped by category.

    memberof

    MapConfig

    Parameters

    Returns MapConfig

setMetric

  • Sets whether to use Metric units for text layers.

    memberof

    MapConfig

    Parameters

    • metric: boolean

    Returns MapConfig

setOffset

  • Sets the time offset.

    memberof

    MapConfig

    Parameters

    • offset: string

    Returns MapConfig

setOverlays

  • Sets the overlay layer codes.

    memberof

    MapConfig

    Parameters

    • overlays: string[]

    Returns MapConfig

setRegion

  • Sets the center or coordinate bounds based on the specified region code.

    memberof

    MapConfig

    see

    Regions

    Parameters

    • key: string

    Returns MapConfig

setSize

  • setSize(width: number, height: number | "auto"): MapConfig
  • Sets the image size.

    memberof

    MapConfig

    Parameters

    • width: number
    • height: number | "auto"

    Returns MapConfig

setText

  • Sets the text layer codes.

    memberof

    MapConfig

    Parameters

    • text: string[]

    Returns MapConfig

setZoom

  • Sets the zoom level.

    memberof

    MapConfig

    Parameters

    • zoom: number

    Returns MapConfig

size

  • Returns the image size.

    memberof

    MapConfig

    Returns Size

text

  • text(): any
  • Returns the text layer codes.

    memberof

    MapConfig

    Returns any

toRequestOpts

  • toRequestOpts(groups?: string[], future?: boolean): {}
  • Returns an object of MapRequest options to use for the image request from the current configuration.

    memberof

    MapConfig

    Parameters

    • Optional groups: string[]
    • Default value future: boolean = false

    Returns {}

    • [key: string]: any

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

zoom

  • zoom(): number
  • Returns the zoom level.

    memberof

    MapConfig

    Returns number

Generated using TypeDoc