[OpenLayers-Users] Bug in LoadingPanel + testcase

Bart van den Eijnden (OSGIS) bartvde at osgis.nl
Wed Sep 9 14:27:34 EDT 2009


Okay, I've debugged this one, and it appears that the wheelZoom call in 
onWheelEvent (Handler.MouseWheel) won't go off since overLayerDiv is false.

In previous cases, document.body would be the originator of the event, 
and with the loadingpanel it is the loading panel div.

Not sure how to properly deal with this, maybe the developer who wrote 
the MouseWheel handler can help us?

My quick fix is not the right way to deal with this, but it might help 
you in the meantime:

        if (!overScrollableDiv && overMapDiv) {
            if (overLayerDiv || 
this.map.getControlsByClass('OpenLayers.Control.LoadingPanel').length > 0) {
                this.wheelZoom(e);
            }
            OpenLayers.Event.stop(e);
        }

Best regards,
Bart

manel.clos at ajgirona.cat wrote:
> Hi Bart,
>
> As explained in my previous post, I tested using the example at:
>
> http://dev.openlayers.org/addins/loadingPanel/trunk/examples/loadingpanel.html
>
> If you remove usage of PanZoomBar and MouseToolbar, and use Navigation, it will show the bug. Everything else is as in the example.
>
> So, yes, LoadingPanel is the first control added.
>
> --
> Manel Clos
>
>
> -----Mensaje original-----
> De: bartvde at osgis.nl [mailto:bartvde at osgis.nl]
> Enviado el: miércoles, 09 de septiembre de 2009 12:01
> Para: Clos Crespo, Manel
> CC: users at openlayers.org
> Asunto: Re: [OpenLayers-Users] Bug in LoadingPanel + testcase
>
> Hi Manel,
>
> what is the sequence in which you add the controls? Are you adding the
> LoadingPanel as the first control before adding the Navigation control?
>
> See also:
>
> http://openlayers.org/pipermail/dev/2008-November/003855.html
>
> Best regards,
> Bart
>
>   
>> Hi,
>>
>> there is a bug in LoadingPanel that prevents wheel events from being
>> processed. This happens only when used with OpenLayers.Control.Navigation.
>>
>> It works with the default usage:
>> http://dev.openlayers.org/addins/loadingPanel/trunk/examples/loadingpanel.html
>>
>> but making these changes to the same example will allow anyone to
>> reproduce the bug (tested in FF3 and IE7):
>>
>> in the init function:
>> ...
>> //   map.addControl(new OpenLayers.Control.PanZoomBar());
>> //   map.addControl(new OpenLayers.Control.MouseToolbar());
>>    map.addControl(new OpenLayers.Control.Navigation());
>> ...
>>
>> this is, comment out PanZoom and MouseToolbar and add Navigation.
>>
>> If loading panel is showing because tiles are loading, you *can not* use
>> the mouse wheel to zoom in/out. After loading or deactivating the loading
>> panel mouse wheel works as usual.
>>
>> Here are some previous reports that may offer some more details on the
>> problem:
>> http://openlayers.org/pipermail/users/2009-February/010246.html
>> http://openlayers.org/pipermail/users/2008-December/009508.html
>>
>> --
>> Manel Clos
>>
>> _______________________________________________
>> Users mailing list
>> Users at openlayers.org
>> http://openlayers.org/mailman/listinfo/users
>>
>>     
>
>
>
>
>   


-- 
Bart van den Eijnden
OSGIS, Open Source GIS
bartvde at osgis.nl
http://www.osgis.nl




More information about the Users mailing list