[OpenLayers-Users] Temporarily disabling PanZoomBar and MouseToolbar
Matthew White
mgwhite at yahoo.com
Wed Aug 8 10:32:57 EDT 2007
Hello,
I am currently using OpenLayers 2.4 and would like to temporarily prevent the user for using the PanZoomBar and the MouseToolBar. My application periodically refreshes markers on the map using an asynchronous call. I would like to prevent the user from panning or zooming while the refresh is taking place.
I have tried the approach described in the following post (using the MouseToolBar and PanZoomBar controls). However, the controls still seem to function as normal.
http://openlayers.org/pipermail/users/2007-February/000620.html
Below is basically what I have tried in code:
var panZoom = new OpenLayers.Control.PanZoomBar();
map.addControl(panZoom);
...
// To disable
panZoom.zoomBarDown = new function(){};
panZoom.zoomBarDrag = new function(){};
panZoom.zoomBarUp = new function(){};
panZoom.buttonDown = new function(){};
panZoom.doubleClick = new function(){};
Does anyone have any suggestions regarding how to temporarily prevent the user from panning and zooming?
Thanks in advance,
Matt
____________________________________________________________________________________
Pinpoint customers who are looking for what you sell.
http://searchmarketing.yahoo.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20070808/e9d008fb/attachment.html
More information about the Users
mailing list