Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ScaleControlDirective

Angular2 directive for the attribution-control of Leaflet.

You can use this directive in an Angular2 template after importing YagaModule.

How to use in a template:

<yaga-map>
    <yaga-scale-control
        [(display)]="..."
        [(zIndex)]="..."
        [(position)]="..."

        [metric]="..."
        [imperial]="..."
        [maxWidth]="..."

        (add)="..."
        (remove)="..."
        (click)="..."
        (dblclick)="..."
        (mousedown)="..."
        (mouseover)="..."
        (mouseout)="..."
        >
    </yaga-scale-control>
</yaga-map>
link

http://leafletjs.com/reference-1.2.0.html#control-scale Original Leaflet documentation

link

https://leaflet-ng2.yagajs.org/1.0.0-rc12/browser-test?grep=Scale-Control%20Directive Unit-Test

link

https://leaflet-ng2.yagajs.org/1.0.0-rc12/coverage/lcov-report/lib/attribution-control.directive.js.html Test coverage

link

https://leaflet-ng2.yagajs.org/1.0.0-rc12/typedoc/classes/scalecontroldirective.html API documentation

example

https://leaflet-ng2.yagajs.org/1.0.0-rc12/examples/scale-control-directive/

Hierarchy

  • Scale
    • ScaleControlDirective

Implements

  • OnDestroy

Index

Constructors

constructor

Properties

addEvent

addEvent: EventEmitter<LeafletEvent> = new EventEmitter()

From leaflet fired add event. Use it with <yaga-scale-control (add)="processEvent($event)">

link

http://leafletjs.com/reference-1.2.0.html#control-scale-add Original Leaflet documentation

clickEvent

clickEvent: EventEmitter<LeafletMouseEvent> = new EventEmitter()

From leaflet fired click event. Use it with <yaga-scale-control (click)="processEvent($event)">

link

http://leafletjs.com/reference-1.2.0.html#control-scale-click Original Leaflet documentation

dblclickEvent

dblclickEvent: EventEmitter<LeafletMouseEvent> = new EventEmitter()

From leaflet fired dblclick event. Use it with <yaga-scale-control (dblclick)="processEvent($event)">

link

http://leafletjs.com/reference-1.2.0.html#control-scale-dblclick Original Leaflet documentation

displayChange

displayChange: EventEmitter<boolean> = new EventEmitter()

Two-Way bound property for the display status of the control. Use it with <yaga-scale-control [(display)]="someValue"> or <yaga-scale-control (displayChange)="processEvent($event)">

Protected mapProvider

mapProvider: MapProvider

mousedownEvent

mousedownEvent: EventEmitter<LeafletMouseEvent> = new EventEmitter()

From leaflet fired mousedown event. Use it with <yaga-scale-control (mousedown)="processEvent($event)">

link

http://leafletjs.com/reference-1.2.0.html#control-scale-mousedown Original Leaflet documentation

mouseoutEvent

mouseoutEvent: EventEmitter<LeafletMouseEvent> = new EventEmitter()

From leaflet fired mouseout event. Use it with <yaga-scale-control (mouseout)="processEvent($event)">

link

http://leafletjs.com/reference-1.2.0.html#control-scale-mouseout Original Leaflet documentation

mouseoverEvent

mouseoverEvent: EventEmitter<LeafletMouseEvent> = new EventEmitter()

From leaflet fired mouseover event. Use it with <yaga-scale-control (mouseover)="processEvent($event)">

link

http://leafletjs.com/reference-1.2.0.html#control-scale-mouseover Original Leaflet documentation

options

options: ScaleOptions

positionChange

positionChange: EventEmitter<ControlPosition> = new EventEmitter()

Two-Way bound property for the position of the control. Use it with <yaga-scale-control [(position)]="someValue"> or <yaga-scale-control (positionChange)="processEvent($event)">

removeEvent

removeEvent: EventEmitter<LeafletEvent> = new EventEmitter()

From leaflet fired remove event. Use it with <yaga-scale-control (remove)="processEvent($event)">

link

http://leafletjs.com/reference-1.2.0.html#control-scale-remove Original Leaflet documentation

zIndexChange

zIndexChange: EventEmitter<number> = new EventEmitter()

Two-Way bound property for the zIndex of the control. Use it with <yaga-scale-control [(zIndex)]="someValue"> or <yaga-scale-control (zIndexChange)="processEvent($event)">

Accessors

display

  • get display(): boolean
  • set display(val: boolean): void
  • Two-Way bound property for the display state. Use it with <yaga-scale-control [(display)]="someValue"> or <yaga-scale-control [display]="someValue">

    Returns boolean

  • Two-Way bound property for the display state. Use it with <yaga-scale-control [(display)]="someValue"> or <yaga-scale-control [display]="someValue">

    Parameters

    • val: boolean

    Returns void

imperial

  • get imperial(): boolean
  • set imperial(val: boolean): void

maxWidth

  • get maxWidth(): number | undefined
  • set maxWidth(val: number | undefined): void

metric

  • get metric(): boolean
  • set metric(val: boolean): void

opacity

  • get opacity(): number | undefined
  • set opacity(val: number | undefined): void

position

  • get position(): ControlPosition
  • set position(val: ControlPosition): void

zIndex

  • get zIndex(): number | undefined
  • set zIndex(zIndex: number | undefined): void
  • Two-Way bound property for the zIndex of the control. Use it with <yaga-scale-control [(zIndex)]="someValue"> or <yaga-scale-control (zIndexChange)="processEvent($event)">

    Returns number | undefined

  • Two-Way bound property for the zIndex of the control. Use it with <yaga-scale-control [(zIndex)]="someValue"> or <yaga-scale-control (zIndexChange)="processEvent($event)">

    Parameters

    • zIndex: number | undefined

    Returns void

Methods

addTo

  • addTo(map: Map): this

getContainer

  • getContainer(): HTMLElement | undefined
  • Returns HTMLElement | undefined

getPosition

  • getPosition(): ControlPosition
  • Returns ControlPosition

ngOnDestroy

  • ngOnDestroy(): void
  • Internal method to provide the removal of the control in Leaflet, when removing it from the Angular template

    Returns void

Optional onAdd

  • onAdd(map: Map): HTMLElement
  • Parameters

    • map: Map

    Returns HTMLElement

Optional onRemove

  • onRemove(map: Map): void
  • Parameters

    • map: Map

    Returns void

remove

  • remove(): this

setPosition

  • setPosition(val: ControlPosition): this

Static addInitHook

  • addInitHook(initHookFn: function): any
  • Parameters

    • initHookFn: function
        • (): void
        • Returns void

    Returns any

Static extend

  • extend(props: any): any
  • Parameters

    • props: any

    Returns any

Static include

  • include(props: any): any
  • Parameters

    • props: any

    Returns any

Static mergeOptions

  • mergeOptions(props: any): any
  • Parameters

    • props: any

    Returns any

Generated using TypeDoc