Class

abstract class Class : JsAny(source)

L.Class powers the OOP facilities of Leaflet and is used to create almost all the Leaflet classes documented.

In addition to implementing a simple classical inheritance model, it introduces several special properties for convenient code organization — options, includes and statics.

Inheritors

Constructors

Link copied to clipboard
constructor()

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
fun addInitHook(initHookFn: () -> Unit): JsAny

Adds a constructor hook to the class.

fun addInitHook(methodName: String, vararg args: JsAny): JsAny
Link copied to clipboard
fun include(props: JsAny): JsAny

Includes a mixin into the current class.

Link copied to clipboard
fun mergeOptions(props: JsAny): JsAny

Merges options into the defaults of the class.