Beispiel #1
0
        private async ValueTask DispatchEventAsync(GeolocationJsEventArgs eventArgs)
        {
            await Task.Run(() => {
                switch (eventArgs.Type)
                {
                case "geolocationerror":
                    GeolocationError?.Invoke(new GeolocationErrorEventArgs(eventArgs));
                    break;

                case "geolocationsuccess":
                    GeolocationSuccess?.Invoke(new GeolocationSuccessEventArgs(eventArgs));
                    break;
                }
            });
        }
Beispiel #2
0
 /// <summary>
 /// Watches for changes to the device's current position.
 /// </summary>
 /// <param name="geolocationSuccess">The callback that is called with the current position.</param>
 /// <returns>returns a watch id that references the watch position interval. The watch id should be used with geolocation.clearWatch to stop watching for changes in position.</returns>
 public JsString watchPosition(GeolocationSuccess geolocationSuccess) { return null; }
Beispiel #3
0
 /// <summary>
 /// geolocation.getCurrentPositon is an asynchronous function. It returns the device's current position to the
 /// geolocationSuccess callback with a Position object as the parameter.
 /// If there is an error, the geolocationError callback is invoked with a PositionError object.
 /// </summary>
 /// <param name="geolocationSuccess">The callback that is called with the current position.</param>
 /// <returns>Contains Position coordinates and timestamp, created by the geolocation API.</returns>
 public Position getCurrentPosition(GeolocationSuccess geolocationSuccess) { return null; }
Beispiel #4
0
 /// <summary>
 /// Watches for changes to the device's current position.
 /// </summary>
 /// <param name="geolocationSuccess">The callback that is called with the current position.</param>
 /// <param name="geolocationError">The callback that is called if there was an error.</param>
 /// <param name="geolocationOptions"> The geolocation options.</param>
 /// <returns>returns a watch id that references the watch position interval. The watch id should be used with geolocation.clearWatch to stop watching for changes in position.</returns>
 public JsString watchPosition(GeolocationSuccess geolocationSuccess, GeolocationError geolocationError, GeolocationOptions geolocationOptions) { return null; }
Beispiel #5
0
 /// <summary>
 /// geolocation.getCurrentPositon is an asynchronous function. It returns the device's current position to the
 /// geolocationSuccess callback with a Position object as the parameter.
 /// If there is an error, the geolocationError callback is invoked with a PositionError object.
 /// </summary>
 /// <param name="geolocationSuccess">The callback that is called with the current position.</param>
 /// <param name="geolocationError">The callback that is called if there was an error.</param>
 /// <param name="geolocationOptions"> The geolocation options.</param>
 /// <returns>Contains Position coordinates and timestamp, created by the geolocation API.</returns>
 public Position getCurrentPosition(GeolocationSuccess geolocationSuccess, GeolocationError geolocationError, GeolocationOptions geolocationOptions) { return null; }