]> dev.renevier.net Git - syp.git/blob - openlayers/lib/OpenLayers/Control/PanPanel.js
initial commit
[syp.git] / openlayers / lib / OpenLayers / Control / PanPanel.js
1 /**
2  * @requires OpenLayers/Control/Panel.js
3  * @requires OpenLayers/Control/Pan.js
4  */
5
6 /**
7  * Class: OpenLayers.Control.PanPanel
8  * The PanPanel is visible control for panning the map North, South, East or
9  * West in small steps. By default it is drawn in the top left corner of the
10  * map.
11  *
12  * Note: 
13  * If you wish to use this class with the default images and you want 
14  *       it to look nice in ie6, you should add the following, conditionally
15  *       added css stylesheet to your HTML file:
16  * 
17  * (code)
18  * <!--[if lte IE 6]>
19  *   <link rel="stylesheet" href="../theme/default/ie6-style.css" type="text/css" />
20  * <![endif]-->
21  * (end)
22  *
23  * Inherits from:
24  *  - <OpenLayers.Control.Panel> 
25  */
26 OpenLayers.Control.PanPanel = OpenLayers.Class(OpenLayers.Control.Panel, {
27
28     /**
29      * Constructor: OpenLayers.Control.PanPanel 
30      * Add the four directional pan buttons.
31      *
32      * Parameters:
33      * options - {Object} An optional object whose properties will be used
34      *     to extend the control.
35      */
36     initialize: function(options) {
37         OpenLayers.Control.Panel.prototype.initialize.apply(this, [options]);
38         this.addControls([
39             new OpenLayers.Control.Pan(OpenLayers.Control.Pan.NORTH),
40             new OpenLayers.Control.Pan(OpenLayers.Control.Pan.SOUTH),
41             new OpenLayers.Control.Pan(OpenLayers.Control.Pan.EAST),
42             new OpenLayers.Control.Pan(OpenLayers.Control.Pan.WEST)
43         ]);
44     },
45
46     CLASS_NAME: "OpenLayers.Control.PanPanel"
47 });