The PanZoomBar is a visible control composed of a OpenLayers.Control.PanPanel and a <OpenLayers.Control.ZoomBar>. By default it is displayed in the upper left corner of the map as 4 directional arrows above a vertical slider.
| OpenLayers. | The PanZoomBar is a visible control composed of a OpenLayers.Control.PanPanel and a <OpenLayers.Control.ZoomBar>. |
| Properties | |
| zoomStopWidth | |
| zoomStopHeight | |
| slider | |
| sliderEvents | {OpenLayers.Events} |
| zoombarDiv | {DOMElement} |
| zoomWorldIcon | {Boolean} |
| panIcons | {Boolean} Set this property to false not to display the pan icons. |
| forceFixedZoomLevel | {Boolean} Force a fixed zoom level even though the map has fractionalZoom |
| mouseDragStart | {OpenLayers.Pixel} |
| deltaY | {Number} The cumulative vertical pixel offset during a zoom bar drag. |
| zoomStart | {OpenLayers.Pixel} |
| Constructor | |
| OpenLayers. | |
| Functions | |
| destroy | |
| setMap | |
| redraw | clear the div and start over. |
| draw | |
| _addZoomBar | |
| _removeZoomBar | |
| onButtonClick | |
| passEventToSlider | This function is used to pass events that happen on the div, or the map, through to the slider, which then does its moving thing. |
| zoomBarDown | event listener for clicks on the slider |
| zoomBarDrag | This is what happens when a click has occurred, and the client is dragging. |
| zoomBarUp | Perform cleanup when a mouseup event is received -- discover new zoom level and switch to it. |
| moveZoomBar | Change the location of the slider to match the current zoom level. |
_addZoomBar:function( centered )
| centered | {OpenLayers.Pixel} where zoombar drawing is to start. |
passEventToSlider:function( evt )
This function is used to pass events that happen on the div, or the map, through to the slider, which then does its moving thing.
| evt | {OpenLayers.Event} |
zoomBarDrag:function( evt )
This is what happens when a click has occurred, and the client is dragging. Here we must ensure that the slider doesn’t go beyond the bottom/top of the zoombar div, as well as moving the slider to its new visual location
| evt | {OpenLayers.Event} |
zoomBarUp:function( evt )
Perform cleanup when a mouseup event is received -- discover new zoom level and switch to it.
| evt | {OpenLayers.Event} |
destroy: function()
setMap: function( map )
clear the div and start over.
redraw: function()
draw: function( px )
_addZoomBar:function( centered )
_removeZoomBar: function()
onButtonClick: function( evt )
This function is used to pass events that happen on the div, or the map, through to the slider, which then does its moving thing.
passEventToSlider:function( evt )
event listener for clicks on the slider
zoomBarDown:function( evt )
This is what happens when a click has occurred, and the client is dragging.
zoomBarDrag:function( evt )
Perform cleanup when a mouseup event is received -- discover new zoom level and switch to it.
zoomBarUp:function( evt )
Change the location of the slider to match the current zoom level.
moveZoomBar:function()