Hi Vincent,

You might want to look at this project:

http://code.google.com/p/gwt-google-apis/wiki/MapsGettingStarted

This not only has gwt bindings for google maps, but also has a way to
load the API dynamically (using the ajax loader):
http://gwt-google-apis.googlecode.com/svn/javadoc/maps/1.1/com/google/gwt/maps/client/Maps.html#loadMapsApi(java.lang.String,%20java.lang.String,%20boolean,%20java.lang.Runnable)

This works like a charm for me.

Thanks,
Dan

On Aug 9, 4:33 am, Vincent COROLLEUR <[email protected]> wrote:
> Hello,
>
> I'am trying to load dynamically with GWT some scripts in order to use
> google map API V2.
>
> By the static way it works (script tag in the index.jsp page) :
>
>         <script src="http://maps.google.com/maps?
> file=api&amp;v=2&amp;sensor=true_or_false&amp;key=ABQIAAAApOR5tulUc5y1R6lOK 
> FkbpRTwM0brOpm-
> All5BF6PoaKBxRWWERTqbaRJ6lpQdSlaltvv3tD-fLXwvQ" type="text/
> javascript"></script>
>
> I tried this to do it dynamically (from the EntryPoint) but it doesn't
> work :
>
> Element script1 = DOM.createElement("script");
> script1.setAttribute("type", "text/javascript");
> script1.setAttribute("src", "http://maps.google.com/maps?
> file=api&v=2&sensor=false&key=ABQIAAAApOR5tulUc5y1R6lOKFkbpRTwM0brOpm-
> All5BF6PoaKBxRWWERTqbaRJ6lpQdSlaltvv3tD-fLXwvQ");
> RootPanel.getBodyElement().appendChild(script1);
>
> This code leads to an error when it's loaded ("Unloading module") :
> its unload my application module.
>
> I am still looking for a way to load dynamically google map.
>
> Regards,
>
> Vincent COROLLEUR

-- 
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.

Reply via email to