An open API service indexing awesome lists of open source software.

https://github.com/koumoul-dev/leaflet-gps-tracker

Customizable control to integrate navigator.geolocation.watchPosition functionalities in leaflet.
https://github.com/koumoul-dev/leaflet-gps-tracker

Last synced: 6 months ago
JSON representation

Customizable control to integrate navigator.geolocation.watchPosition functionalities in leaflet.

Awesome Lists containing this project

README

          

# leaflet-gps-tracker

Customizable control to integrate navigator.geolocation.watchPosition functionalities in leaflet.

[Check it out](https://koumoul-dev.github.io/leaflet-gps-tracker/).

## Usage

In a CommonJS environment (probably webpack) :

```js
const GPSControl = require('leaflet-gps-tracker').GPSControl
require('leaflet-gps-tracker/gps-control.css')

...
new GPSControl({}).addTo(map)
```

Using browser globals (see the [source code of the demo](./index.html)):

```html

...

...

new GPSControl({}).addTo(map);