I was wondering if there was a way to bind the shift key to an icon on the screen, so you dont have to hold down the shift key to area zoom to teh map? so when the user clicks on the icon it acts as if the user is holding the shift key down and can highlight an area to zoom into. i found another example but when i try and click on other buttons the zoom box keeps active.
var isactive = false;
function switchZoomFunction(map) {
if (isactive == false) {
olmap = Map1.getOpenLayersMap();
olmap.controls[1].deactivate(); // Please make sure the control id is Navigation for this controls[1]
var zoomBox = new OpenLayers.Control.ZoomBox({ alwaysZoom: false });
olmap.addControl(zoomBox);
zoomBox.activate();
isactive = true;
}
else {
isactive = false;
}
}