I stumbled across this while doing a related search... if you haven't already figured it out, your problem is that in JSNI you need to call:
new $wnd.google.maps.LatLng(...) not: new google.maps.LatLng(...) There's also a basic-but-functional GWT wrapper for maps v3 at http://code.google.com/p/gwt-maps3/. It might get abandoned if that other project matures, however. Jeff On Tue, Mar 9, 2010 at 9:15 AM, Joe <[email protected]> wrote: > Thank's for the fast reply! > The library for Google Maps v3 isn't finished I think and who has to > be the script tag when I want to use the Javascript library with > JSNI? > > I tried <script type="text/javascript" src="http://maps.google.com/ > maps/api/js?sensor=false"></script> > but that doesn't work?! > > Concerning the library for Google Maps v3 it isn'z clear to me, how I > can add all the classes to my existing eclipse-project?? > > Thanl's and Regards > Joe > > On 9 Mrz., 16:59, Eric Ayers <[email protected]> wrote: >> Some folks have started a library for Google Maps v3. You can browse some >> sample cod here: >> >> http://code.google.com/p/gwt-google-maps-v3/source/browse/#hg/src/com... >> >> From what you describe, it looks like your app is not loading the maps API >> before calling this code. >> >> http://code.google.com/apis/maps/documentation/v3/introduction.html >> >> You probably need to add or fix the <script> tag in your host page that >> loads the Maps API from Google's servers. >> <http://code.google.com/p/gwt-google-maps-v3/source/browse/#hg/src/com...> >> >> On Tue, Mar 9, 2010 at 10:41 AM, Joe >> <[email protected]>wrote: >> >> >> >> > Hello everybody! >> > I try to usethe Google Maps API V3 with the GWT, but it doesn't work. >> > In a class I have the following method: >> >> > public static native JavaScriptObject getMap()/*-{ >> >> > ar latlng = new google.maps.LatLng(50.940872, 6.937888); >> > var myOptions = { >> > zoom: 15, >> > center: latlng, >> > mapTypeId: google.maps.MapTypeId.ROADMAP >> > }; >> > var map = new google.maps.Map(div, myOptions); >> > }-*/; >> >> > But I always get the error that "google" isn't known. I new that I ave >> > to include the script-tag. I tried to put it in the xml-File or the >> > html-File of my GWT2.0 project, but it doesn't work, Does anyone know >> > who to setup my project to use the Google Maps API V3 with JSNI??? >> > I hope someone could help me... >> > Thank's a lot >> > Regards, Joe >> >> > -- >> > You received this message because you are subscribed to the Google Groups >> > "Google Web Toolkit" group. >> > To post to this group, send email to [email protected]. >> > To unsubscribe from this group, send email to >> > [email protected]<google-web-toolkit%[email protected]> >> > . >> > For more options, visit this group at >> >http://groups.google.com/group/google-web-toolkit?hl=en. >> >> -- >> Eric Z. Ayers >> Google Web Toolkit, Atlanta, GA USA >> Sign up now for Google I/O 2010: May 19-20,http://code.google.com/io > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
