# Legato.Control.OverviewBoundingBox

This simple control switches the visibility of an arbitrary div which is given in its “div” property.

#### Inherits from

- Legato.Control

Summary

Legato.Control.OverviewBoundingBox | This simple control switches the visibility of an arbitrary div which is given in its “div” property.
Properties |
handlers | {Object}
parentMap | {OpenLayers.Map}
Functions |
OpenLayers.Control.OverviewMap | Create a new overview map
draw | Render the control in the browser.
mapDivClick | Handle browser events
update | Update the overview map after layers move.
updateRectToMap | Updates the extent rectangle position and size to match the map extent
updateMapToRect | Updates the map extent to match the extent rectangle position and size
setRectPxBounds | Set extent rectangle pixel bounds.
getRectBoundsFromMapBounds | Get the rect bounds from the map bounds.
getMapBoundsFromRectBounds | Get the map bounds from the rect bounds.
getLonLatFromOverviewPx | Get a map location from a pixel location
getOverviewPxFromLonLat | Get a pixel location from a map location
zoomBox |
lc:OverviewBoundingBox | XML based config for a Legato.Control.OverviewBoundingBox.

### Properties

### handlers

{Object}

### parentMap

{OpenLayers.Map}

### Functions

### OpenLayers.Control.OverviewMap

Create a new overview map

#### Parameters

object | {Object} Properties of this object will be set on the overview map object. Note, to set options on the map object contained in this control, set <mapOptions> as one of the options properties.

### draw

> draw: function()

Render the control in the browser.

### mapDivClick

> mapDivClick: function( | evt | )

Handle browser events

#### Parameters

evt | {<OpenLayers.Event>} evt

### update

> update: function()

Update the overview map after layers move.

### updateRectToMap

> updateRectToMap: function()

Updates the extent rectangle position and size to match the map extent

### updateMapToRect

> updateMapToRect: function( | zoom | )

Updates the map extent to match the extent rectangle position and size

### setRectPxBounds

> setRectPxBounds: function( | pxBounds | )

Set extent rectangle pixel bounds.

#### Parameters

pxBounds | {<OpenLayers.Bounds>}

### getRectBoundsFromMapBounds

> getRectBoundsFromMapBounds: function( | lonLatBounds | )

Get the rect bounds from the map bounds.

#### Parameters

lonLatBounds | {<OpenLayers.Bounds>}

#### Returns

{<OpenLayers.Bounds>}A bounds which is the passed-in map lon/lat extent translated into pixel bounds for the overview map

### getMapBoundsFromRectBounds

> getMapBoundsFromRectBounds: function( | pxBounds | )

Get the map bounds from the rect bounds.

#### Parameters

pxBounds | {<OpenLayers.Bounds>}

#### Returns

{<OpenLayers.Bounds>} Bounds which is the passed-in overview rect bounds translated into lon/lat bounds for the overview map

### getLonLatFromOverviewPx

> getLonLatFromOverviewPx: function( | overviewMapPx | )

Get a map location from a pixel location

#### Parameters

overviewMapPx | {<OpenLayers.Pixel>}

#### Returns

{<OpenLayers.LonLat>} Location which is the passed-in overview map OpenLayers.Pixel, translated into lon/lat by the overview map

### getOverviewPxFromLonLat

> getOverviewPxFromLonLat: function( | lonlat | )

Get a pixel location from a map location

#### Parameters

lonlat | {<OpenLayers.LonLat>}

#### Returns

{<OpenLayers.Pixel>} Location which is the passed-in OpenLayers.LonLat, translated into overview map pixels

### zoomBox

#### Parameters

position | {<OpenLayers.Bounds>} or {<OpenLayers.Pixel>}

## lc:OverviewBoundingBox

XML based config for a Legato.Control.OverviewBoundingBox.

#### See Also

- Legato.Control
- Legato.Beans.BeanFactory
- <QName>

#### A valid config example for a OverviewBoundingBox would be

>     <lc:OverviewBoundingBox div="overviewMap" displayClass="LegatoControlToggleOverviewMap"/>

> draw: function()

Render the control in the browser.

> mapDivClick: function( | evt | )

Handle browser events

> update: function()

Update the overview map after layers move.

> updateRectToMap: function()

Updates the extent rectangle position and size to match the map extent

> updateMapToRect: function( | zoom | )

Updates the map extent to match the extent rectangle position and size

> setRectPxBounds: function( | pxBounds | )

Set extent rectangle pixel bounds.

> getRectBoundsFromMapBounds: function( | lonLatBounds | )

Get the rect bounds from the map bounds.

> getMapBoundsFromRectBounds: function( | pxBounds | )

Get the map bounds from the rect bounds.

> getLonLatFromOverviewPx: function( | overviewMapPx | )

Get a map location from a pixel location

> getOverviewPxFromLonLat: function( | lonlat | )

Get a pixel location from a map location
This simple control switches the visibility of an arbitrary div which is given in its “div” property.
Abstract base class for all Legato control classes