Options
All
  • Public
  • Public/Protected
  • All
Menu

Class LeafletMapButtonGroup

The LeafletMapButtonGroup disposable class is used to specify LeafletMapButtonOptions and location of button Groups.

example



var editFunc = () => { };
var cancelFunc = () => { };
var notEditing = { title: 'Edit', icon: 'fa-edit', stateName: 'notEditing', onClick: editFunc };
var editing = { title: 'Cancel Edit', icon: 'fa-undo', stateName: 'Editing', onClick: cancelFunc };
var editButton = { position: 'topright', id: 'Edit', type: 'replace', leafletClasses: true, states: [ notEditing, editing ] };
var groupOptions = { id: 'EditBar', position: 'topright', buttonOptions: [editButton] };
var buttonGroup = new LeafletMapButtonGroup(groupOptions);

Hierarchy

  • LeafletMapButtonGroup

Implements

Index

Constructors

constructor

Properties

Private _bar

_bar: any

Private _buttons

_buttons: any

Private _id

_id: any

Private _makeButtons

  • Returns EasyButton[]

Private _map

_map: any

Private _options

_options: any

Private _position

_position: any

Methods

addTo

  • addTo(map: LeafletMap): void
  • addTo(map: LeafletMap): void
  • addTo(map: LeafletMap): void
  • Add group to the map.

    Parameters

    Returns void

  • Add group to the map.

    Parameters

    • map: LeafletMap

    Returns void

  • Add group to the map.

    Parameters

    • map: LeafletMap

    Returns void

changeButtonState

  • changeButtonState(id: string, state: string): void
  • changeButtonState(id: string, state: string): void
  • changeButtonState(id: string, state: string): void
  • Change the state of the specified button.

    Parameters

    • id: string

      string button identifier

    • state: string

      string of new state

    Returns void

  • Change the state of the specified button.

    Parameters

    • id: string

      string button identifier

    • state: string

      string of new state

    Returns void

  • Change the state of the specified button.

    Parameters

    • id: string

      string button identifier

    • state: string

      string of new state

    Returns void

disableButton

  • disableButton(id: string): void
  • disableButton(id: string): void
  • disableButton(id: string): void
  • Disable a button in the button group.

    Parameters

    • id: string

      string identifier of button to disable

    Returns void

  • Disable a button in the button group.

    Parameters

    • id: string

      string identifier of button to disable

    Returns void

  • Disable a button in the button group.

    Parameters

    • id: string

      string identifier of button to disable

    Returns void

dispose

  • dispose(): void
  • dispose(): void
  • dispose(): void
  • Removes this button group from the map.

    Returns void

  • Removes this button group from the map.

    Returns void

  • Removes this button group from the map.

    Returns void

enableButton

  • enableButton(id: string): void
  • enableButton(id: string): void
  • enableButton(id: string): void
  • Enable a button in the button group.

    Parameters

    • id: string

      string identifier of button to enable

    Returns void

  • Enable a button in the button group.

    Parameters

    • id: string

      string identifier of button to enable

    Returns void

  • Enable a button in the button group.

    Parameters

    • id: string

      string identifier of button to enable

    Returns void

reset

  • reset(): void
  • reset(): void
  • reset(): void
  • Removes this button group and recreates it on the map.

    Returns void

  • Removes this button group and recreates it on the map.

    Returns void

  • Removes this button group and recreates it on the map.

    Returns void