Package org.vaadin.firitin.geolocation
Class GeolocationOptions
- java.lang.Object
-
- org.vaadin.firitin.geolocation.GeolocationOptions
-
- All Implemented Interfaces:
Serializable
public class GeolocationOptions extends Object implements Serializable
A class to configure options for geolocation requests.- Author:
- mstahv
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description GeolocationOptions()GeolocationOptions(Boolean enableHighAccuracy, Integer timeout, Integer maximumAge)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BooleangetEnableHighAccuracy()The enableHighAccuracy member provides a hint that the application would like to receive the most accurate location data.IntegergetMaximumAge()IntegergetTimeout()The timeout member denotes the maximum length of time, expressed in milliseconds, before acquiring a position expires.voidsetEnableHighAccuracy(Boolean enableHighAccuracy)voidsetMaximumAge(Integer maximumAge)voidsetTimeout(Integer timeout)
-
-
-
Method Detail
-
getEnableHighAccuracy
public Boolean 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
public void setEnableHighAccuracy(Boolean enableHighAccuracy)
-
getTimeout
public Integer 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
public void setTimeout(Integer timeout)
-
getMaximumAge
public Integer 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
public void setMaximumAge(Integer maximumAge)
-
-