vx-geolocation
v2.0.0
Published
> Tracks user's location via reactive variables :world_map:
Downloads
6
Maintainers
Readme
vx-geolocation
Tracks user's location via reactive variables :world_map:
Install
npm install vx-geolocation
Usage
Using this tiny package is fairly simple:
import { useGeolocation } from "vx-geolocation";
...
// then you can call the hook
const { position, error } = useGeolocation();
Documentation
Under the hood a Browser API is used to get the location data (See: MDN docs for more info).
The hook returns two reactive variables: positions
and error
.
There is a small App.vue
file so you can play with it easily locally.
Project Setup
npm install
Compile and Hot-Reload for Development
npm run dev
Type-Check, Compile and Minify for Production
npm run build
Lint with ESLint
npm run lint