Skip to content

Latest commit

 

History

History
60 lines (48 loc) · 2.35 KB

API.md

File metadata and controls

60 lines (48 loc) · 2.35 KB

API

PropTypes

The following PropTypes are exported in the PropTypes object.

children: One PropTypes.node or an Array of PropTypes.node.

latLng: One of [number, number], {lat: number, lng: number} or {lat: number, lon: number}.

latLngList: An Array of LatLng.

bounds: An instance of Leaflet.LatLngBounds or a LatLngList.

controlPosition: One of topleft, topright, bottomleft or bottomright.

layerContainer: An object containing addLayer() and removeLayer() functions.

Events

Leaflet exposes its own events, different from React. You can listen to them using React-Leaflet by adding a callback to a property prefixed by on. Ex: <Map onMoveend={this.handleMoveend}>...</Map>.
Check Leaflet documentation for the events associated to each component.