Class GeolocationOptions
java.lang.Object
org.vaadin.firitin.geolocation.GeolocationOptions
- All Implemented Interfaces:
Serializable
A class to configure options for geolocation requests.
- Author:
- mstahv
- See Also:
-
Constructor Summary
ConstructorDescriptionGeolocationOptions
(Boolean enableHighAccuracy, Integer timeout, Integer maximumAge) -
Method Summary
Modifier and TypeMethodDescriptionThe enableHighAccuracy member provides a hint that the application would like to receive the most accurate location data.The timeout member denotes the maximum length of time, expressed in milliseconds, before acquiring a position expires.void
setEnableHighAccuracy
(Boolean enableHighAccuracy) void
setMaximumAge
(Integer maximumAge) void
setTimeout
(Integer timeout)
-
Constructor Details
-
GeolocationOptions
public GeolocationOptions() -
GeolocationOptions
-
-
Method Details
-
getEnableHighAccuracy
The enableHighAccuracy member provides a hint that the application would like to receive the most accurate location data. The intended purpose of this member is to allow applications to inform the implementation that they do not require high accuracy geolocation fixes and, therefore, the implementation MAY avoid using geolocation providers that consume a significant amount of power (e.g., GPS).NOTE: A word of warning about enableHighAccuracy The enableHighAccuracy member can result in slower response times or increased power consumption. The user might also disable this capability, or the device might not be able to provide more accurate results than if the flag wasn't specified.
- Returns:
- true if high accuracy is requested
-
setEnableHighAccuracy
-
getTimeout
The timeout member denotes the maximum length of time, expressed in milliseconds, before acquiring a position expires.NOTE: When is the timeout calculated? The time spent waiting for the document to become visible and for obtaining permission to use the API is not included in the period covered by the timeout member. The timeout member only applies when acquiring a position begins.
NOTE: Immediate cancellation An options.timeout value 0 can cause immediate failures.
- Returns:
- the timeout
-
setTimeout
-
getMaximumAge
- Returns:
- The maximumAge member indicates that the web application is willing to accept a cached position whose age is no greater than the specified time in milliseconds.
-
setMaximumAge
-