Improve docs for getPointResolution functions

This commit is contained in:
Peter Robins
2017-06-08 17:00:00 +01:00
parent 9691130b83
commit f97f370e5b
3 changed files with 10 additions and 3 deletions

View File

@@ -44,9 +44,14 @@ if (ol.ENABLE_PROJ4JS) {
* Get the resolution of the point in degrees or distance units.
* For projections with degrees as the unit this will simply return the
* provided resolution. For other projections the point resolution is
* estimated by transforming the 'point' pixel to EPSG:4326,
* by default estimated by transforming the 'point' pixel to EPSG:4326,
* measuring its width and height on the normal sphere,
* and taking the average of the width and height.
* A custom function can be provided for a specific projection, either
* by setting the `getPointResolution` option in the
* {@link ol.proj.Projection} constructor or by using
* {@link ol.proj.Projection#setGetPointResolution} to change an existing
* projection object.
* @param {ol.proj.Projection} projection The projection.
* @param {number} resolution Nominal resolution in projection units.
* @param {ol.Coordinate} point Point to find adjusted resolution at.

View File

@@ -254,7 +254,8 @@ ol.proj.Projection.prototype.setWorldExtent = function(worldExtent) {
/**
* Set the getPointResolution function for this projection.
* Set the getPointResolution function (see {@link ol.proj#getPointResolution}
* for this projection.
* @param {function(number, ol.Coordinate):number} func Function
* @api
*/