onAdd method

Layer onAdd(
  1. LeafletMap map
)

Should contain code that creates DOM elements for the layer, adds them to map panes where they should belong and puts listeners on relevant map events. Called on map.addLayer(layer).

Implementation

external Layer onAdd(LeafletMap map);