we have this example: http://co开发者_如何学运维de.google.com/apis/maps/documentation/v3/basics.html#DetectingUserLocation
which shows how to get the user's position in JSP code. How to use it using GWT?
thanks
Since GWT runs JavaScript in the browser, you'll have to look into using the brand-new HTML5 Geolocation features to make this work.
In fact, the gwt-mobile-webkit project includes Geolocation features in GWT (targeted at mobile webkit browsers like the one on Android and the iPhone).
If that doesn't fit your needs exactly, you can always have GWT call the necessary native JS code using JSNI.
精彩评论