Geolocation
Wisej.Ext.Geolocation.Geolocation
Namespace: Wisej.Ext.Geolocation
Assembly: Wisej.Ext.Geolocation (3.2.0.0)
The Geolocation component represents an object able to programmatically obtain the position of the device.
public class Geolocation : Component, IComponent
Constructors
Geolocation()

Initializes a new instance of the Geolocation class.
Geolocation(container)

Initializes a new instance of the Geolocation class together with the specified container.
Properties
ActiveWatch

Boolean: Enables or disables active watch mode for this geolocation component. When enabled, the PositionChanged event be fired automatically each time the position of the device changes. (Default: False
)
EnableHighAccuracy

Boolean: Indicates the application would like to receive the best possible results. (Default: False
)
If true and if the device is able to provide a more accurate position, it will do so. Note that this can result in slower response times or increased power consumption (with a GPS chip on a mobile device for example). On the other hand, if false, the device can take the liberty to save resources by responding more quickly and/or using less power.
LastPosition

Position: Returns the last position detected by the device.
MaximumAge

Int64: Indicates the maximum age in milliseconds of a possible cached position that is acceptable to return. (Default: -1
)
If set to 0, it means that the device cannot use a cached position and must attempt to retrieve the real current position. If set to -1 the device must return a cached position regardless of its age.
Timeout

Int64: Sets or gets the maximum length of time (in milliseconds) the device is allowed to take in order to return a position. (Default: -1
)
Methods
GetCurrentPosition(callback)

Returns the current position of the device.
GetCurrentPositionAsync()

Asynchronously returns the current position of the device.
Returns: Task<Position>.
Events
PositionChanged

EventHandler Fired when the location of the browser changes while this component has an active watch.
Last updated
Was this helpful?