Publisher | LullaByte |
---|---|
File size | 52.80kB |
Number of files | 13 |
Latest version | 1 |
Latest release date | 2023-05-09 11:45:59 |
First release date | 2023-05-09 11:45:59 |
Supported Unity versions | 2018.4.2 or higher |
Simple and robust wrapper for Javascript Geolocation API https://developer.mozilla.org/en-US/docs/Web/API/Geolocation_API
Usage:
Add namespace:
using SK.GeolocatorWebGL.Models;
Use one of the API methods:
- SK_Geolocator.GetCurrentLocation(onResult, onError, options); - Get current location if possible.
- SK_Geolocator.WatchLocation(onResult, onError, options); - Add watch on location change. Method returns newly created watchId.
SK_Geolocator.ClearWatch(watchId = null); - Remove watch by ID. If no watchId provided it will try to remove latest watchId