From: Lukas J. <luk...@de...> - 2011-05-09 09:57:49
|
Thank you for your answer. I will check/try your solution and see if that solves my problem as well. /Lukas -----Ursprungligt meddelande----- Från: Christian Tzolov [mailto:chr...@gm...] Skickat: den 9 maj 2011 11:53 Till: gwt...@li... Ämne: Re: [Gwt-openlayers-users] Firefox4 - Problems with arrays While implementing my own customized (WMS) layer I faced a similar issue. To fix it I had to replace (in the javascript) the occurrences of if (xxxx instanceof Array) { by the far more elaborate array check: if(xxxx instanceof Array || !(xxxx instanceof Object) && Object.prototype.toString.call(xxxx) == "[object Array]" || typeof xxxx.length == "number" && typeof xxxx.splice != "undefined" && typeof xxxx.propertyIsEnumerable != "undefined" && !xxxx.propertyIsEnumerable("splice")) { (the xxxx stands for URLs array parameter) Whit this fix my layer works fine with multiple urls on all browsers including FF4. Cheers, Chris On Mon, May 9, 2011 at 10:49 AM, Lukas Johansson <luk...@de...> wrote: > > Yes exactly, the array are being concated into a string. > I did a test project illustrating this a while ago in which I tested both build 0.5, latest from trunk and my own version where I changed new Array into new $wnd.Array (which I just verified does not help). In the version linked below it's the 0.5 version that are included. I have just firebug and eclipse dev plugin for weeks without finding out what's wrong but of course I will try even more. Any additional help thought would be deeply appreciated. > > Here is that mail again (links to test project included): > ----- > I'm having a lot of problems with Firefox4 in our project. They basically boils down to two problems: > 1. Unable to use multiple urls for WMS-layers > 2. Unable to have a SelectFeature with more than two layers (layers are added in an array). > > I traced both problems down to the point where I am quite confident that they are related to Arrays and perhaps more so JStringArrays. It seems to be some problems with the ways arrays are converted into JavaScript arrays in firefox4. > > I've created a simple test project [1] to illustrate this issue which is also hosted here[2]. This project mimics [3] in different ways (some works, some don't). The upper left corner is the one that really should work, and does so in explorer, older versions of firefox and chrome but not In safari and firefox4. When building this project I've tried both the 0.5 build of OL-GWT and latest revision but with the same result. > > [1] http://decerno-app02.redbridge.se/firefox4/Firefox4Test.zip > [2] http://decerno-app02.redbridge.se/firefox4/Firefox4Test.html > [3] http://openlayers.org/dev/examples/multiserver.html > > I really don't know what to do next and any help would we deeply appreciated. > /Lukas > > > > > > -----Ursprungligt meddelande----- > Från: Alexander Solovets [mailto:aso...@gm...] > Skickat: den 9 maj 2011 10:27 > Till: Lukas Johansson > Ämne: Re: [Gwt-openlayers-users] Firefox4 - Problems with arrays > > Is the array contents still concatenated into a string? I pointed on > one of the most frequent error cause. Of course it may be something > else. Try to use firebug or chromium dev tools to trace the error, > look every time in JS console. Also it is very helpful to use Eclipse > developer plugin for GWT. With it you'll never miss the moment when > something goes wrong =) > ------------------------------------------------------------------------------ > WhatsUp Gold - Download Free Network Management Software > The most intuitive, comprehensive, and cost-effective network > management toolset available today. Delivers lowest initial > acquisition cost and overall TCO of any competing solution. > http://p.sf.net/sfu/whatsupgold-sd > _______________________________________________ > Gwt-openlayers-users mailing list > Gwt...@li... > https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users ------------------------------------------------------------------------------ WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd _______________________________________________ Gwt-openlayers-users mailing list Gwt...@li... https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users |