So not only is the ZoomBox not working but any control I try to add that
isn't a button is not working. Below is my original code that I was using a
Panel control with and all of the buttons were working. If I add the panel
to the Ext Toolbar then all the buttons work but of course this isn't what I
want. Can someone explain to me why these buttons work on my panel but
adding the same exact control to the toolbar is not working? Thanks.
//declare all Map Controls
var nav = new OpenLayers.Control.NavigationHistory({title: "Pan Tool - Click
and drag on map window", displayClass: 'olControlButtonPrevious'});
var mouseDefaults = new OpenLayers.Control.MouseDefaults({title: "Pan Tool -
Click and drag on map window"});
var drawFeature = new OpenLayers.Control.DrawFeature(vlayer,
OpenLayers.Handler.Path, {title: "Draw Redline Feature", handlerOptions:
{style: s}});
var btnPrint = new OpenLayers.Control.Button({trigger: triggerPrint, title:
"Print Page", displayClass: 'olControlButtonPrint'});
var btnHelp = new OpenLayers.Control.Button({trigger: triggerHelp, title:
"Redgis Help", displayClass: 'olControlButtonHelp'});
var btnTutorial = new OpenLayers.Control.Button({trigger: triggerTutorial,
title: "Redgis Tutorials", displayClass: 'olControlButtonTutorial'});
var zoomIn = new OpenLayers.Control.ZoomBox({title:"Zoom in. Click on map or
click and drag to zoom in."});
var zoomOut = new OpenLayers.Control.ZoomBox({title:"Zoom out. Click on map
or click and drag to zoom out.", displayClass: 'olControlZoomOutBox', out:
true});
var btnRemoveRedlines = new OpenLayers.Control.Button({trigger:
triggerRemoveRedlines, title: "Remove Redlines", displayClass:
'olControlButtonHome'});
var panel = new OpenLayers.Control.Panel({defaultControl: mouseDefaults});
panel.addControls([zoomIn, zoomOut, nav.previous, mouseDefaults,
drawFeature, btnRemoveRedlines, btnPrint, btnHelp, btnTutorial]);
--
View this message in context:
http://osgeo-org.1803224.n2.nabble.com/ZoomBox-not-working-when-using-Ext-toolbar-and-GeoExt-Action-tp5591918p5592027.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users