The PanZoom is a visible control, composed of a ALKMaps.Control.PanPanel and a ALKMaps.Control.ZoomPanel. By default it is drawn in the upper left corner of the map.
ALKMaps. | The PanZoom is a visible control, composed of a ALKMaps.Control.PanPanel and a ALKMaps.Control.ZoomPanel. |
Properties | |
slideFactor | {Integer} Number of pixels by which we’ll pan the map in any direction on clicking the arrow buttons. |
slideRatio | {Number} The fraction of map width/height by which we’ll pan the map on clicking the arrow buttons. |
buttons | {Array(DOMElement)} Array of Button Divs |
position | {ALKMaps.Pixel} |
Constructor | |
ALKMaps. | |
Functions | |
destroy | |
setMap | |
draw | |
_addButton | |
_removeButton | |
removeButtons | |
onButtonClick | |
getSlideFactor | |
Constants | |
X | {Integer} |
Y | {Integer} |
{Integer} Number of pixels by which we’ll pan the map in any direction on clicking the arrow buttons. If you want to pan by some ratio of the map dimensions, use slideRatio instead.
{Number} The fraction of map width/height by which we’ll pan the map on clicking the arrow buttons. Default is null. If set, will override slideFactor. E.g. if slideRatio is .5, then the Pan Up button will pan up half the map height.
draw: function( px )
px | {ALKMaps.Pixel} |
{DOMElement} A reference to the container div for the PanZoom control.
_addButton:function( id, img, xy, sz, title )
id | {String} |
img | {String} |
xy | {ALKMaps.Pixel} |
sz | {ALKMaps.Size} |
{DOMElement} A Div (an alphaImageDiv, to be precise) that contains the image of the button, and has all the proper event handlers set.
destroy: function()
setMap: function( map )
draw: function( px )
_addButton:function( id, img, xy, sz, title )
_removeButton: function( btn )
removeButtons: function()
onButtonClick: function( evt )
getSlideFactor: function( dim )