Skip to content
This repository was archived by the owner on Apr 25, 2020. It is now read-only.

Commit 7b2acc7

Browse files
committed
readme
1 parent 78e230e commit 7b2acc7

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ Leaflet Control that renders a react component onto the map.
66

77
The control is provided as a [UMD](https://github.com/umdjs/umd) module.
88

9+
The essence of it is 10 simple lines of code, you should just copy, paste and customize it. Or you could grab it from npm:
10+
```
11+
npm i leaflet-control-react
12+
```
13+
914
Basic usage:
1015

1116
```js
@@ -39,6 +44,10 @@ when the control is added to the map, and anytime the `.render()` function is ca
3944

4045
`position` - Inherited from `L.Control`
4146

47+
## Methods
48+
49+
`render()` - Re-renders the react component. Could be called to change top-level props for example.
50+
4251
## Events
4352

4453
You should be able to use the [react event system](https://facebook.github.io/react/docs/events.html), since it's just a thin wrapper around your react component.

0 commit comments

Comments
 (0)