# l-subpixel-position

> This leaflet plugin adds subpixel positioning methods for leaflet objects.

Latest version **1.0.1** (published 2020-02-29) · MIT license · 0 weekly downloads

## Install

```sh
npm install l-subpixel-position
pnpm add l-subpixel-position
yarn add l-subpixel-position
bun add l-subpixel-position
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2020-02-29 |
| First published | 2020-02-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | itanka9 |
| Maintainers | itanka9 |
| Keywords | leaflet, animation |

## Links

- npm: https://www.npmjs.com/package/l-subpixel-position
- Repository: https://github.com/itanka9/l-subpixel-position
- Homepage: https://github.com/itanka9/l-subpixel-position#readme
- Issues: https://github.com/itanka9/l-subpixel-position/issues
- npm.io page: https://npm.io/package/l-subpixel-position

## Alternatives

- [@luma.gl/experimental](https://npm.io/package/@luma.gl/experimental.md) — 77.1K weekly downloads
- [persona-harness](https://npm.io/package/persona-harness.md) — 4.7K weekly downloads
- [@tsparticles/effect-bubble](https://npm.io/package/@tsparticles/effect-bubble.md) — 4.6K weekly downloads
- [f3d](https://npm.io/package/f3d.md) — 730 weekly downloads
- [spark-html-motion](https://npm.io/package/spark-html-motion.md) — 298 weekly downloads

## Recent versions

- 1.0.1 (latest) — 2020-02-29
- 1.0.0 — 2020-02-29

## README

# Leaflet Subpixel Position

This leaflet plugin adds subpixel positioning methods for leaflet objects.

![Subpixel Demo](./artwork/subpixel-demo.gif)

[Demo](https://itanka9.github.io/l-subpixel-position)

## Compatibility with Leaflet Versions

Compatible with the latest stable Leaflet version leaflet-1.5.

## Browser Compatibility

This plugin useful in webkit-based browsers. It is compatible but useless in Firefox, because it does not support displaying things with subpixels.

## Usage

Add this line to your HTML file after Leaflet:

```html
<script type="text/javascript" src="https://unpkg.com/l-subpixel-position@1.0.0/index.js"></script>
```

Or you can use npm and es6 modules:

```bash
npm i leaflet l-subpixel-position --save
```

```js
import 'leaflet';
import 'l-subpixel-position';
```

Then add can call `setLatLngPrecise` method of your `L.Marker` instances:

```js
const myMarker = L.Marker([48.8567, 2.3508]).addTo(map);

...
myMarker.setLatLngPrecise(latlng)
```

## API

Plugin adds `setLatLngPrecise` method to `L.Marker`:

| Method | Returns | Description |
| --- | --- | --- |
| `setLatLngPrecise(<`[LatLng](https://leafletjs.com/reference-1.6.0.html#latlng)`> latlng)` | this | Changes the marker position to the given point with subpixel accuracy. |

This method has the same behaviour as standard `setLatLng`.

## License

MIT

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