Beispiel #1
0
        /// <inheritdoc/>
        public async Task <long?> WatchPosition(PositionOptions options = null)
        {
            var callbackObj = DotNetObjectReference.Create(this);

            return(await _jsRuntime.InvokeAsync <int>("Geolocation.watchPosition",
                                                      callbackObj, nameof(SetWatchPosition), options));
        }
Beispiel #2
0
        /// <inheritdoc/>
        public async Task <GeolocationResult> GetCurrentPosition(PositionOptions options = null)
        {
            var module = await _jsBinder.GetModule();

            return(await module.InvokeAsync <GeolocationResult>("Geolocation.getCurrentPosition", options));
        }
Beispiel #3
0
 /// <inheritdoc/>
 public async Task <GeolocationResult> GetCurrentPosition(PositionOptions options = null)
 {
     return(await _jsRuntime.InvokeAsync <GeolocationResult>("Geolocation.getCurrentPosition", options));
 }