Geolocation for WebGL


Simple wrapper for Javascript Geolocation API. https://developer.mozilla.org/en-US/docs/Web/API/Geolocation_API


by LullaByte


Price History +

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