public static class Geolocation.PositionOptions
extends java.lang.Object
Constructor and Description |
---|
PositionOptions() |
Modifier and Type | Method and Description |
---|---|
Geolocation.PositionOptions |
setHighAccuracyEnabled(boolean enabled)
Sets whether or not the application will request a more accurate position
from the browser.
|
Geolocation.PositionOptions |
setMaximumAge(int maximumAge)
Allows the browser to return a position immediately with a cached
position.
|
Geolocation.PositionOptions |
setTimeout(int timeout)
Sets the amount of time (in milliseconds) that the application is willing
to wait before getting the user's position.
|
public Geolocation.PositionOptions setHighAccuracyEnabled(boolean enabled)
If the browser supports this option, the user will be prompted to grant permission to this application, even if permission to get the user's (less accurate) position has already been granted.
Requesting high accuracy may be slower, or not supported at all, depending on the browser.
By default this is false
public Geolocation.PositionOptions setMaximumAge(int maximumAge)
By default this is 0, which means that the position cache will not be used.
public Geolocation.PositionOptions setTimeout(int timeout)
By default this is -1, which means there is no application-specified timeout.