L.Class powers the OOP facilities of Leaflet and is used to create
almost all of the Leaflet classes documented.
Methods
public addEventListener( type: string , fn: (e: L.LeafletEvent) => void , context?: any ) : Path
Defined in leaflet/leaflet.d.ts:3003
Parameters
type: string
fn: (e: L.LeafletEvent) => void
context?: any optional
Returns
Path
public addEventListener( eventMap: any , context?: any ) : Path
Defined in leaflet/leaflet.d.ts:3012
Parameters
eventMap: any
context?: any optional
Returns
Path
public addOneTimeEventListener( type: string , fn: (e: L.LeafletEvent) => void , context?: any ) : Path
Defined in leaflet/leaflet.d.ts:3004
Parameters
type: string
fn: (e: L.LeafletEvent) => void
context?: any optional
Returns
Path
public addTo( map: Map ) : Path
Defined in leaflet/leaflet.d.ts:2900
Adds the layer to the map.
Parameters
Returns
Path
public bindPopup( html: string , options?: PopupOptions ) : Path
Defined in leaflet/leaflet.d.ts:2905
Binds a popup with a particular HTML content to a click on this path.
Parameters
Returns
Path
public bindPopup( el: HTMLElement , options?: PopupOptions ) : Path
Defined in leaflet/leaflet.d.ts:2910
Binds a popup with a particular HTML content to a click on this path.
Parameters
Returns
Path
Defined in leaflet/leaflet.d.ts:2915
Binds a popup with a particular HTML content to a click on this path.
Parameters
Returns
Path
public bringToBack( ) : Path
Defined in leaflet/leaflet.d.ts:2951
Brings the layer to the bottom of all path layers.
Returns
Path
public bringToFront( ) : Path
Defined in leaflet/leaflet.d.ts:2946
Brings the layer to the top of all path layers.
Returns
Path
public clearAllEventListeners( ) : Path
Defined in leaflet/leaflet.d.ts:3014
Returns
Path
public closePopup( ) : Path
Defined in leaflet/leaflet.d.ts:2931
Closes the path's bound popup if it is opened.
Returns
Path
public fire( type: string , data?: any ) : Path
Defined in leaflet/leaflet.d.ts:3011
Parameters
type: string
data?: any optional
Returns
Path
public fireEvent( type: string , data?: any ) : Path
Defined in leaflet/leaflet.d.ts:3007
Parameters
type: string
data?: any optional
Returns
Path
Defined in leaflet/leaflet.d.ts:2941
Returns the LatLngBounds of the path.
Returns
LatLngBounds
public hasEventListeners( type: string ) : boolean
Defined in leaflet/leaflet.d.ts:3006
Parameters
Returns
boolean
public off( type: string , fn?: (e: L.LeafletEvent) => void , context?: any ) : Path
Defined in leaflet/leaflet.d.ts:3010
Parameters
type: string
fn?: (e: L.LeafletEvent) => void optional
context?: any optional
Returns
Path
public off( eventMap?: any , context?: any ) : Path
Defined in leaflet/leaflet.d.ts:3016
Parameters
eventMap?: any optional
context?: any optional
Returns
Path
public on( type: string , fn: (e: L.LeafletEvent) => void , context?: any ) : Path
Defined in leaflet/leaflet.d.ts:3008
Parameters
type: string
fn: (e: L.LeafletEvent) => void
context?: any optional
Returns
Path
public on( eventMap: any , context?: any ) : Path
Defined in leaflet/leaflet.d.ts:3015
Parameters
eventMap: any
context?: any optional
Returns
Path
public onAdd( map: Map )
Defined in leaflet/leaflet.d.ts:2993
Should contain code that creates DOM elements for the overlay, adds them
to map panes where they should belong and puts listeners on relevant map events.
Called on map.addLayer(layer).
Parameters
public onRemove( map: Map )
Defined in leaflet/leaflet.d.ts:2999
Should contain all clean up code that removes the overlay's elements from
the DOM and removes listeners previously added in onAdd. Called on map.removeLayer(layer).
Parameters
public once( type: string , fn: (e: L.LeafletEvent) => void , context?: any ) : Path
Defined in leaflet/leaflet.d.ts:3009
Parameters
type: string
fn: (e: L.LeafletEvent) => void
context?: any optional
Returns
Path
public openPopup( latlng?: LatLng ) : Path
Defined in leaflet/leaflet.d.ts:2926
Opens the popup previously bound by the bindPopup method in the given point,
or in one of the path's points if not specified.
Parameters
Returns
Path
public redraw( ) : Path
Defined in leaflet/leaflet.d.ts:2957
Redraws the layer. Sometimes useful after you changed the coordinates that
the path uses.
Returns
Path
public removeEventListener( type: string , fn?: (e: L.LeafletEvent) => void , context?: any ) : Path
Defined in leaflet/leaflet.d.ts:3005
Parameters
type: string
fn?: (e: L.LeafletEvent) => void optional
context?: any optional
Returns
Path
public removeEventListener( eventMap?: any , context?: any ) : Path
Defined in leaflet/leaflet.d.ts:3013
Parameters
eventMap?: any optional
context?: any optional
Returns
Path
Defined in leaflet/leaflet.d.ts:2936
Changes the appearance of a Path based on the options in the Path options object.
Parameters
Returns
Path
public unbindPopup( ) : Path
Defined in leaflet/leaflet.d.ts:2920
Unbinds the popup previously bound to the path with bindPopup.
Returns
Path