Skip to content

Commit

Permalink
docs: add short description for using this plugin in e.g. React
Browse files Browse the repository at this point in the history
  • Loading branch information
BePo65 authored and brunob committed Jul 1, 2024
1 parent 35159fe commit 94358a9
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,23 @@ Source code : <https://github.com/brunob/leaflet.fullscreen>
Downloads : <https://github.com/brunob/leaflet.fullscreen/releases>

Demo : <https://brunob.github.io/leaflet.fullscreen/>

## Use as ESM module

To use this plugin in the code of a project (based on e.g. React or Angular) follow these steps:

1. install leaflet.fullscreen with your package manager (e.g. `npm install leaflet.fullscreen`).

2. Update your code

```
import L from 'leaflet';
import 'leaflet.fullscreen';
const let map = new L.Map('map', {
fullscreenControl: true,
fullscreenControlOptions: {
position: 'topleft'
}
});
```

0 comments on commit 94358a9

Please sign in to comment.