OpenLayers.Control.PanZoomBar

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.

Inherits from

Summary
OpenLayers.Control.PanZoomBarThe 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.Control.PanZoomBar
Functions
destroy
setMap
redrawclear the div and start over.
draw
_addZoomBar
_removeZoomBar
onButtonClick
passEventToSliderThis function is used to pass events that happen on the div, or the map, through to the slider, which then does its moving thing.
zoomBarDownevent listener for clicks on the slider
zoomBarDragThis is what happens when a click has occurred, and the client is dragging.
zoomBarUpPerform cleanup when a mouseup event is received -- discover new zoom level and switch to it.
moveZoomBarChange the location of the slider to match the current zoom level.

Properties

zoomStopWidth

zoomStopHeight

slider

sliderEvents

zoombarDiv

{DOMElement}

zoomWorldIcon

{Boolean}

panIcons

{Boolean} Set this property to false not to display the pan icons.  If false the zoom world icon is placed under the zoom bar.  Defaults to true.

forceFixedZoomLevel

{Boolean} Force a fixed zoom level even though the map has fractionalZoom

mouseDragStart

deltaY

{Number} The cumulative vertical pixel offset during a zoom bar drag.

zoomStart

Constructor

OpenLayers.Control.PanZoomBar

Functions

destroy

destroy: function()

setMap

setMap: function(map)

Parameters

map{OpenLayers.Map}

redraw

redraw: function()

clear the div and start over.

draw

draw: function(px)

Parameters

px{OpenLayers.Pixel}

_addZoomBar

_addZoomBar:function(centered)

Parameters

centered{OpenLayers.Pixel} where zoombar drawing is to start.

_removeZoomBar

_removeZoomBar: function()

onButtonClick

onButtonClick: function(evt)

Parameters

evt{Event}

passEventToSlider

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.

Parameters

evt{OpenLayers.Event}

zoomBarDown

zoomBarDown:function(evt)

event listener for clicks on the slider

Parameters

evt{OpenLayers.Event}

zoomBarDrag

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

Parameters

evt{OpenLayers.Event}

zoomBarUp

zoomBarUp:function(evt)

Perform cleanup when a mouseup event is received -- discover new zoom level and switch to it.

Parameters

evt{OpenLayers.Event}

moveZoomBar

moveZoomBar:function()

Change the location of the slider to match the current zoom level.

The PanPanel is visible control for panning the map North, South, East or West in small steps.
This class represents a screen coordinate, in x and y coordinates
destroy: function()
setMap: function(map)
redraw: function()
clear the div and start over.
draw: function(px)
_addZoomBar:function(centered)
_removeZoomBar: function()
onButtonClick: function(evt)
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.
zoomBarDown:function(evt)
event listener for clicks on the slider
zoomBarDrag:function(evt)
This is what happens when a click has occurred, and the client is dragging.
zoomBarUp:function(evt)
Perform cleanup when a mouseup event is received -- discover new zoom level and switch to it.
moveZoomBar:function()
Change the location of the slider to match the current zoom level.
The PanZoom is a visible control, composed of a OpenLayers.Control.PanPanel and a OpenLayers.Control.ZoomPanel.
Instances of OpenLayers.Map are interactive maps embedded in a web page.
Utility functions for event handling.
Close