Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GWT : User Location

In GWT, is there a way to find out the user's physical location (country, state etc)?

like image 676
Kasturi Avatar asked May 10 '10 15:05

Kasturi


People also ask

How to get location of the user?

In order to get the last location of the user, make use of the Java public class FusedLocationProviderClient. It is actually a location service that combines GPS location and network location to achieve a balance between battery consumption and accuracy.

What API is used to locate a user's position?

The HTML Geolocation API is used to locate a user's position.


1 Answers

You can use HTML 5's geolocation feature in GWT using the Geolocation API provided by the gwt-mobile-webkit project.

edit: This feature is now included in the GWT SDK itself. See the geolocation package.

You'll only be able to use this on browsers that support this fairly new feature, though.

like image 158
Jason Hall Avatar answered Oct 14 '22 06:10

Jason Hall