Re: GWT and Map dynamic loading

2010-08-13 Thread Vincent COROLLEUR
Hello, I still have the problem. I tried to load other scripts and it works. There is a mechanism from JS maps API that i may not understand or know. I should not be the only guy trying this... Regards, Vincent -- You received this message because you are subscribed to the Google Groups

Re: GWT and Map dynamic loading

2010-08-12 Thread Vincent COROLLEUR
Application bugs when the code is reached, i tried DefferedCommand and i even tried to launch it with a button... Debug mode won't give me any explaination. It's been three days i'm on it and i can't see any sunbeam :) -- You received this message because you are subscribed to the Google Groups

Re: GWT and Map dynamic loading

2010-08-12 Thread cokol
i would use appropriate API for either maps but control them from above, from the DOM of the browser, so first I'd create two DIV containers and bind GMaps or OpenLayers to each, depending on the user selection you can make the one or another container invisible, BUT you should not consider to

Re: GWT and Map dynamic loading

2010-08-12 Thread Vincent COROLLEUR
Hi, I always tried with JSNI and it's the same... (Unloading module when scipt is loading) On Aug 12, 9:35 am, cokol eplisc...@googlemail.com wrote: i would use appropriate API for either maps but control them from above, from the DOM of the browser, so first I'd create two DIV containers

Re: GWT and Map dynamic loading

2010-08-12 Thread cokol
lol, maybe OpenLayer detects and kills Google Maps :-) On 12 Aug., 09:57, Vincent COROLLEUR vcoroll...@gmail.com wrote: Hi, I always tried with JSNI and it's the same... (Unloading module when scipt is loading) On Aug 12, 9:35 am, cokol eplisc...@googlemail.com wrote: i would use

Re: GWT and Map dynamic loading

2010-08-12 Thread Vincent COROLLEUR
But even if try to load only one map dynamically, it bugs. It works only by the static way for the moment (script tag in index.jsp) -- You received this message because you are subscribed to the Google Groups Google Web Toolkit group. To post to this group, send email to

Re: GWT and Map dynamic loading

2010-08-12 Thread cokol
maybe you make a change to a DOM node what GWT is aware of and therefore triggers module unload? try following function (ready to use) define the function inside JSP script function loadJS(url){ var loaderNode = document.createElement(script);

Re: GWT and Map dynamic loading

2010-08-12 Thread Vincent COROLLEUR
I just tried this and it doesn't work, same problem. I had already tried a similar thing but the JSNI was implemented in GWT code, same problem anyway :) I tried to put a javaScript file with basic code on tomcat and it succed. So the problem doesn't come from the way i load the script. I think

Re: GWT and Map dynamic loading

2010-08-12 Thread cokol
this indeed could be the case, never seen that such things refuse to work - but we're ont done yet, please try to defer loading the script upon button click - just to be sure browser loaded and initialized, so create a button and load the script from that onClickHandler() if still would ont work,

Re: GWT and Map dynamic loading

2010-08-12 Thread Vincent COROLLEUR
It's the same when i load on a button click. I ll take a look at requireJS. Thank you for your help ! On Aug 12, 11:47 am, cokol eplisc...@googlemail.com wrote: this indeed could be the case, never seen that such things refuse to work - but we're ont done yet, please try to defer loading the

GWT and Map dynamic loading

2010-08-11 Thread Vincent COROLLEUR
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 =

Re: GWT and Map dynamic loading

2010-08-11 Thread Eric Ayers
That error message doesn't look familiar. Where do you see the message? Are you running in development mode or web mode? If you want to dynamically load the Google Maps API, you can use the gwt-google-apis maps library Maps.loadMapsApi() method:

Re: GWT and Map dynamic loading

2010-08-11 Thread Vincent COROLLEUR
Hello, I'm trying this in hosted mode (development mode). I can see this error in the Eclipse console. If i use Goodle map API, i will not be able to load the other king of map i need to use. I tried many way to load these javascript files dynamically with an URL as argument but it's always the

Re: GWT and Map dynamic loading

2010-08-11 Thread Eric Ayers
The gwt-maps API allows you to defer loading of the Maps API. The Maps API will not actually be download until you call Maps.loadMapsApi() Regardless, what I think is happening is that your code is failing in a static initializer or before the onModuleLoad() returns. One way to debug this is to