1 /* Copyright (c) 2006-2008 MetaCarta, Inc., published under the Clear BSD
2 * license. See http://svn.openlayers.org/trunk/openlayers/license.txt for the
3 * full text of the license. */
6 * @requires OpenLayers/Control/Panel.js
7 * @requires OpenLayers/Control/Navigation.js
8 * @requires OpenLayers/Control/ZoomBox.js
12 * Class: OpenLayers.Control.NavToolbar
13 * This Toolbar is an alternative to the Navigation control that displays
14 * the state of the control, and provides a UI for changing state to
15 * use the zoomBox via a Panel control.
17 * If you wish to change the properties of the Navigation control used
18 * in the NavToolbar, see:
19 * http://trac.openlayers.org/wiki/Toolbars#SubclassingNavToolbar
23 * - <OpenLayers.Control.Panel>
25 OpenLayers.Control.NavToolbar = OpenLayers.Class(OpenLayers.Control.Panel, {
28 * Constructor: OpenLayers.Control.NavToolbar
29 * Add our two mousedefaults controls.
32 * options - {Object} An optional object whose properties will be used
33 * to extend the control.
35 initialize: function(options) {
36 OpenLayers.Control.Panel.prototype.initialize.apply(this, [options]);
38 new OpenLayers.Control.Navigation(),
39 new OpenLayers.Control.ZoomBox()
45 * calls the default draw, and then activates mouse defaults.
48 var div = OpenLayers.Control.Panel.prototype.draw.apply(this, arguments);
49 this.activateControl(this.controls[0]);
53 CLASS_NAME: "OpenLayers.Control.NavToolbar"