# ol-geolocation

> Geolocation Control for OpenLayers

Latest version **0.1.0** (published 2018-02-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install ol-geolocation
pnpm add ol-geolocation
yarn add ol-geolocation
bun add ol-geolocation
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2018-02-11 |
| First published | 2018-02-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 101 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Eric Czajkowski |
| Maintainers | eczajk |

## Links

- npm: https://www.npmjs.com/package/ol-geolocation
- npm.io page: https://npm.io/package/ol-geolocation

## Dependencies (1)

- [ol](https://npm.io/package/ol.md) ^4.6.4

## Recent versions

- 0.1.0 (latest) — 2018-02-11

## README

# ol-geolocation
Geolocation Control for OpenLayers

## Install

```
npm install ol-geolocation
```

## Usage

```js
import Map from 'ol/map';
import View from 'ol/view';
import GeolocationToggle from 'ol-geolocation';

new Map({
   controls: [
     new GeolocationToggle(),
   ],
   target: 'map-container',
   view: new View({
     center: [0,0],
     zoom: 14
   })
 });
```

## Options

All parameters are optional.

| Parameter | Type | Description |
| --- | --- | --- |
| `accuracyStyle` | `ol.style.Style`  | Style to apply to "accuracy" feature |
| `positionStyle` | `ol.style.Style` | Style to apply to "position" feature |
| `transformFn(geometry)` | Function | Geometry transformation function. |

## Style

CSS styles need to be included to style the control elements.

## Examples

TODO

## Test

TODO

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