[OpenLayers-Users] Mouse Wheel Zoom Problem on Layer Switching with
EditingToolbar
fuhrysteve
fuhrysteve at gmail.com
Wed Jul 22 11:23:49 EDT 2009
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20090722/ea2473d0/attachment.html
More information about the Users
mailing list