Merge pull request #2596 from elemoine/apistable-coordinate
Add @api stable annotations for ol.coordinate
This commit is contained in:
@@ -10,7 +10,7 @@ goog.require('goog.math');
|
||||
* `{string}`.
|
||||
*
|
||||
* @typedef {function((ol.Coordinate|undefined)): string}
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.CoordinateFormatType;
|
||||
|
||||
@@ -18,7 +18,7 @@ ol.CoordinateFormatType;
|
||||
/**
|
||||
* An array of numbers representing an xy coordinate. Example: `[16, 48]`.
|
||||
* @typedef {Array.<number>} ol.Coordinate
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.Coordinate;
|
||||
|
||||
@@ -36,7 +36,7 @@ ol.Coordinate;
|
||||
* @param {ol.Coordinate} coordinate Coordinate.
|
||||
* @param {ol.Coordinate} delta Delta.
|
||||
* @return {ol.Coordinate} The input coordinate adjusted by the given delta.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.coordinate.add = function(coordinate, delta) {
|
||||
coordinate[0] += delta[0];
|
||||
@@ -105,7 +105,7 @@ ol.coordinate.closestOnSegment = function(coordinate, segment) {
|
||||
* @param {number=} opt_fractionDigits The number of digits to include
|
||||
* after the decimal point. Default is `0`.
|
||||
* @return {ol.CoordinateFormatType} Coordinate format.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.coordinate.createStringXY = function(opt_fractionDigits) {
|
||||
return (
|
||||
@@ -160,7 +160,7 @@ ol.coordinate.degreesToStringHDMS_ = function(degrees, hemispheres) {
|
||||
* @param {number=} opt_fractionDigits The number of digits to include
|
||||
* after the decimal point. Default is `0`.
|
||||
* @return {string} Formated coordinate.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.coordinate.format = function(coordinate, template, opt_fractionDigits) {
|
||||
if (goog.isDef(coordinate)) {
|
||||
@@ -204,7 +204,7 @@ ol.coordinate.equals = function(coordinate1, coordinate2) {
|
||||
* @param {ol.Coordinate} coordinate Coordinate.
|
||||
* @param {number} angle Angle in radian.
|
||||
* @return {ol.Coordinate} Coordinate.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.coordinate.rotate = function(coordinate, angle) {
|
||||
var cosAngle = Math.cos(angle);
|
||||
@@ -288,7 +288,7 @@ ol.coordinate.squaredDistanceToSegment = function(coordinate, segment) {
|
||||
*
|
||||
* @param {ol.Coordinate|undefined} coordinate Coordinate.
|
||||
* @return {string} Hemisphere, degrees, minutes and seconds.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.coordinate.toStringHDMS = function(coordinate) {
|
||||
if (goog.isDef(coordinate)) {
|
||||
@@ -317,7 +317,7 @@ ol.coordinate.toStringHDMS = function(coordinate) {
|
||||
* @param {number=} opt_fractionDigits The number of digits to include
|
||||
* after the decimal point. Default is `0`.
|
||||
* @return {string} XY.
|
||||
* @api
|
||||
* @api stable
|
||||
*/
|
||||
ol.coordinate.toStringXY = function(coordinate, opt_fractionDigits) {
|
||||
return ol.coordinate.format(coordinate, '{x}, {y}', opt_fractionDigits);
|
||||
@@ -338,7 +338,6 @@ ol.coordinate.toStringXY = function(coordinate, opt_fractionDigits) {
|
||||
* @param {Array} array The array with coordinates.
|
||||
* @param {string} axis the axis info.
|
||||
* @return {ol.Coordinate} The coordinate created.
|
||||
* @api
|
||||
*/
|
||||
ol.coordinate.fromProjectedArray = function(array, axis) {
|
||||
var firstAxis = axis.charAt(0);
|
||||
|
||||
Reference in New Issue
Block a user