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