<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div>Hello,<br><br>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.<br><br>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.<br><br><span><a target="_blank" href="http://openlayers.org/pipermail/users/2007-February/000620.html">http://openlayers.org/pipermail/users/2007-February/000620.html</a></span><br><br>Below is basically what I have tried in code:<br><br>var panZoom = new
 OpenLayers.Control.PanZoomBar();<br>map.addControl(panZoom);<br>...<br>// To disable<br>&nbsp;panZoom.zoomBarDown = new function(){}; <br>&nbsp;panZoom.zoomBarDrag = new function(){}; <br>&nbsp;panZoom.zoomBarUp&nbsp;&nbsp; = new function(){}; <br>&nbsp;panZoom.buttonDown = new function(){}; <br>&nbsp;panZoom.doubleClick&nbsp;&nbsp; = new function(){}; <br><br>Does anyone have any suggestions regarding how to temporarily prevent the user from panning and zooming?<br><br>Thanks in advance,<br>Matt<br></div></div><br>
      <hr size=1>Yahoo! oneSearch: Finally, <a href="http://us.rd.yahoo.com/evt=48252/*http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC"> mobile search 
that gives answers</a>, not web links. 

</body></html>