Improvements for projection docs

This commit is contained in:
Peter Robins
2012-03-27 12:13:23 +01:00
committed by Frederic Junod
parent eb74d93d48
commit 720a815479
3 changed files with 29 additions and 12 deletions

View File

@@ -191,18 +191,32 @@ OpenLayers.Layer = OpenLayers.Class({
/**
* APIProperty: projection
* {<OpenLayers.Projection>} or {<String>} Set in the layer options to
* override the default projection string this layer - also set maxExtent,
* maxResolution, and units if appropriate. Can be either a string or
* an <OpenLayers.Projection> object when created -- will be converted
* to an object when setMap is called if a string is passed.
* {<OpenLayers.Projection>} or {<String>} Specifies the projection of the layer.
* Can be set in the layer options. If not specified in the layer options,
* it is set to the default projection specified in the map,
* when the layer is added to the map.
* Projection along with default maxExtent and resolutions
* are set automatically with commercial baselayers in EPSG:3857,
* such as Google, Bing and OpenStreetMap, and do not need to be specified.
* Otherwise, if specifying projection, also set maxExtent,
* maxResolution or resolutions as appropriate.
* When using vector layers with strategies, layer projection should be set
* to the projection of the source data if that is different from the map default.
*
* Can be either a string or an <OpenLayers.Projection> object;
* if a string is passed, will be converted to an object when
* the layer is added to the map.
*
*/
projection: null,
/**
* APIProperty: units
* {String} The layer map units. Defaults to 'degrees'. Possible values
* {String} The layer map units. Defaults to null. Possible values
* are 'degrees' (or 'dd'), 'm', 'ft', 'km', 'mi', 'inches'.
* Normally taken from the projection.
* Only required if both map and layers do not define a projection,
* or if they define a projection which does not define units.
*/
units: null,