Dynamically switching which layer the EditingToolbar controls produces crazy
mouse-wheel-zoom problems. Zooming in/out one 'click' is normal, zooming
in/out one click a 2nd time will double how far the zoom goes, a 3rd time
will triple.. etc.

This sample code (i have a similar function for each raster layer) below
will reproduce the problem. The bug is gone when I remove the last 4 lines
where I add and remove the EditingToolbar.

Does anyone have any clue how to fix this mouse problem? I would like to
keep this all on the same page and still be able to draw on whatever vector
layer I want.


var myRasterLayer = new OpenLayers.Layer.TMS("My Raster Layer",
"/idMaps/evRack/", {    
        serviceVersion: '.', layername: '.', alpha: true,
        type: 'png', getURL: overlay_getTileURL 
});
myRasterLayer.events.register('loadstart', this, function() {
        vector1.setVisibility(false);
        vector2.setVisibility(false);
        vector3.setVisibility(true);
        map.removeControl(EditBar);
        EditBar = undefined;
        EditBar = new OpenLayers.Control.EditingToolbar(vector3);
        map.addControl(EditBar);
});

-- 
View this message in context: 
http://n2.nabble.com/Mouse-Wheel-Zoom-Problem-on-Layer-Switching-with-EditingToolbar-tp3303950p3303950.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users

Reply via email to