From 98b494e2d632135e11b41de05a8b51e840fc9e44 Mon Sep 17 00:00:00 2001 From: crschmidt Date: Sat, 18 Nov 2006 22:55:34 +0000 Subject: [PATCH] Commit patches to documentation, from tickets #411 and #412 , from penyaskito. (Thanks!) git-svn-id: http://svn.openlayers.org/trunk/openlayers/doc@1912 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf --- Control.OverviewMap.txt | 38 ++++++++++++++++++++++++++++++++++++++ Control.PanZoomBar.txt | 2 +- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 Control.OverviewMap.txt diff --git a/Control.OverviewMap.txt b/Control.OverviewMap.txt new file mode 100644 index 0000000000..9d2ed688ed --- /dev/null +++ b/Control.OverviewMap.txt @@ -0,0 +1,38 @@ +OpenLayers.Control.OverviewMap + +This control provides a locator or overview map linked to another map. By default, the overview map shows up in the lower right of the main map and can be expdaned with the '+' button. + +* Constructor + OpenLayers.Control.OverviewMap(opts?) -- Creates a new overview map. The opts variable is an object with various options, as described in the options section below. + +* Methods +isSuitableOverview() -- {Boolean} -- Determines if the overview map is suitable given the extent and resolution of the main map. +getRectPxBounds() -- {OpenLayers.Bounds|bounds} -- An OpenLayers.Bounds which is the extent rectangle's pixel bounds (relative to the parent element). +setRectPxBounds({OpenLayers.Bounds|bounds}) -- none -- Set extent rectangle pixel bounds. +getRectBoundsFromMapBounds({OpenLayers.Bounds|lonLatBounds}) -- {OpenLayers.Bounds|bounds} -- An OpenLayers.Bounds which is the passed-in map lon/lat extent translated into pixel bounds for the overview map. +getMapBoundsFromRectBounds({OpenLayers.Bounds|pxBounds]}) -- {OpenLayers.Bounds|bounds} -- An OpenLayers.Bounds which is the passed-in overview rect bounds translated into lon/lat bounds for the overview map. +getLonLatFromOverviewPx({OpenLayers.Pixel|pixel}) -- {OpenLayers.LonLat|lonlat} -- An OpenLayers.LonLat which is the passed-in overview map OpenLayers.Pixel translated into lon/lat by the overview map. +getOverviewPxFromLonLat({OpenLayers.LonLat|lonlat}) -- {OpenLayers.Pixel|pixel} -- An OpenLayers.Pixel which is the passed-in OpenLayers.LonLat, translated into overview map pixels + + +* Events + * Rectangle events +They are defined on OverviewMap.rectEvents + + mouseover -- rectangle is moused over + mouseout -- rectangle is no longer mousedout + mousemove -- mouse moves inside rectangle + mousedown -- mouse button is pressed over the rectangle. + mouseup -- mouse button is released over the rectangle. + click -- mouse clicked + dblclick -- mouse double clicked + + * Map events + They are defined on OverviewMap.mapDivEvents + + click -- mouse clicked + +* Options: + * minRatio -- The ratio of the overview map resolution to the main map resolution at which to zoom farther out on the overview map. + * maxRatio -- The ratio of the overview map resolution to the main map resolution at which to zoom farther in on the overview map. + * layers -- Ordered list of layers in the overview map. If none, then the map base layer is used. diff --git a/Control.PanZoomBar.txt b/Control.PanZoomBar.txt index 29b8023bcd..a244c205f2 100644 --- a/Control.PanZoomBar.txt +++ b/Control.PanZoomBar.txt @@ -1,4 +1,4 @@ -OpenLayers.Control.PanZoom +OpenLayers.Control.PanZoomBar Creates a small toolset for controlling the location of the map with panning and zooming, including four directional arrows, a zoom in and zoom out, and a bar on which a slider can be moved to zoom in or out by multiple stops at once.