Options
All
  • Public
  • Public/Protected
  • All
Menu

Class OverlayLayerDirective

Angular2 directive for adding layers to the layers-control of Leaflet as base-layer.

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

How to use in a template:

<yaga-map>
    <yaga-layers-control>
        <!-- This can be any other layer... -->
        <yaga-tile-layer yaga-overlay-layer [caption]="'Transparent OSM'"></yaga-tile-layer>
    </yaga-attribution-control>
</yaga-map>
link

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

link

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

link

https://leaflet-ng2.yagajs.org/1.0.0/coverage/lcov-report/lib/overlay-layer.directive.js.html Test coverage

link

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

example

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

Hierarchy

  • OverlayLayerDirective

Implements

  • OnDestroy

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

Properties

Protected layer

layersControlProvider

layersControlProvider: LayersControlProvider

Accessors

caption

  • get caption(): string
  • set caption(value: string): void

Methods

ngOnDestroy

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

    Returns void

Generated using TypeDoc