]> dev.renevier.net Git - syp.git/blob - openlayers/lib/OpenLayers/Control/ZoomPanel.js
initial commit
[syp.git] / openlayers / lib / OpenLayers / Control / ZoomPanel.js
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. */
4
5 /**
6  * @requires OpenLayers/Control/Panel.js
7  * @requires OpenLayers/Control/ZoomIn.js
8  * @requires OpenLayers/Control/ZoomOut.js
9  * @requires OpenLayers/Control/ZoomToMaxExtent.js
10  */
11
12 /**
13  * Class: OpenLayers.Control.ZoomPanel
14  * The ZoomPanel control is a compact collecton of 3 zoom controls: a 
15  * <OpenLayers.Control.ZoomIn>, a <OpenLayers.Control.ZoomToMaxExtent>, and a
16  * <OpenLayers.Control.ZoomOut>. By default it is drawn in the upper left 
17  * corner of the map.
18  *
19  * Note: 
20  * If you wish to use this class with the default images and you want 
21  *       it to look nice in ie6, you should add the following, conditionally
22  *       added css stylesheet to your HTML file:
23  * 
24  * (code)
25  * <!--[if lte IE 6]>
26  *   <link rel="stylesheet" href="../theme/default/ie6-style.css" type="text/css" />
27  * <![endif]-->
28  * (end)
29  * 
30  * Inherits from:
31  *  - <OpenLayers.Control.Panel>
32  */
33 OpenLayers.Control.ZoomPanel = OpenLayers.Class(OpenLayers.Control.Panel, {
34
35     /**
36      * Constructor: OpenLayers.Control.ZoomPanel 
37      * Add the three zooming controls.
38      *
39      * Parameters:
40      * options - {Object} An optional object whose properties will be used
41      *     to extend the control.
42      */
43     initialize: function(options) {
44         OpenLayers.Control.Panel.prototype.initialize.apply(this, [options]);
45         this.addControls([
46             new OpenLayers.Control.ZoomIn(),
47             new OpenLayers.Control.ZoomToMaxExtent(),
48             new OpenLayers.Control.ZoomOut()
49         ]);
50     },
51
52     CLASS_NAME: "OpenLayers.Control.ZoomPanel"
53 });