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&v=2&sensor=true_or_false&key=ABQIAAAApOR5tulUc5y1R6lOKFkbpRTwM0brOpm-
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.