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.
- Host: GitHub
- URL: https://github.com/koumoul-dev/leaflet-gps-tracker
- Owner: koumoul-dev
- Created: 2017-10-31T10:28:58.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2017-11-20T21:21:35.000Z (almost 8 years ago)
- Last Synced: 2025-03-23T00:06:36.943Z (7 months ago)
- Language: JavaScript
- Homepage:
- Size: 14.6 KB
- Stars: 10
- Watchers: 3
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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);