Class Geolocation

java.lang.Object
com.google.gwt.geolocation.client.Geolocation

public class Geolocation extends Object
Implements the HTML5 Geolocation interface.

You can obtain a user's position by first calling Geolocation.getIfSupported()

Once you have a Geolocation, you can request the user's current position by calling getCurrentPosition(Callback) or watchPosition(Callback).

The first time an application requests the user's position, the browser will prompt the user for permission. If the user grants permission, the browser will locate the user and report it back to your application. If the user declines permission, the callback's Callback.onFailure(Object) method will be called with a PositionError with its code set to PositionError.PERMISSION_DENIED.

Experimental API: This API is still under development and is subject to change.

This may not be supported on all browsers.

See Also: