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 ) : Marker
Defined in leaflet/leaflet.d.ts:2697
Parameters
type: string
fn: (e: L.LeafletEvent) => void
context?: any optional
Returns
Marker
public addEventListener( eventMap: any , context?: any ) : Marker
Defined in leaflet/leaflet.d.ts:2706
Parameters
eventMap: any
context?: any optional
Returns
Marker
public addOneTimeEventListener( type: string , fn: (e: L.LeafletEvent) => void , context?: any ) : Marker
Defined in leaflet/leaflet.d.ts:2698
Parameters
type: string
fn: (e: L.LeafletEvent) => void
context?: any optional
Returns
Marker
public addTo( map: Map ) : Marker
Defined in leaflet/leaflet.d.ts:2594
Adds the marker to the map.
Parameters
Returns
Marker
public bindPopup( html: string , options?: PopupOptions ) : Marker
Defined in leaflet/leaflet.d.ts:2631
Binds a popup with a particular HTML content to a click on this marker. You
can also open the bound popup with the Marker openPopup method.
Parameters
Returns
Marker
public bindPopup( el: HTMLElement , options?: PopupOptions ) : Marker
Defined in leaflet/leaflet.d.ts:2637
Binds a popup with a particular HTML content to a click on this marker. You
can also open the bound popup with the Marker openPopup method.
Parameters
Returns
Marker
Defined in leaflet/leaflet.d.ts:2643
Binds a popup with a particular HTML content to a click on this marker. You
can also open the bound popup with the Marker openPopup method.
Parameters
Returns
Marker
public clearAllEventListeners( ) : Marker
Defined in leaflet/leaflet.d.ts:2708
Returns
Marker
public closePopup( ) : Marker
Defined in leaflet/leaflet.d.ts:2658
Closes the bound popup of the marker if it's opened.
Returns
Marker
public fire( type: string , data?: any ) : Marker
Defined in leaflet/leaflet.d.ts:2705
Parameters
type: string
data?: any optional
Returns
Marker
public fireEvent( type: string , data?: any ) : Marker
Defined in leaflet/leaflet.d.ts:2701
Parameters
type: string
data?: any optional
Returns
Marker
public getLatLng( ) : LatLng
Defined in leaflet/leaflet.d.ts:2599
Returns the current geographical position of the marker.
Returns
LatLng
public hasEventListeners( type: string ) : boolean
Defined in leaflet/leaflet.d.ts:2700
Parameters
Returns
boolean
public off( type: string , fn?: (e: L.LeafletEvent) => void , context?: any ) : Marker
Defined in leaflet/leaflet.d.ts:2704
Parameters
type: string
fn?: (e: L.LeafletEvent) => void optional
context?: any optional
Returns
Marker
public off( eventMap?: any , context?: any ) : Marker
Defined in leaflet/leaflet.d.ts:2710
Parameters
eventMap?: any optional
context?: any optional
Returns
Marker
public on( type: string , fn: (e: L.LeafletEvent) => void , context?: any ) : Marker
Defined in leaflet/leaflet.d.ts:2702
Parameters
type: string
fn: (e: L.LeafletEvent) => void
context?: any optional
Returns
Marker
public on( eventMap: any , context?: any ) : Marker
Defined in leaflet/leaflet.d.ts:2709
Parameters
eventMap: any
context?: any optional
Returns
Marker
public onAdd( map: Map )
Defined in leaflet/leaflet.d.ts:2687
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:2693
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 ) : Marker
Defined in leaflet/leaflet.d.ts:2703
Parameters
type: string
fn: (e: L.LeafletEvent) => void
context?: any optional
Returns
Marker
public openPopup( ) : Marker
Defined in leaflet/leaflet.d.ts:2653
Opens the popup previously bound by the bindPopup method.
Returns
Marker
public removeEventListener( type: string , fn?: (e: L.LeafletEvent) => void , context?: any ) : Marker
Defined in leaflet/leaflet.d.ts:2699
Parameters
type: string
fn?: (e: L.LeafletEvent) => void optional
context?: any optional
Returns
Marker
public removeEventListener( eventMap?: any , context?: any ) : Marker
Defined in leaflet/leaflet.d.ts:2707
Parameters
eventMap?: any optional
context?: any optional
Returns
Marker
public setIcon( icon: Icon ) : Marker
Defined in leaflet/leaflet.d.ts:2609
Changes the marker icon.
Parameters
Returns
Marker
public setLatLng( latlng: LatLng ) : Marker
Defined in leaflet/leaflet.d.ts:2604
Changes the marker position to the given point.
Parameters
Returns
Marker
public setOpacity( opacity: number ) : Marker
Defined in leaflet/leaflet.d.ts:2619
Changes the opacity of the marker.
Parameters
Returns
Marker
public setPopupContent( html: string , options?: PopupOptions ) : Marker
Defined in leaflet/leaflet.d.ts:2668
Sets an HTML content of the popup of this marker.
Parameters
Returns
Marker
public setPopupContent( el: HTMLElement , options?: PopupOptions ) : Marker
Defined in leaflet/leaflet.d.ts:2673
Sets an HTML content of the popup of this marker.
Parameters
Returns
Marker
public setZIndexOffset( offset: number ) : Marker
Defined in leaflet/leaflet.d.ts:2614
Changes the zIndex offset of the marker.
Parameters
Returns
Marker
public toGeoJSON( popup: Popup , options?: PopupOptions ) : any
Defined in leaflet/leaflet.d.ts:2678
Returns a GeoJSON representation of the marker (GeoJSON Point Feature).
Parameters
Returns
any
public togglePopup( ) : Marker
Defined in leaflet/leaflet.d.ts:2663
Toggles the popup previously bound by the bindPopup method.
Returns
Marker
public unbindPopup( ) : Marker
Defined in leaflet/leaflet.d.ts:2648
Unbinds the popup previously bound to the marker with bindPopup.
Returns
Marker
public update( ) : Marker
Defined in leaflet/leaflet.d.ts:2625
Updates the marker position, useful if coordinates of its latLng object
were changed directly.
Returns
Marker