beforeAdd method
Optional method. Called on map.addLayer(layer), before the layer is added to the map, before events are initialized, without waiting until the map is in a usable state. Use for early initialization only.
Implementation
external Layer beforeAdd(LeafletMap map);