Documenting the featureDx, xOffset and rightOfDateLine member variables.

This commit is contained in:
ahocevar
2011-10-08 12:03:16 -04:00
parent 2cfe6f83c2
commit bb80c893fd
2 changed files with 33 additions and 0 deletions

View File

@@ -73,6 +73,17 @@ OpenLayers.Renderer = OpenLayers.Class({
*/ */
map: null, map: null,
/**
* Property: featureDx
* {Number} Feature offset in x direction. Will be calculated for and
* applied to the current feature while rendering. Looking at the center of
* the feature bounds and the renderer extent, we calculate how many world
* widths the two are away from each other. This value is used to shift the
* feature as close as possible to the center of the current renderer
* extent. This ensures that the feature is visible in the current
* viewport.
*/
/** /**
* Constructor: OpenLayers.Renderer * Constructor: OpenLayers.Renderer
* *

View File

@@ -373,6 +373,28 @@ OpenLayers.Renderer.Elements = OpenLayers.Class(OpenLayers.Renderer, {
*/ */
xmlns: null, xmlns: null,
/**
* Property: xOffset
* {Number} Offset to apply to the renderer viewport translation in x
* direction. If the renderer extent's center is on the right of the
* dateline (i.e. exceeds the world bounds), we shift the viewport to the
* left by one world width. This avoids that features disappear from the
* map viewport. Because our dateline handling logic in other places
* ensures that extents crossing the dateline always have a center
* exceeding the world bounds on the left, we need this offset to make sure
* that the same is true for the renderer extent in pixel space as well.
*/
/**
* Property: rightOfDateLine
* {Boolean} Keeps track of the location of the map extent's center
* relative to the date line. The <setExtent> method compares this value
* (which is the one from the previous <setExtent> call) with the current
* position of the map extent relative to the date line and updates the
* xOffset when the extent's center has moved from one side of the date
* line to the other.
*/
/** /**
* Property: Indexer * Property: Indexer
* {<OpenLayers.ElementIndexer>} An instance of OpenLayers.ElementsIndexer * {<OpenLayers.ElementIndexer>} An instance of OpenLayers.ElementsIndexer