# @types/leaflet-label

> TypeScript definitions for leaflet-label

Latest version **0.2.39** (published 2023-11-07) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/leaflet-label
pnpm add @types/leaflet-label
yarn add @types/leaflet-label
bun add @types/leaflet-label
```

## Health

**Score 45/100 (D)** — status: abandoned.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 0.2.39 |
| Published | 2023-11-07 |
| First published | 2016-05-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 7.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51439 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/leaflet-label
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/leaflet-label
- npm.io page: https://npm.io/package/@types/leaflet-label

## Dependencies (1)

- [@types/leaflet](https://npm.io/package/@types/leaflet.md) ^0

## Recent versions

- 0.2.39 (latest) — 2023-11-07
- 0.2.37 (ts4.3) — 2023-08-30
- 0.2.36 (ts3.6) — 2021-07-08
- 0.2.35 (ts3.0) — 2020-05-15
- 0.2.34 (ts2.3) — 2017-11-09
- 0.2.33 (ts2.0) — 2017-08-29
- 0.2.38 — 2023-10-18
- 0.2.32 — 2017-03-29
- 0.2.31 — 2017-03-24
- 0.2.30 — 2017-01-11
- 0.2.29 — 2016-09-21
- 0.2.28 — 2016-09-19
- 0.2.27 — 2016-07-14
- 0.2.26-alpha — 2016-07-08
- 0.2.25-alpha — 2016-07-04
- … 7 more at https://npm.io/package/@types/leaflet-label/versions

## README

# Installation
> `npm install --save @types/leaflet-label`

# Summary
This package contains type definitions for leaflet-label (https://github.com/Leaflet/Leaflet.label).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/leaflet-label.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/leaflet-label/index.d.ts)
````ts
import * as L from "leaflet";

declare module "leaflet" {
    interface IconOptions {
        labelAnchor?: Point | undefined;
    }

    interface PathOptions {
        labelAnchor?: Point | undefined;
    }

    interface CircleMarkerOptions {
        labelAnchor?: Point | undefined;
    }

    interface Marker {
        showLabel(): Marker;
        hideLabel(): Marker;
        setLabelNoHide(noHide: boolean): void;
        bindLabel(content: string, options?: LabelOptions): Marker;
        unbindLabel(): Marker;
        updateLabelContent(content: string): void;
        getLabel(): Label;
        setOpacity(opacity: number, labelHasSemiTransparency: boolean): void;
    }

    interface CircleMarker {
        showLabel(): CircleMarker;
        hideLabel(): CircleMarker;
        setLabelNoHide(noHide: boolean): void;
        bindLabel(content: string, options?: LabelOptions): CircleMarker;
        unbindLabel(): CircleMarker;
        updateLabelContent(content: string): void;
        getLabel(): Label;
    }

    interface FeatureGroup<T extends ILayer> {
        clearLayers(): FeatureGroup<T>;
        bindLabel(content: string, options?: LabelOptions): FeatureGroup<T>;
        unbindLabel(): FeatureGroup<T>;
        updateLabelContent(content: string): FeatureGroup<T>;
    }

    interface Path {
        bindLabel(content: string, options?: LabelOptions): Path;
        unbindLabel(): Path;
        updateLabelContent(content: string): void;
    }

    interface LabelOptions {
        className?: string | undefined;
        clickable?: boolean | undefined;
        direction?: string | undefined; // 'left' | 'right' | 'auto';
        pane?: string | undefined;
        noHide?: boolean | undefined;
        offset?: Point | undefined;
        opacity?: number | undefined;
        zoomAnimation?: boolean | undefined;
    }

    interface LabelStatic extends ClassStatic {
        new(options?: LabelOptions): Label;
    }

    const Label: LabelStatic;

    interface Label extends IEventPowered<Label> {
        onAdd(map: Map): void;
        onRemove(map: Map): void;
        setLatLng(latlng: LatLng): Label;
        setContent(content: string): Label;
        close(): void;
        updateZIndex(zIndex: number): void;
        setOpacity(opacity: number): void;
    }
}

````

### Additional Details
 * Last updated: Tue, 07 Nov 2023 09:09:38 GMT
 * Dependencies: [@types/leaflet](https://npmjs.com/package/@types/leaflet)

# Credits
These definitions were written by [Wim Looman](https://github.com/Nemo157).

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