-
Notifications
You must be signed in to change notification settings - Fork 1
Home
GeolocationCoordinates | GeolocationPosition |
GeolocationPositionError | GeolocationPositionException |
GeolocationService | IGeolocationService |
PositionChangedEventArgs | PositionErrorEventArgs |
PositionOptions |
Represents the data from a location query
The accuracy of the retrieved latitude and longitude, expressed in meters
The device's altitude
The accuracy of the retrieved altitude, expressed in meters
May be null
The direction towards which the device is facing, in clockwise degrees from true north
May be null
The device's latitude
The device's longitude
The device's velocity in meters per second
May be null
Returns a the latitude and longitude in a string
A string with a latitude and longitude
A class that contains a timestamp and a GeolocationCoordinates object
A GeolocationCoordinates object that contains the location query result
The time of retrieval, unix time expressed in milliseconds
Returns a string representation of the GeolocationPosition.Coords property
A string that represents a GeolocationCoordinates object
A class that contains info about an encountered error while querying a device's location
An error code representing the encountered error
Three error codes are possible: | | 1 | The acquisition of the geolocation information failed because the page didn't have the permission to do it. | | 2 | The acquisition of the geolocation failed because at least one internal source of position returned an internal error. | | 3 | The time allowed to acquire the geolocation, defined by PositionOptions.Timeout information was reached before the information was obtained. |
A human-readable string representation of the error
Returns the GeolocationPositionError.Message property
A human-readable string
Similar to the GeolocationPositionError class, but used as an exception
Initializes a new instance of the GeolocationPositionException class
Initializes a new instance of the GeolocationPositionException class
Name | Description |
---|---|
info |
System.Runtime.Serialization.SerializationInfo The System.Runtime.Serialization.SerializationInfo object that holds the serialized object data about the exception being thrown |
context |
System.Runtime.Serialization.StreamingContext The System.Runtime.Serialization.StreamingContext that holds contextual information about the source or destination |
Initializes a new instance of the GeolocationPositionException class
Name | Description |
---|---|
message |
System.String The exception message |
innerException |
System.Exception The inner exception |
Initializes a new instance of the GeolocationPositionException class
Name | Description |
---|---|
message |
System.String The exception message |
The main entry point of the API
Initializes a new instance of the GeolocationService class, and requests objects through dependency injection
Name | Description |
---|---|
jSRuntime |
Microsoft.JSInterop.IJSRuntime An Microsoft.JSInterop.IJSRuntime object |
Destructs the object and disposes of remaining System.IDisposables
GetCurrentPositionAsync(System.Action{Geolocation.Blazor.GeolocationPosition},System.Action{Geolocation.Blazor.GeolocationPositionError},Geolocation.Blazor.PositionOptions)
Creates a JavaScript object with helper methods
A method that is when GeolocationService.PositionChanged should fire
Name | Description |
---|---|
eventArgs |
Geolocation.Blazor.PositionChangedEventArgs A PositionChangedEventArgs object representing the event arguments |
A method that is when GeolocationService.PositionError should fire
Name | Description |
---|---|
eventArgs |
Geolocation.Blazor.PositionErrorEventArgs A PositionErrorEventArgs object representing the event arguments |
WatchPositionAsync(System.Action{Geolocation.Blazor.GeolocationPosition},System.Action{Geolocation.Blazor.GeolocationPositionError},Geolocation.Blazor.PositionOptions)
An interface that defines a Geolocation Service
A method that can be called to attach the IGeolocationService.PositionChanged and IGeolocationService.PositionError events
A function that unregisters a handler registered with IGeolocationService.WatchPositionAsync(System.Action{Geolocation.Blazor.GeolocationPosition},System.Action{Geolocation.Blazor.GeolocationPositionError},Geolocation.Blazor.PositionOptions)
Name | Description |
---|---|
id |
System.Int64 A unique id, acquired from IGeolocationService.WatchPositionAsync(System.Action{Geolocation.Blazor.GeolocationPosition},System.Action{Geolocation.Blazor.GeolocationPositionError},Geolocation.Blazor.PositionOptions) |
Gets the device's position
Name | Description |
---|---|
options |
Geolocation.Blazor.PositionOptions Optional PositionOptions object |
A GeolocationPosition object with the device's current location and the retrieval timestamp
Takes two delegates that will be called once, either when the location is acquired, or when there is an error
When there is an error, the success delegate will not be called
Name | Description |
---|---|
success |
System.Action{Geolocation.Blazor.GeolocationPosition} A delegate that takes a GeolocationPosition object, and returns nothing |
error |
System.Action{Geolocation.Blazor.GeolocationPositionError} A delegate that takes a GeolocationPositionError object, and returns nothing |
options |
Geolocation.Blazor.PositionOptions An optional PositionOptions object |
An event that is triggered when the device's position changes
For this event to fire at all, IGeolocationService.AttachEvents will first need to be called
An event that is triggered when an error is encountered querying the device's position
Registers two delegates that are called every time the browser detects a change in the device's location
May be called more than once with the same location
Name | Description |
---|---|
success |
System.Action{Geolocation.Blazor.GeolocationPosition} A delegate that takes a GeolocationPosition object, and returns nothing |
error |
System.Action{Geolocation.Blazor.GeolocationPositionError} A delegate that takes a GeolocationPositionError object, and returns nothing |
options |
Geolocation.Blazor.PositionOptions An optional PositionOptions object |
A unique identifier that may be used in IGeolocationService.ClearWatchAsync(System.Int64)
A class that wraps a GeolocationPosition for use in events
The GeolocationPosition that is wrapped
Wraps a GeolocationPositionError object for use in events
The GeolocationPositionError object that is wrapped
A class that contains options for retrieving locations
Indicates whether to sacrifice performance for accuracy
May result in longer response times
The oldest a cached position may be
The longest time the device may take to retrieve the location, in milliseconds
Returns a string representation of the options
A human-readable string