Hello,

In my application, users can choose between two different map : google
map or OpenLayers. I'd like to load dynamically the chosen one by
loading the corresponding script (in this exemple google map).

I tried this (in the EntryPoint) :

                ScriptElement script1 = Document.get().createScriptElement();
                script1.setType("text/javascript");
                script1.setSrc("http://maps.google.com/maps?
file=api&v=2&sensor=false&key=ABQIAAAApOR5tulUc5y1R6lOKFkbpRTwM0brOpm-
All5BF6PoaKBxRWWERTqbaRJ6lpQdSlaltvv3tD-fLXwvQ");
        
Document.get().getElementsByTagName("head").getItem(0).appendChild(script1);

                ScriptElement script2 = Document.get().createScriptElement();
                script2.setType("text/javascript");
                
script2.setSrc("http://mapstraction.googlecode.com/svn/trunk/source/
mxn.js?(google)");
        
Document.get().getElementsByTagName("head").getItem(0).appendChild(script2);

This code makes my application unloading... (message : "Unloading
module").

I don't understand the problem. Is there a way to realize this ?

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