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.
Constructors
Initializes a new instance of the Geolocation class.
Initializes a new instance of the Geolocation class together with the specified container.
Name | Type | Description |
---|---|---|
container | A IContainer that represents the container for the component. |
Properties
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
)
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.
Position: Returns the last position detected by the device.
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.
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
Returns the current position of the device.
Parameter | Type | Description |
---|---|---|
callback |
Asynchronously returns the current position of the device.
Returns: Task<Position>.
Events
EventHandler Fired when the location of the browser changes while this component has an active watch.
Last updated