Class EsriScaleBar

Hierarchy

  • Widget
    • EsriScaleBar

Constructors

  • The ScaleBar widget displays a scale bar on the map or in a specified HTML node.

    Read more...

    Parameters

    • Optional properties: ScaleBarProperties

    Returns EsriScaleBar

Properties

container: string | HTMLElement

The ID or node representing the DOM element containing the widget.

Read more...

declaredClass: string
destroyed: boolean
id: string

The unique ID assigned to the widget when the widget is created.

Read more...

initialized: boolean
label: string

The widget's label.

Read more...

style: "ruler" | "line"

The style for the scale bar.

Read more...

unit: "non-metric" | "metric" | "dual"

Units to use for the scale bar.

Default

non-metric

[Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-ScaleBar.html#unit)

A reference to the MapView.

Read more...

viewModel: ScaleBarViewModel

The view model for this widget.

Read more...

visible: boolean

Indicates whether the widget is visible.

Default

true

[Read more...](https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Widget.html#visible)

Methods

  • Parameters

    • propertyName: string

    Returns any

  • Type Parameters

    • T

    Parameters

    • propertyName: string

    Returns T

  • Type Parameters

    • T

    Parameters

    • propertyName: string
    • value: T

    Returns EsriScaleBar

  • Type Parameters

    • T

    Parameters

    • handles: IHandle | IHandle[]
    • Optional groupKey: Exclude<T, IHandle>

    Returns void

  • A utility method used for building the value for a widget's class property.

    Read more...

    Parameters

    • Rest ...classNames: any[]

    Returns string

  • Destroys the widget instance.

    Read more...

    Returns void

  • Emits an event on the instance.

    Read more...

    Parameters

    • type: string
    • Optional event: any

    Returns boolean

  • Type Parameters

    • T

    Parameters

    • propertyName: string

    Returns T

  • Parameters

    • propertyName: string

    Returns any

  • Indicates whether there is an event listener on the instance that matches the provided event name.

    Read more...

    Parameters

    • type: string

    Returns boolean

  • Type Parameters

    • T

    Parameters

    • Optional groupKey: Exclude<T, IHandle>

    Returns boolean

  • isFulfilled() may be used to verify if creating an instance of the class is fulfilled (either resolved or rejected).

    Read more...

    Returns boolean

  • isRejected() may be used to verify if creating an instance of the class is rejected.

    Read more...

    Returns boolean

  • isResolved() may be used to verify if creating an instance of the class is resolved.

    Read more...

    Returns boolean

  • Parameters

    • propertyName: string

    Returns void

  • Registers an event handler on the instance.

    Read more...

    Parameters

    • type: string | string[]
    • listener: EventHandler

    Returns IHandle

  • Adds one or more handles which are to be tied to the lifecycle of the widget.

    Read more...

    Parameters

    • handleOrHandles: WatchHandle | WatchHandle[]

    Returns void

  • This method is primarily used by developers when implementing custom widgets. Executes after widget is ready for rendering.

    Read more...

    Returns void

  • Type Parameters

    • T

    Parameters

    • Optional groupKey: Exclude<T, IHandle>

    Returns void

  • This method is primarily used by developers when implementing custom widgets. It must be implemented by subclasses for rendering.

    Read more...

    Returns any

  • Renders widget to the DOM immediately.

    Read more...

    Returns void

  • This method is primarily used by developers when implementing custom widgets. Schedules widget rendering.

    Read more...

    Returns void

  • Type Parameters

    • T

    Parameters

    • propertyName: string
    • value: T

    Returns EsriScaleBar

  • Parameters

    • props: HashMap<any>

    Returns EsriScaleBar

  • Parameters

    • path: string | string[]
    • callback: WatchCallback
    • Optional sync: boolean

    Returns WatchHandle

  • when() may be leveraged once an instance of the class is created.

    Read more...

    Parameters

    • Optional callback: Function
    • Optional errback: Function

    Returns Promise<any>

Generated using TypeDoc