Add @api stable annotations to ol.proj

This commit is contained in:
Éric Lemoine
2014-08-25 10:09:54 +02:00
parent cd4063b0d8
commit cc4d793c64
2 changed files with 21 additions and 21 deletions

View File

@@ -386,7 +386,7 @@ olx.ProjectionOptions;
/** /**
* The SRS identifier code, e.g. `EPSG:4326`. * The SRS identifier code, e.g. `EPSG:4326`.
* @type {string} * @type {string}
* @api * @api stable
*/ */
olx.ProjectionOptions.prototype.code; olx.ProjectionOptions.prototype.code;
@@ -394,7 +394,7 @@ olx.ProjectionOptions.prototype.code;
/** /**
* Units. * Units.
* @type {ol.proj.Units|string} * @type {ol.proj.Units|string}
* @api * @api stable
*/ */
olx.ProjectionOptions.prototype.units; olx.ProjectionOptions.prototype.units;
@@ -402,7 +402,7 @@ olx.ProjectionOptions.prototype.units;
/** /**
* The validity extent for the SRS. * The validity extent for the SRS.
* @type {ol.Extent|undefined} * @type {ol.Extent|undefined}
* @api * @api stable
*/ */
olx.ProjectionOptions.prototype.extent; olx.ProjectionOptions.prototype.extent;
@@ -410,7 +410,7 @@ olx.ProjectionOptions.prototype.extent;
/** /**
* The axis orientation as specified in Proj4. The default is `enu`. * The axis orientation as specified in Proj4. The default is `enu`.
* @type {string|undefined} * @type {string|undefined}
* @api * @api stable
*/ */
olx.ProjectionOptions.prototype.axisOrientation; olx.ProjectionOptions.prototype.axisOrientation;
@@ -418,7 +418,7 @@ olx.ProjectionOptions.prototype.axisOrientation;
/** /**
* Whether the projection is valid for the whole globe. Default is `false`. * Whether the projection is valid for the whole globe. Default is `false`.
* @type {boolean|undefined} * @type {boolean|undefined}
* @api * @api stable
*/ */
olx.ProjectionOptions.prototype.global; olx.ProjectionOptions.prototype.global;

View File

@@ -18,7 +18,7 @@ goog.require('ol.sphere.NORMAL');
* A projection as {@link ol.proj.Projection}, SRS identifier string or * A projection as {@link ol.proj.Projection}, SRS identifier string or
* undefined. * undefined.
* @typedef {ol.proj.Projection|string|undefined} ol.proj.ProjectionLike * @typedef {ol.proj.Projection|string|undefined} ol.proj.ProjectionLike
* @api * @api stable
*/ */
ol.proj.ProjectionLike; ol.proj.ProjectionLike;
@@ -26,7 +26,7 @@ ol.proj.ProjectionLike;
/** /**
* Projection units: `'degrees'`, `'ft'`, `'m'` or `'pixels'`. * Projection units: `'degrees'`, `'ft'`, `'m'` or `'pixels'`.
* @enum {string} * @enum {string}
* @api * @api stable
*/ */
ol.proj.Units = { ol.proj.Units = {
DEGREES: 'degrees', DEGREES: 'degrees',
@@ -40,7 +40,7 @@ ol.proj.Units = {
* Meters per unit lookup table. * Meters per unit lookup table.
* @const * @const
* @type {Object.<ol.proj.Units, number>} * @type {Object.<ol.proj.Units, number>}
* @api * @api stable
*/ */
ol.proj.METERS_PER_UNIT = {}; ol.proj.METERS_PER_UNIT = {};
ol.proj.METERS_PER_UNIT[ol.proj.Units.DEGREES] = ol.proj.METERS_PER_UNIT[ol.proj.Units.DEGREES] =
@@ -77,7 +77,7 @@ ol.proj.METERS_PER_UNIT[ol.proj.Units.METERS] = 1;
* @constructor * @constructor
* @param {olx.ProjectionOptions} options Projection options. * @param {olx.ProjectionOptions} options Projection options.
* @struct * @struct
* @api * @api stable
*/ */
ol.proj.Projection = function(options) { ol.proj.Projection = function(options) {
@@ -131,7 +131,7 @@ ol.proj.Projection = function(options) {
/** /**
* Get the code for this projection, e.g. 'EPSG:4326'. * Get the code for this projection, e.g. 'EPSG:4326'.
* @return {string} Code. * @return {string} Code.
* @api * @api stable
*/ */
ol.proj.Projection.prototype.getCode = function() { ol.proj.Projection.prototype.getCode = function() {
return this.code_; return this.code_;
@@ -141,7 +141,7 @@ ol.proj.Projection.prototype.getCode = function() {
/** /**
* Get the validity extent for this projection. * Get the validity extent for this projection.
* @return {ol.Extent} Extent. * @return {ol.Extent} Extent.
* @api * @api stable
*/ */
ol.proj.Projection.prototype.getExtent = function() { ol.proj.Projection.prototype.getExtent = function() {
return this.extent_; return this.extent_;
@@ -151,7 +151,7 @@ ol.proj.Projection.prototype.getExtent = function() {
/** /**
* Get the units of this projection. * Get the units of this projection.
* @return {ol.proj.Units} Units. * @return {ol.proj.Units} Units.
* @api * @api stable
*/ */
ol.proj.Projection.prototype.getUnits = function() { ol.proj.Projection.prototype.getUnits = function() {
return this.units_; return this.units_;
@@ -162,7 +162,7 @@ ol.proj.Projection.prototype.getUnits = function() {
* Get the amount of meters per unit of this projection. If the projection is * Get the amount of meters per unit of this projection. If the projection is
* not configured with a units identifier, the return is `undefined`. * not configured with a units identifier, the return is `undefined`.
* @return {number|undefined} Meters. * @return {number|undefined} Meters.
* @api * @api stable
*/ */
ol.proj.Projection.prototype.getMetersPerUnit = function() { ol.proj.Projection.prototype.getMetersPerUnit = function() {
return ol.proj.METERS_PER_UNIT[this.units_]; return ol.proj.METERS_PER_UNIT[this.units_];
@@ -197,7 +197,7 @@ ol.proj.Projection.prototype.getAxisOrientation = function() {
/** /**
* Is this projection a global projection which spans the whole world? * Is this projection a global projection which spans the whole world?
* @return {boolean} Wether the projection is global. * @return {boolean} Wether the projection is global.
* @api * @api stable
*/ */
ol.proj.Projection.prototype.isGlobal = function() { ol.proj.Projection.prototype.isGlobal = function() {
return this.global_; return this.global_;
@@ -223,7 +223,7 @@ ol.proj.Projection.prototype.setDefaultTileGrid = function(tileGrid) {
/** /**
* Set the validity extent for this projection. * Set the validity extent for this projection.
* @param {ol.Extent} extent Extent. * @param {ol.Extent} extent Extent.
* @api * @api stable
*/ */
ol.proj.Projection.prototype.setExtent = function(extent) { ol.proj.Projection.prototype.setExtent = function(extent) {
this.extent_ = extent; this.extent_ = extent;
@@ -343,7 +343,7 @@ ol.proj.addEquivalentTransforms =
* Add a Projection object to the list of supported projections. * Add a Projection object to the list of supported projections.
* *
* @param {ol.proj.Projection} projection Projection instance. * @param {ol.proj.Projection} projection Projection instance.
* @api * @api stable
*/ */
ol.proj.addProjection = function(projection) { ol.proj.addProjection = function(projection) {
ol.proj.projections_[projection.getCode()] = projection; ol.proj.projections_[projection.getCode()] = projection;
@@ -424,7 +424,7 @@ ol.proj.addTransform = function(source, destination, transformFn) {
* function (that is, from the destination projection to the source * function (that is, from the destination projection to the source
* projection) that takes a {@link ol.Coordinate} as argument and returns * projection) that takes a {@link ol.Coordinate} as argument and returns
* the transformed {@link ol.Coordinate}. * the transformed {@link ol.Coordinate}.
* @api * @api stable
*/ */
ol.proj.addCoordinateTransforms = ol.proj.addCoordinateTransforms =
function(source, destination, forward, inverse) { function(source, destination, forward, inverse) {
@@ -502,7 +502,7 @@ ol.proj.removeTransform = function(source, destination) {
* a combination of authority and identifier such as "EPSG:4326", or an * a combination of authority and identifier such as "EPSG:4326", or an
* existing projection object, or undefined. * existing projection object, or undefined.
* @return {ol.proj.Projection} Projection object, or null if not in list. * @return {ol.proj.Projection} Projection object, or null if not in list.
* @api * @api stable
*/ */
ol.proj.get = function(projectionLike) { ol.proj.get = function(projectionLike) {
var projection; var projection;
@@ -585,7 +585,7 @@ ol.proj.equivalent = function(projection1, projection2) {
* @param {ol.proj.ProjectionLike} source Source. * @param {ol.proj.ProjectionLike} source Source.
* @param {ol.proj.ProjectionLike} destination Destination. * @param {ol.proj.ProjectionLike} destination Destination.
* @return {ol.TransformFunction} Transform function. * @return {ol.TransformFunction} Transform function.
* @api * @api stable
*/ */
ol.proj.getTransform = function(source, destination) { ol.proj.getTransform = function(source, destination) {
var sourceProjection = ol.proj.get(source); var sourceProjection = ol.proj.get(source);
@@ -674,7 +674,7 @@ ol.proj.cloneTransform = function(input, opt_output, opt_dimension) {
* @param {ol.proj.ProjectionLike} source Source projection-like. * @param {ol.proj.ProjectionLike} source Source projection-like.
* @param {ol.proj.ProjectionLike} destination Destination projection-like. * @param {ol.proj.ProjectionLike} destination Destination projection-like.
* @return {ol.Coordinate} Coordinate. * @return {ol.Coordinate} Coordinate.
* @api * @api stable
*/ */
ol.proj.transform = function(coordinate, source, destination) { ol.proj.transform = function(coordinate, source, destination) {
var transformFn = ol.proj.getTransform(source, destination); var transformFn = ol.proj.getTransform(source, destination);
@@ -690,7 +690,7 @@ ol.proj.transform = function(coordinate, source, destination) {
* @param {ol.proj.ProjectionLike} source Source projection-like. * @param {ol.proj.ProjectionLike} source Source projection-like.
* @param {ol.proj.ProjectionLike} destination Destination projection-like. * @param {ol.proj.ProjectionLike} destination Destination projection-like.
* @return {ol.Extent} The transformed extent. * @return {ol.Extent} The transformed extent.
* @api * @api stable
*/ */
ol.proj.transformExtent = function(extent, source, destination) { ol.proj.transformExtent = function(extent, source, destination) {
var transformFn = ol.proj.getTransform(source, destination); var transformFn = ol.proj.getTransform(source, destination);