OpenLayers JavaScript Mapping Library |
OpenLayers. Control. OverviewMapCreate an overview map to display the extent of your main map and provide additional navigation control. Create a new overview map with the OpenLayers.Control.OverviewMap constructor. Inerits fromSummary
ovmap{OpenLayers.Map} A reference to the overvew map itself. size{OpenLayers.Size} The overvew map size in pixels. Note that this is the size of the map itself - the element that contains the map (default class name olControlOverviewMapElement) may have padding or other style attributes added via CSS. layers{Array(OpenLayers.Layer)} Ordered list of layers in the overview map. If none are sent at construction, the base layer for the main map is used. OpenLayers. Control. OverviewMapCreate a new overview map Parameters
maximizeControl
Unhide the control. Called when the control is in the map viewport. Parameters
minimizeControl
Hide all the contents of the control, shrink the size, add the maximize icon Parameters
getRectPxBounds
Get extent rectangle pixel bounds Returns{OpenLayers.Bounds} A bounds which is the extent rectangle’s pixel bounds (relative to the parent element) setRectPxBounds
Set extent rectangle pixel bounds. Parameters
getRectBoundsFromMapBounds
Get the rect bounds from the map bounds. Parameters
Returns{OpenLayers.Bounds}A bounds which is the passed-in map lon/lat extent translated into pixel bounds for the overview map getMapBoundsFromRectBounds
Get the map bounds from the rect bounds. Parameters
Returns{OpenLayers.Bounds} Bounds which is the passed-in overview rect bounds translated into lon/lat bounds for the overview map getLonLatFromOverviewPx
Get a map location from a pixel location Parameters
Returns{OpenLayers.LonLat} Location which is the passed-in overview map OpenLayers.Pixel, translated into lon/lat by the overview map getOverviewPxFromLonLat
Get a pixel location from a map location Parameters
Returns{OpenLayers.Pixel} Location which is the passed-in OpenLayers.LonLat, translated into overview map pixels |
Deconstruct the control
destroy: function()
Render the control in the browser.
draw: function()
baseLayerDraw: function()
Handle browser events
rectMouseOut: function ( evt )
Handle browser events
rectMouseDown: function ( evt )
Handle browser events
rectMouseMove: function( evt )
Handle browser events
rectMouseUp: function( evt )
Handle browser events
rectDblClick: function( evt )
Handle browser events
mapDivClick: function( evt )
Unhide the control.
maximizeControl: function( e )
Hide all the contents of the control, shrink the size, add the maximize icon
minimizeControl: function( e )
Hide/Show the toggle depending on whether the control is minimized
showToggle: function( minimize )
Update the overview map after layers move.
update: function()
Determines if the overview map is suitable given the extent and resolution of the main map.
isSuitableOverview: function()
Construct the map that this control contains
createMap: function()
Updates the extent rectangle position and size to match the map extent
updateRectToMap: function()
Updates the map extent to match the extent rectangle position and size
updateMapToRect: function()
Get extent rectangle pixel bounds
getRectPxBounds: function()
Set extent rectangle pixel bounds.
setRectPxBounds: function( pxBounds )
Get the rect bounds from the map bounds.
getRectBoundsFromMapBounds: function( lonLatBounds )
Get the map bounds from the rect bounds.
getMapBoundsFromRectBounds: function( pxBounds )
Get a map location from a pixel location
getLonLatFromOverviewPx: function( overviewMapPx )
Get a pixel location from a map location
getOverviewPxFromLonLat: function( lonlat )