# mithril-ui-form-maplibre-plugin

> Plugin to add a MapLibre-based map component to Mithril-UI-Form.

Latest version **0.2.5** (published 2022-05-31) · MIT license · 0 weekly downloads

## Install

```sh
npm install mithril-ui-form-maplibre-plugin
pnpm add mithril-ui-form-maplibre-plugin
yarn add mithril-ui-form-maplibre-plugin
bun add mithril-ui-form-maplibre-plugin
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.5 |
| Published | 2022-05-31 |
| First published | 2022-05-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 94.7 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | Jos Vrij |
| Maintainers | jvrij |

## Links

- npm: https://www.npmjs.com/package/mithril-ui-form-maplibre-plugin
- npm.io page: https://npm.io/package/mithril-ui-form-maplibre-plugin

## Dependencies (3)

- [geojson](https://npm.io/package/geojson.md) ^0.5.0
- [maplibre-gl](https://npm.io/package/maplibre-gl.md) ^2.1.9
- [@mapbox/mapbox-gl-draw](https://npm.io/package/@mapbox/mapbox-gl-draw.md) ^1.3.0

## Recent versions

- 0.2.5 (latest) — 2022-05-31
- 0.2.4 — 2022-05-31
- 0.2.3 — 2022-05-30
- 0.2.2 — 2022-05-30
- 0.2.1 — 2022-05-28
- 0.2.0 — 2022-05-28

## README

# A map plugin for Mithril-ui-form using the maplibre library 

This is a plugin for [Mithril-ui-form](https://www.npmjs.com/package/mithril-ui-form). It adds the use of a map based on [MapLibre GL](https://www.npmjs.com/package/maplibre-gl).

```ts
import { mapLibrePlugin } from 'mithril-ui-form-maplibre-plugin';

...

registerPlugin('libremap', mapLibrePlugin());
```

You can load your own icons that can then be used in symbol layers.
```ts
import { mapLibrePlugin } from 'mithril-ui-form-maplibre-plugin';
import red from './assets/red.png';
import blue from './assets/blue.png';
import fallbackIcon from './assets/x.png';
...
const icons: Array<[img: string, name: string]> = [
    [red, 'RED'],
    [blue, 'BLUE'],
];

registerPlugin('libremap', mapLibrePlugin(fallbackIcon, icons));
```

---
_Source: https://npm.io/package/mithril-ui-form-maplibre-plugin · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
