# leaflet-fullscreen

> A fullscreen control for Leaflet

Latest version **1.0.2** (published 2017-01-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install leaflet-fullscreen
pnpm add leaflet-fullscreen
yarn add leaflet-fullscreen
bun add leaflet-fullscreen
```

## Health

**Score 23/100 (F)** — status: abandoned.

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2017-01-18 |
| First published | 2013-02-25 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | separate (@types/leaflet-fullscreen) |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 451 |
| Author | John Firebaugh |
| Maintainers | ansis, jfirebaugh, mapbox-admin, mourner, tmcw, tristen, willwhite, yhahn |
| Keywords | leaflet, maps, fullscreen, client |

## Links

- npm: https://www.npmjs.com/package/leaflet-fullscreen
- Repository: https://github.com/Leaflet/Leaflet.fullscreen
- Homepage: https://github.com/Leaflet/Leaflet.fullscreen#readme
- Issues: https://github.com/Leaflet/Leaflet.fullscreen/issues
- npm.io page: https://npm.io/package/leaflet-fullscreen

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 1.0.2 (latest) — 2017-01-18
- 1.0.1 — 2015-12-28
- 1.0.0 — 2015-12-28
- 0.0.4 — 2015-01-13
- 0.0.3 — 2014-06-18
- 0.0.2 — 2014-03-19
- 0.0.1 — 2013-11-28
- 0.0.0 — 2013-02-25

## README

## Leaflet.fullscreen
A HTML5 fullscreen plugin for Leaflet.

### Usage

``` js
var map = new L.Map('map', {
    fullscreenControl: true,
    // OR
    fullscreenControl: {
        pseudoFullscreen: false // if true, fullscreen to page width and height
    }
});
```

### API

``` js
map.isFullscreen() // Is the map fullscreen?
map.toggleFullscreen() // Either go fullscreen, or cancel the existing fullscreen.

// `fullscreenchange` Event that's fired when entering or exiting fullscreen.
map.on('fullscreenchange', function () {
    if (map.isFullscreen()) {
        console.log('entered fullscreen');
    } else {
        console.log('exited fullscreen');
    }
});

L.Control.Fullscreen // A fullscreen button. Or use the `{fullscreenControl: true}` option when creating L.Map.
```

### Including via CDN

Leaflet.fullscreen is [available through the Mapbox Plugin CDN](https://www.mapbox.com/mapbox.js/plugins/#leaflet-fullscreen) - just copy this include:

```html
<script src='https://api.mapbox.com/mapbox.js/plugins/leaflet-fullscreen/v1.0.1/Leaflet.fullscreen.min.js'></script>
<link href='https://api.mapbox.com/mapbox.js/plugins/leaflet-fullscreen/v1.0.1/leaflet.fullscreen.css' rel='stylesheet' />
```

### Building

    npm install && make

__ProTip__ You may want to install `watch` so you can run `watch make`
without needing to execute make on every change.

---
_Source: https://npm.io/package/leaflet-fullscreen · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
