Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MapComponent

Angular2 root component for a Leaflet map

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

How to use in a template:

<yaga-map
    [(zoom)]="..."
    [(lat)]="..."
    [(lng)]="..."
    [(minZoom)]="..."
    [(maxZoom)]="..."
    [(maxBounds)]="..."

    (baselayerchange)="..."
    (overlayadd)="..."
    (overlayremove)="..."
    (layeradd)="..."
    (layerremove)="..."
    (zoomlevelschan)="..."
    (resize)="..."
    (unload)="..."
    (viewreset)="..."
    (load)="..."
    (zoomstart)="..."
    (movestart)="..."
    (zoom)="..."
    (move)="..."
    (zoomend)="..."
    (moveend)="..."
    (popupopen)="..."
    (popupclose)="..."
    (autopanstart)="..."
    (tooltipopen)="..."
    (tooltipclose)="..."
    (click)="..."
    (dblclick)="..."
    (mousedown)="..."
    (mouseup)="..."
    (mouseover)="..."
    (mouseout)="..."
    (mousemove)="..."
    (contextmenu)="..."
    (keypress)="..."
    (preclick)="..."
    (zoomanim)="..."

    [crs]="..."
    [closePopupOnClick]="..."
    [zoomSnap]="..."
    [zoomDelta]="..."
    [trackResize]="..."
    [boxZoomEnabled]="..."
    [doubleClickZoomEnabled]="..."
    [draggingEnabled]="..."
    [fadeAnimation]="..."
    [markerZoomAnimation]="..."
    [transform3DLimit]="..."
    [zoomAnimation]="..."
    [zoomAnimationThreshold]="..."
    [inertia]="..."
    [inertiaDeceleration]="..."
    [inertiaMaxSpeed]="..."
    [easeLinearity]="..."
    [worldCopyJump]="..."
    [maxBoundsViscosity]="..."
    [keyboardEnabled]="..."
    [keyboardPanDelta]="..."
    [scrollWheelZoomEnabled]="..."
    [wheelDebounceTime]="..."
    [wheelPxPerZoomLevel]="..."
    [tapEnabled]="..."
    [tapTolerance]="..."
    [bounceAtZoomLimits]="..."
    [touchZoomEnabled]="...">
    <!-- other yaga directives -->
</yaga-map>

You can use the following directives as child of this one:

  • yaga-attribution-control
  • yaga-circle
  • yaga-circle-marker
  • yaga-geojson
  • yaga-image-overlay
  • yaga-marker
  • yaga-polygon
  • yaga-polyline
  • yaga-rectangle
  • yaga-scale-control
  • yaga-tile-layer
  • yaga-wms-layer
  • yaga-zoom-control
link

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

link

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

link

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

link

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

example

https://leaflet-ng2.yagajs.org/1.0.0/examples/tile-layer-directive

Hierarchy

  • Map
    • MapComponent

Implements

  • AfterViewInit

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

Properties

autopanstartEvent

autopanstartEvent: EventEmitter<LeafletEvent> = new EventEmitter()

From leaflet fired autopanstart event. Use it with <yaga-tile-layer (autopanstart)="processEvent($event)">

link

http://leafletjs.com/reference-1.2.0.html#map-autopanstart Original Leaflet documentation

baselayerchangeEvent

baselayerchangeEvent: EventEmitter<LayersControlEvent> = new EventEmitter()

From leaflet fired baselayerchange event. Use it with <yaga-tile-layer (baselayerchange)="processEvent($event)">

link

http://leafletjs.com/reference-1.2.0.html#map-baselayerchange Original Leaflet documentation

boxZoom

boxZoom: Handler

boxzoomendEvent

boxzoomendEvent: EventEmitter<LeafletEvent> = new EventEmitter()

From leaflet fired (undocumented) boxzoomend event. Use it with <yaga-tile-layer (boxzoomend)="processEvent($event)">

link

https://github.com/Leaflet/Leaflet/blob/master/src/map/handler/Map.BoxZoom.js SourceCode

boxzoomstartEvent

boxzoomstartEvent: EventEmitter<LeafletEvent> = new EventEmitter()

From leaflet fired (undocumented) boxzoomstart event. Use it with <yaga-tile-layer (boxzoomstart)="processEvent($event)">

link

https://github.com/Leaflet/Leaflet/blob/master/src/map/handler/Map.BoxZoom.js SourceCode

clickEvent

clickEvent: EventEmitter<LeafletMouseEvent> = new EventEmitter()

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

link

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

contextmenuEvent

contextmenuEvent: EventEmitter<LeafletMouseEvent> = new EventEmitter()

From leaflet fired contextmenu event. Use it with <yaga-tile-layer (contextmenu)="processEvent($event)">

link

http://leafletjs.com/reference-1.2.0.html#map-contextmenu Original Leaflet documentation

dblclickEvent

dblclickEvent: EventEmitter<LeafletMouseEvent> = new EventEmitter()

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

link

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

doubleClickZoom

doubleClickZoom: Handler

dragging

dragging: Handler

Private isZooming

isZooming: boolean = false

keyboard

keyboard: Handler

keypressEvent

keypressEvent: EventEmitter<LeafletKeyboardEvent> = new EventEmitter()

From leaflet fired keypress event. Use it with <yaga-tile-layer (keypress)="processEvent($event)">

link

http://leafletjs.com/reference-1.2.0.html#map-keypress Original Leaflet documentation

latChange

latChange: EventEmitter<number> = new EventEmitter()

Two-Way bound property for the center latitude. Use it with <yaga-map [(lat)]="someValue"> or <yaga-map (latChange)="processEvent($event)">

link

http://leafletjs.com/reference-1.2.0.html#map-setview Original Leaflet documentation

layeraddEvent

layeraddEvent: EventEmitter<LayerEvent> = new EventEmitter()

From leaflet fired layeradd event. Use it with <yaga-tile-layer (layeradd)="processEvent($event)">

link

http://leafletjs.com/reference-1.2.0.html#map-layeradd Original Leaflet documentation

layerremoveEvent

layerremoveEvent: EventEmitter<LayerEvent> = new EventEmitter()

From leaflet fired layerremove event. Use it with <yaga-tile-layer (layerremove)="processEvent($event)">

link

http://leafletjs.com/reference-1.2.0.html#map-layerremove Original Leaflet documentation

lngChange

lngChange: EventEmitter<number> = new EventEmitter()

Two-Way bound property for the center longitude. Use it with <yaga-map [(lng)]="someValue"> or <yaga-map (lngChange)="processEvent($event)">

link

http://leafletjs.com/reference-1.2.0.html#map-setview Original Leaflet documentation

loadEvent

loadEvent: EventEmitter<LeafletEvent> = new EventEmitter()

From leaflet fired load event. Use it with <yaga-tile-layer (load)="processEvent($event)">

link

http://leafletjs.com/reference-1.2.0.html#map-load Original Leaflet documentation

maxBoundsChange

maxBoundsChange: EventEmitter<LatLngBounds> = new EventEmitter()

Two-Way bound property for the bounds on the map. Use it with <yaga-map [(maxBounds)]="someValue"> or <yaga-map (maxBoundsChange)="processEvent($event)">

link

http://leafletjs.com/reference-1.2.0.html#map-setmaxbounds Original Leaflet documentation

maxZoomChange

maxZoomChange: EventEmitter<number> = new EventEmitter()

Two-Way bound property for the maximal available zoom. Use it with <yaga-map [(maxZoom)]="someValue"> or <yaga-map (maxZoomChange)="processEvent($event)">

link

http://leafletjs.com/reference-1.2.0.html#map-setmaxzoom Original Leaflet documentation

minZoomChange

minZoomChange: EventEmitter<number> = new EventEmitter()

Two-Way bound property for the minimal available zoom. Use it with <yaga-map [(minZoom)]="someValue"> or <yaga-map (minZoomChange)="processEvent($event)">

link

http://leafletjs.com/reference-1.2.0.html#map-setminzoom Original Leaflet documentation

mousedownEvent

mousedownEvent: EventEmitter<LeafletMouseEvent> = new EventEmitter()

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

link

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

mousemoveEvent

mousemoveEvent: EventEmitter<LeafletMouseEvent> = new EventEmitter()

From leaflet fired mousemove event. Use it with <yaga-tile-layer (mousemove)="processEvent($event)">

link

http://leafletjs.com/reference-1.2.0.html#map-mousemove Original Leaflet documentation

mouseoutEvent

mouseoutEvent: EventEmitter<LeafletMouseEvent> = new EventEmitter()

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

link

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

mouseoverEvent

mouseoverEvent: EventEmitter<LeafletMouseEvent> = new EventEmitter()

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

link

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

mouseupEvent

mouseupEvent: EventEmitter<LeafletMouseEvent> = new EventEmitter()

From leaflet fired mouseup event. Use it with <yaga-tile-layer (mouseup)="processEvent($event)">

link

http://leafletjs.com/reference-1.2.0.html#map-mouseup Original Leaflet documentation

moveEvent

moveEvent: EventEmitter<LeafletEvent> = new EventEmitter()

From leaflet fired move event. Use it with <yaga-tile-layer (move)="processEvent($event)">

link

http://leafletjs.com/reference-1.2.0.html#map-move Original Leaflet documentation

Private moveTimeout

moveTimeout: any

moveendEvent

moveendEvent: EventEmitter<LeafletEvent> = new EventEmitter()

From leaflet fired moveend event. Use it with <yaga-tile-layer (moveend)="processEvent($event)">

link

http://leafletjs.com/reference-1.2.0.html#map-moveend Original Leaflet documentation

movestartEvent

movestartEvent: EventEmitter<LeafletEvent> = new EventEmitter()

From leaflet fired movestart event. Use it with <yaga-tile-layer (movestart)="processEvent($event)">

link

http://leafletjs.com/reference-1.2.0.html#map-movestart Original Leaflet documentation

options

options: MapOptions

overlayaddEvent

overlayaddEvent: EventEmitter<LayersControlEvent> = new EventEmitter()

From leaflet fired overlayadd event. Use it with <yaga-tile-layer (overlayadd)="processEvent($event)">

link

http://leafletjs.com/reference-1.2.0.html#map-overlayadd Original Leaflet documentation

overlayremoveEvent

overlayremoveEvent: EventEmitter<LayersControlEvent> = new EventEmitter()

From leaflet fired overlayremove event. Use it with <yaga-tile-layer (overlayremove)="processEvent($event)">

link

http://leafletjs.com/reference-1.2.0.html#map-overlayremove Original Leaflet documentation

popupcloseEvent

popupcloseEvent: EventEmitter<PopupEvent> = new EventEmitter()

From leaflet fired popupclose event. Use it with <yaga-tile-layer (popupclose)="processEvent($event)">

link

http://leafletjs.com/reference-1.2.0.html#map-popupclose Original Leaflet documentation

popupopenEvent

popupopenEvent: EventEmitter<PopupEvent> = new EventEmitter()

From leaflet fired popupopen event. Use it with <yaga-tile-layer (popupopen)="processEvent($event)">

link

http://leafletjs.com/reference-1.2.0.html#map-popupopen Original Leaflet documentation

preclickEvent

preclickEvent: EventEmitter<LeafletMouseEvent> = new EventEmitter()

From leaflet fired preclick event. Use it with <yaga-tile-layer (preclick)="processEvent($event)">

link

http://leafletjs.com/reference-1.2.0.html#map-preclick Original Leaflet documentation

resizeEvent

resizeEvent: EventEmitter<ResizeEvent> = new EventEmitter()

From leaflet fired resize event. Use it with <yaga-tile-layer (resize)="processEvent($event)">

link

http://leafletjs.com/reference-1.2.0.html#map-resize Original Leaflet documentation

scrollWheelZoom

scrollWheelZoom: Handler

Optional tap

tap: Handler

tooltipcloseEvent

tooltipcloseEvent: EventEmitter<TooltipEvent> = new EventEmitter()

From leaflet fired tooltipclose event. Use it with <yaga-tile-layer (tooltipclose)="processEvent($event)">

link

http://leafletjs.com/reference-1.2.0.html#map-tooltipclose Original Leaflet documentation

tooltipopenEvent

tooltipopenEvent: EventEmitter<TooltipEvent> = new EventEmitter()

From leaflet fired tooltipopen event. Use it with <yaga-tile-layer (tooltipopen)="processEvent($event)">

link

http://leafletjs.com/reference-1.2.0.html#map-tooltipopen Original Leaflet documentation

touchZoom

touchZoom: Handler

unloadEvent

unloadEvent: EventEmitter<LeafletEvent> = new EventEmitter()

From leaflet fired unload event. Use it with <yaga-tile-layer (unload)="processEvent($event)">

link

http://leafletjs.com/reference-1.2.0.html#map-unload Original Leaflet documentation

viewresetEvent

viewresetEvent: EventEmitter<LeafletEvent> = new EventEmitter()

From leaflet fired viewreset event. Use it with <yaga-tile-layer (viewreset)="processEvent($event)">

link

http://leafletjs.com/reference-1.2.0.html#map-viewreset Original Leaflet documentation

zoomChange

zoomChange: EventEmitter<number> = new EventEmitter()

Two-Way bound property for the zoom. Use it with <yaga-map [(zoom)]="someValue"> or <yaga-map (zoomChange)="processEvent($event)">

link

http://leafletjs.com/reference-1.2.0.html#map-setzoom Original Leaflet documentation

zoomControl

zoomControl: Zoom

zoomEvent

zoomEvent: EventEmitter<LeafletEvent> = new EventEmitter()

From leaflet fired zoom event. Use it with <yaga-tile-layer (zoom)="processEvent($event)">

link

http://leafletjs.com/reference-1.2.0.html#map-zoom Original Leaflet documentation

zoomanimEvent

zoomanimEvent: EventEmitter<ZoomAnimEvent> = new EventEmitter()

From leaflet fired zoomanim event. Use it with <yaga-tile-layer (zoomanim)="processEvent($event)">

link

http://leafletjs.com/reference-1.2.0.html#map-zoomanim Original Leaflet documentation

zoomendEvent

zoomendEvent: EventEmitter<LeafletEvent> = new EventEmitter()

From leaflet fired zoomend event. Use it with <yaga-tile-layer (zoomend)="processEvent($event)">

link

http://leafletjs.com/reference-1.2.0.html#map-zoomend Original Leaflet documentation

zoomlevelschangeEvent

zoomlevelschangeEvent: EventEmitter<LeafletEvent> = new EventEmitter()

From leaflet fired zoomlevelschan event. Use it with <yaga-tile-layer (zoomlevelschan)="processEvent($event)">

link

http://leafletjs.com/reference-1.2.0.html#map-zoomlevelschan Original Leaflet documentation

zoomstartEvent

zoomstartEvent: EventEmitter<LeafletEvent> = new EventEmitter()

From leaflet fired zoomstart event. Use it with <yaga-tile-layer (zoomstart)="processEvent($event)">

link

http://leafletjs.com/reference-1.2.0.html#map-zoomstart Original Leaflet documentation

Accessors

bounceAtZoomLimits

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

boxZoomEnabled

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

closePopupOnClick

  • get closePopupOnClick(): boolean | undefined
  • set closePopupOnClick(val: boolean | undefined): void

crs

  • get crs(): CRS
  • set crs(val: CRS): void

doubleClickZoomEnabled

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

draggingEnabled

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

easeLinearity

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

fadeAnimation

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

inertia

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

inertiaDeceleration

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

inertiaMaxSpeed

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

keyboardEnabled

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

keyboardPanDelta

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

lat

  • get lat(): number
  • set lat(val: number): void

lng

  • get lng(): number
  • set lng(val: number): void

markerZoomAnimation

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

maxBounds

  • get maxBounds(): LatLngBounds
  • set maxBounds(val: LatLngBounds): void
  • Two-Way bound property for the maximal bounds. Use it with <yaga-map [(maxBounds)]="someValue"> or <yaga-map [maxBounds]="someValue">

    Returns LatLngBounds

  • Two-Way bound property for the maximal bounds. Use it with <yaga-map [(maxBounds)]="someValue"> or <yaga-map [maxBounds]="someValue">

    link

    http://leafletjs.com/reference-1.2.0.html#map-maxbounds Original Leaflet documentation

    Parameters

    • val: LatLngBounds

    Returns void

maxBoundsViscosity

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

maxZoom

  • get maxZoom(): number
  • set maxZoom(val: number): void
  • Two-Way bound property for the maximal availabe zoom. Use it with <yaga-map [(maxZoom)]="someValue"> or <yaga-map [maxZoom]="someValue">

    Returns number

  • Two-Way bound property for the maximal availabe zoom. Use it with <yaga-map [(maxZoom)]="someValue"> or <yaga-map [maxZoom]="someValue">

    link

    http://leafletjs.com/reference-1.2.0.html#map-setmaxzoom Original Leaflet documentation

    Parameters

    • val: number

    Returns void

minZoom

  • get minZoom(): number
  • set minZoom(val: number): void
  • Two-Way bound property for the minimal availabe zoom. Use it with <yaga-map [(minZoom)]="someValue"> or <yaga-map [minZoom]="someValue">

    Returns number

  • Two-Way bound property for the minimal availabe zoom. Use it with <yaga-map [(minZoom)]="someValue"> or <yaga-map [minZoom]="someValue">

    link

    http://leafletjs.com/reference-1.2.0.html#map-setminzoom Original Leaflet documentation

    Parameters

    • val: number

    Returns void

scrollWheelZoomEnabled

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

tapEnabled

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

tapTolerance

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

touchZoomEnabled

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

trackResize

  • get trackResize(): boolean | undefined
  • set trackResize(val: boolean | undefined): void

transform3DLimit

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

wheelDebounceTime

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

wheelPxPerZoomLevel

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

worldCopyJump

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

zoom

  • get zoom(): number
  • set zoom(val: number): void

zoomAnimation

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

zoomAnimationThreshold

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

zoomDelta

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

zoomSnap

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

Methods

addControl

  • addControl(control: Control): this
  • Parameters

    • control: Control

    Returns this

addEventListener

  • addEventListener(type: string, fn: LeafletEventHandlerFn, context?: any): this
  • addEventListener(eventMap: LeafletEventHandlerFnMap): this
  • Alias for on(...)

    Adds a listener function (fn) to a particular event type of the object. You can optionally specify the context of the listener (object the this keyword will point to). You can also pass several space-separated types (e.g. 'click dblclick').

    Parameters

    • type: string
    • fn: LeafletEventHandlerFn
    • Optional context: any

    Returns this

  • Alias for on(...)

    Adds a set of type/listener pairs, e.g. {click: onClick, mousemove: onMouseMove}

    Parameters

    • eventMap: LeafletEventHandlerFnMap

    Returns this

addEventParent

  • addEventParent(obj: Evented): this
  • Adds an event parent - an Evented that will receive propagated events

    Parameters

    • obj: Evented

    Returns this

addHandler

  • addHandler(name: string, HandlerClass: Handler): this
  • Parameters

    • name: string
    • HandlerClass: Handler

    Returns this

addLayer

  • addLayer(layer: Layer): this
  • Parameters

    • layer: Layer

    Returns this

addOneTimeEventListener

  • addOneTimeEventListener(type: string, fn: LeafletEventHandlerFn, context?: any): this
  • addOneTimeEventListener(eventMap: LeafletEventHandlerFnMap): this
  • Alias for once(...)

    Behaves as on(...), except the listener will only get fired once and then removed.

    Parameters

    • type: string
    • fn: LeafletEventHandlerFn
    • Optional context: any

    Returns this

  • Alias for once(...)

    Behaves as on(...), except the listener will only get fired once and then removed.

    Parameters

    • eventMap: LeafletEventHandlerFnMap

    Returns this

clearAllEventListeners

  • clearAllEventListeners(): this
  • Alias for off()

    Removes all listeners to all events on the object.

    Returns this

closePopup

  • closePopup(popup?: Popup): this
  • Parameters

    • Optional popup: Popup

    Returns this

closeTooltip

  • closeTooltip(tooltip?: Tooltip): this
  • Parameters

    • Optional tooltip: Tooltip

    Returns this

containerPointToLatLng

  • containerPointToLatLng(point: PointExpression): LatLng
  • Parameters

    • point: PointExpression

    Returns LatLng

containerPointToLayerPoint

  • containerPointToLayerPoint(point: PointExpression): Point
  • Parameters

    • point: PointExpression

    Returns Point

createPane

  • createPane(name: string, container?: HTMLElement): HTMLElement
  • Parameters

    • name: string
    • Optional container: HTMLElement

    Returns HTMLElement

distance

  • distance(latlng1: LatLngExpression, latlng2: LatLngExpression): number
  • Parameters

    • latlng1: LatLngExpression
    • latlng2: LatLngExpression

    Returns number

eachLayer

  • eachLayer(fn: function, context?: any): this
  • Parameters

    • fn: function
        • (layer: Layer): void
        • Parameters

          • layer: Layer

          Returns void

    • Optional context: any

    Returns this

fire

  • fire(type: string, data?: any, propagate?: undefined | false | true): this
  • Fires an event of the specified type. You can optionally provide a data object — the first argument of the listener function will contain its properties. The event might can optionally be propagated to event parents.

    Parameters

    • type: string
    • Optional data: any
    • Optional propagate: undefined | false | true

    Returns this

fireEvent

  • fireEvent(type: string, data?: any, propagate?: undefined | false | true): this
  • Alias for fire(...)

    Fires an event of the specified type. You can optionally provide a data object — the first argument of the listener function will contain its properties. The event might can optionally be propagated to event parents.

    Parameters

    • type: string
    • Optional data: any
    • Optional propagate: undefined | false | true

    Returns this

fitBounds

  • fitBounds(bounds: LatLngBoundsExpression, options?: FitBoundsOptions): this
  • Parameters

    • bounds: LatLngBoundsExpression
    • Optional options: FitBoundsOptions

    Returns this

fitWorld

  • fitWorld(options?: FitBoundsOptions): this
  • Parameters

    • Optional options: FitBoundsOptions

    Returns this

flyTo

  • flyTo(latlng: LatLngExpression, zoom?: undefined | number, options?: ZoomPanOptions): this
  • Parameters

    • latlng: LatLngExpression
    • Optional zoom: undefined | number
    • Optional options: ZoomPanOptions

    Returns this

flyToBounds

  • flyToBounds(bounds: LatLngBoundsExpression, options?: FitBoundsOptions): this
  • Parameters

    • bounds: LatLngBoundsExpression
    • Optional options: FitBoundsOptions

    Returns this

getBounds

  • getBounds(): LatLngBounds
  • Returns LatLngBounds

getBoundsZoom

  • getBoundsZoom(bounds: LatLngBoundsExpression, inside?: undefined | false | true): number
  • Parameters

    • bounds: LatLngBoundsExpression
    • Optional inside: undefined | false | true

    Returns number

getCenter

  • getCenter(): LatLng
  • Returns LatLng

getContainer

  • getContainer(): HTMLElement
  • Returns HTMLElement

getMaxZoom

  • getMaxZoom(): number
  • Returns number

getMinZoom

  • getMinZoom(): number
  • Returns number

getPane

  • getPane(pane: string | HTMLElement): HTMLElement | undefined
  • Name of the pane or the pane as HTML-Element

    Parameters

    • pane: string | HTMLElement

    Returns HTMLElement | undefined

getPanes

  • getPanes(): object & DefaultMapPanes
  • Returns object & DefaultMapPanes

getPixelBounds

  • getPixelBounds(): Bounds
  • Returns Bounds

getPixelOrigin

  • getPixelOrigin(): Point
  • Returns Point

getPixelWorldBounds

  • getPixelWorldBounds(zoom?: undefined | number): Bounds
  • Parameters

    • Optional zoom: undefined | number

    Returns Bounds

getRenderer

  • getRenderer(layer: Path): Renderer
  • Parameters

    • layer: Path

    Returns Renderer

getScaleZoom

  • getScaleZoom(scale: number, fromZoom: number): number
  • Parameters

    • scale: number
    • fromZoom: number

    Returns number

getSize

  • getSize(): Point
  • Returns Point

getZoom

  • getZoom(): number
  • Returns number

getZoomScale

  • getZoomScale(toZoom: number, fromZoom: number): number
  • Parameters

    • toZoom: number
    • fromZoom: number

    Returns number

hasEventListeners

  • hasEventListeners(type: string): boolean
  • Alias for listens(...)

    Returns true if a particular event type has any listeners attached to it.

    Parameters

    • type: string

    Returns boolean

hasLayer

  • hasLayer(layer: Layer): boolean
  • Parameters

    • layer: Layer

    Returns boolean

invalidateSize

  • invalidateSize(options?: boolean | ZoomPanOptions): this
  • Boolean for animate or advanced ZoomPanOptions

    Parameters

    • Optional options: boolean | ZoomPanOptions

    Returns this

latLngToContainerPoint

  • latLngToContainerPoint(latlng: LatLngExpression): Point
  • Parameters

    • latlng: LatLngExpression

    Returns Point

latLngToLayerPoint

  • latLngToLayerPoint(latlng: LatLngExpression): Point
  • Parameters

    • latlng: LatLngExpression

    Returns Point

layerPointToContainerPoint

  • layerPointToContainerPoint(point: PointExpression): Point
  • Parameters

    • point: PointExpression

    Returns Point

layerPointToLatLng

  • layerPointToLatLng(point: PointExpression): LatLng
  • Parameters

    • point: PointExpression

    Returns LatLng

listens

  • listens(type: string): boolean
  • Returns true if a particular event type has any listeners attached to it.

    Parameters

    • type: string

    Returns boolean

locate

  • locate(options?: LocateOptions): this
  • Parameters

    • Optional options: LocateOptions

    Returns this

mouseEventToContainerPoint

  • mouseEventToContainerPoint(ev: MouseEvent): Point
  • Parameters

    • ev: MouseEvent

    Returns Point

mouseEventToLatLng

  • mouseEventToLatLng(ev: MouseEvent): LatLng
  • Parameters

    • ev: MouseEvent

    Returns LatLng

mouseEventToLayerPoint

  • mouseEventToLayerPoint(ev: MouseEvent): Point
  • Parameters

    • ev: MouseEvent

    Returns Point

ngAfterViewInit

  • ngAfterViewInit(): void

off

  • off(type: string, fn?: LeafletEventHandlerFn, context?: any): this
  • off(eventMap: LeafletEventHandlerFnMap): this
  • off(): this
  • Removes a previously added listener function. If no function is specified, it will remove all the listeners of that particular event from the object. Note that if you passed a custom context to on, you must pass the same context to off in order to remove the listener.

    Parameters

    • type: string
    • Optional fn: LeafletEventHandlerFn
    • Optional context: any

    Returns this

  • Removes a set of type/listener pairs.

    Parameters

    • eventMap: LeafletEventHandlerFnMap

    Returns this

  • Removes all listeners to all events on the object.

    Returns this

on

  • on(type: string, fn: LeafletEventHandlerFn, context?: any): this
  • on(eventMap: LeafletEventHandlerFnMap): this
  • Adds a listener function (fn) to a particular event type of the object. You can optionally specify the context of the listener (object the this keyword will point to). You can also pass several space-separated types (e.g. 'click dblclick').

    Parameters

    • type: string
    • fn: LeafletEventHandlerFn
    • Optional context: any

    Returns this

  • Adds a set of type/listener pairs, e.g. {click: onClick, mousemove: onMouseMove}

    Parameters

    • eventMap: LeafletEventHandlerFnMap

    Returns this

once

  • once(type: string, fn: LeafletEventHandlerFn, context?: any): this
  • once(eventMap: LeafletEventHandlerFnMap): this
  • Behaves as on(...), except the listener will only get fired once and then removed.

    Parameters

    • type: string
    • fn: LeafletEventHandlerFn
    • Optional context: any

    Returns this

  • Behaves as on(...), except the listener will only get fired once and then removed.

    Parameters

    • eventMap: LeafletEventHandlerFnMap

    Returns this

openPopup

  • openPopup(popup: Popup): this
  • openPopup(content: Content, latlng: LatLngExpression, options?: PopupOptions): this
  • Parameters

    • popup: Popup

    Returns this

  • Parameters

    • content: Content
    • latlng: LatLngExpression
    • Optional options: PopupOptions

    Returns this

openTooltip

  • openTooltip(tooltip: Tooltip): this
  • openTooltip(content: Content, latlng: LatLngExpression, options?: TooltipOptions): this
  • Parameters

    • tooltip: Tooltip

    Returns this

  • Parameters

    • content: Content
    • latlng: LatLngExpression
    • Optional options: TooltipOptions

    Returns this

panBy

  • panBy(offset: PointExpression): this
  • Parameters

    • offset: PointExpression

    Returns this

panInsideBounds

  • panInsideBounds(bounds: LatLngBoundsExpression, options?: PanOptions): this
  • Parameters

    • bounds: LatLngBoundsExpression
    • Optional options: PanOptions

    Returns this

panTo

  • panTo(latlng: LatLngExpression, options?: PanOptions): this
  • Parameters

    • latlng: LatLngExpression
    • Optional options: PanOptions

    Returns this

project

  • project(latlng: LatLngExpression, zoom: number): Point
  • Parameters

    • latlng: LatLngExpression
    • zoom: number

    Returns Point

remove

  • remove(): this
  • Returns this

removeControl

  • removeControl(control: Control): this
  • Parameters

    • control: Control

    Returns this

removeEventListener

  • removeEventListener(type: string, fn: LeafletEventHandlerFn, context?: any): this
  • removeEventListener(eventMap: LeafletEventHandlerFnMap): this
  • Alias for off(...)

    Removes a previously added listener function. If no function is specified, it will remove all the listeners of that particular event from the object. Note that if you passed a custom context to on, you must pass the same context to off in order to remove the listener.

    Parameters

    • type: string
    • fn: LeafletEventHandlerFn
    • Optional context: any

    Returns this

  • Alias for off(...)

    Removes a set of type/listener pairs.

    Parameters

    • eventMap: LeafletEventHandlerFnMap

    Returns this

removeEventParent

  • removeEventParent(obj: Evented): this
  • Removes an event parent, so it will stop receiving propagated events

    Parameters

    • obj: Evented

    Returns this

removeLayer

  • removeLayer(layer: Layer): this
  • Parameters

    • layer: Layer

    Returns this

setMaxBounds

  • setMaxBounds(bounds: LatLngBoundsExpression): this
  • Inherited function to provide event emitting.

    Parameters

    • bounds: LatLngBoundsExpression

    Returns this

setMaxZoom

  • setMaxZoom(val: number): this

setMinZoom

  • setMinZoom(val: number): this

setView

  • setView(center: LatLngExpression, zoom: number, options?: ZoomPanOptions): this
  • Parameters

    • center: LatLngExpression
    • zoom: number
    • Optional options: ZoomPanOptions

    Returns this

setZoom

  • setZoom(zoom: number, options?: ZoomPanOptions): this
  • Parameters

    • zoom: number
    • Optional options: ZoomPanOptions

    Returns this

setZoomAround

  • setZoomAround(position: Point | LatLngExpression, zoom: number, options?: ZoomOptions): this
  • Parameters

    • position: Point | LatLngExpression
    • zoom: number
    • Optional options: ZoomOptions

    Returns this

stop

  • stop(): this
  • Returns this

stopLocate

  • stopLocate(): this
  • Returns this

unproject

  • unproject(point: PointExpression, zoom: number): LatLng
  • Parameters

    • point: PointExpression
    • zoom: number

    Returns LatLng

whenReady

  • whenReady(fn: function, context?: any): this
  • Parameters

    • fn: function
        • (): void
        • Returns void

    • Optional context: any

    Returns this

wrapLatLng

  • wrapLatLng(latlng: LatLngExpression): LatLng
  • Parameters

    • latlng: LatLngExpression

    Returns LatLng

wrapLatLngBounds

  • wrapLatLngBounds(bounds: LatLngBounds): LatLngBounds
  • Parameters

    • bounds: LatLngBounds

    Returns LatLngBounds

zoomIn

  • zoomIn(delta?: undefined | number, options?: ZoomOptions): this
  • Parameters

    • Optional delta: undefined | number
    • Optional options: ZoomOptions

    Returns this

zoomOut

  • zoomOut(delta?: undefined | number, options?: ZoomOptions): this
  • Parameters

    • Optional delta: undefined | number
    • Optional options: ZoomOptions

    Returns this

Static addInitHook

  • addInitHook(initHookFn: function): any & Class
  • addInitHook(methodName: string, ...args: any[]): any & Class
  • Parameters

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

    Returns any & Class

  • Parameters

    • methodName: string
    • Rest ...args: any[]

    Returns any & Class

Static extend

  • extend(props: any): object & Class
  • Parameters

    • props: any

    Returns object & Class

Static include

  • include(props: any): any & Class
  • Parameters

    • props: any

    Returns any & Class

Static mergeOptions

  • mergeOptions(props: any): any & Class
  • Parameters

    • props: any

    Returns any & Class

Generated using TypeDoc