This test case shows you how to do :
http://code.google.com/p/gwt-google-apis/source/browse/trunk/ajaxloader/ajaxloader/test/com/google/gwt/ajaxloader/client/ClientLocationTest.java

Alexandre

2011/4/16 muggs <muggs...@gmail.com>

> I'm currently trying out my first gwt app with gwt-map library. I'm
> having problem accessing getLatitude() and other similar methods in
> ClientLocation class. I'm new to gwt and needless to say
> JavaScriptObject, I have tried asking in StackOverflow.com and experts-
> exchange.com  but unfortunately I have yet to receive any replies..
> Hopefully this will be the right place to get help ...
>
> Below is a snippet of my code
> ---------------------------------------------------------
>  public void onModuleLoad() {
>    ClientLocation user = getUser();
>    LatLng cawkerCity = LatLng.newInstance(user.getLatitude(),
> user.getLongitude());
>  }
>
> private native ClientLocation getUser() /*-{
>  return $wnd.jsonData[0];
> }-*/;
>
> --------------------------------------------------------
>
> I have tried return $wnd.jsonData but it returned null.
>
> How should I get an instance of ClientLocation so that I can use
> getLatitude() and getLonitude() ?
> Any help or examples will be much appreciated...
>
> gwt-map Library:
> http://code.google.com/p/gwt-google-apis/wiki/MapsGettingStarted
> API for ClientLocation:
>
> http://gwt-google-apis.googlecode.com/svn/javadoc/maps/1.1/com/google/gwt/ajaxloader/client/ClientLocation.html
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Web Toolkit" group.
> To post to this group, send email to google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-web-toolkit?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to