All @api annotations imply stability
This commit is contained in:
@@ -10,7 +10,7 @@ goog.require('ol.extent.Relationship');
|
||||
*
|
||||
* @param {Array.<ol.Coordinate>} coordinates Coordinates.
|
||||
* @return {ol.Extent} Bounding extent.
|
||||
* @api stable
|
||||
* @api
|
||||
*/
|
||||
ol.extent.boundingExtent = function(coordinates) {
|
||||
var extent = ol.extent.createEmpty();
|
||||
@@ -43,7 +43,7 @@ ol.extent.boundingExtentXYs_ = function(xs, ys, opt_extent) {
|
||||
* @param {number} value The amount by which the extent should be buffered.
|
||||
* @param {ol.Extent=} opt_extent Extent.
|
||||
* @return {ol.Extent} Extent.
|
||||
* @api stable
|
||||
* @api
|
||||
*/
|
||||
ol.extent.buffer = function(extent, value, opt_extent) {
|
||||
if (opt_extent) {
|
||||
@@ -115,7 +115,7 @@ ol.extent.closestSquaredDistanceXY = function(extent, x, y) {
|
||||
* @param {ol.Extent} extent Extent.
|
||||
* @param {ol.Coordinate} coordinate Coordinate.
|
||||
* @return {boolean} The coordinate is contained in the extent.
|
||||
* @api stable
|
||||
* @api
|
||||
*/
|
||||
ol.extent.containsCoordinate = function(extent, coordinate) {
|
||||
return ol.extent.containsXY(extent, coordinate[0], coordinate[1]);
|
||||
@@ -132,7 +132,7 @@ ol.extent.containsCoordinate = function(extent, coordinate) {
|
||||
* @param {ol.Extent} extent2 Extent 2.
|
||||
* @return {boolean} The second extent is contained by or on the edge of the
|
||||
* first.
|
||||
* @api stable
|
||||
* @api
|
||||
*/
|
||||
ol.extent.containsExtent = function(extent1, extent2) {
|
||||
return extent1[0] <= extent2[0] && extent2[2] <= extent1[2] &&
|
||||
@@ -147,7 +147,7 @@ ol.extent.containsExtent = function(extent1, extent2) {
|
||||
* @param {number} x X coordinate.
|
||||
* @param {number} y Y coordinate.
|
||||
* @return {boolean} The x, y values are contained in the extent.
|
||||
* @api stable
|
||||
* @api
|
||||
*/
|
||||
ol.extent.containsXY = function(extent, x, y) {
|
||||
return extent[0] <= x && x <= extent[2] && extent[1] <= y && y <= extent[3];
|
||||
@@ -189,7 +189,7 @@ ol.extent.coordinateRelationship = function(extent, coordinate) {
|
||||
/**
|
||||
* Create an empty extent.
|
||||
* @return {ol.Extent} Empty extent.
|
||||
* @api stable
|
||||
* @api
|
||||
*/
|
||||
ol.extent.createEmpty = function() {
|
||||
return [Infinity, Infinity, -Infinity, -Infinity];
|
||||
@@ -283,7 +283,7 @@ ol.extent.createOrUpdateFromRings = function(rings, opt_extent) {
|
||||
* @param {ol.Extent} extent1 Extent 1.
|
||||
* @param {ol.Extent} extent2 Extent 2.
|
||||
* @return {boolean} The two extents are equivalent.
|
||||
* @api stable
|
||||
* @api
|
||||
*/
|
||||
ol.extent.equals = function(extent1, extent2) {
|
||||
return extent1[0] == extent2[0] && extent1[2] == extent2[2] &&
|
||||
@@ -296,7 +296,7 @@ ol.extent.equals = function(extent1, extent2) {
|
||||
* @param {ol.Extent} extent1 The extent to be modified.
|
||||
* @param {ol.Extent} extent2 The extent that will be included in the first.
|
||||
* @return {ol.Extent} A reference to the first (extended) extent.
|
||||
* @api stable
|
||||
* @api
|
||||
*/
|
||||
ol.extent.extend = function(extent1, extent2) {
|
||||
if (extent2[0] < extent1[0]) {
|
||||
@@ -442,7 +442,7 @@ ol.extent.getArea = function(extent) {
|
||||
* Get the bottom left coordinate of an extent.
|
||||
* @param {ol.Extent} extent Extent.
|
||||
* @return {ol.Coordinate} Bottom left coordinate.
|
||||
* @api stable
|
||||
* @api
|
||||
*/
|
||||
ol.extent.getBottomLeft = function(extent) {
|
||||
return [extent[0], extent[1]];
|
||||
@@ -453,7 +453,7 @@ ol.extent.getBottomLeft = function(extent) {
|
||||
* Get the bottom right coordinate of an extent.
|
||||
* @param {ol.Extent} extent Extent.
|
||||
* @return {ol.Coordinate} Bottom right coordinate.
|
||||
* @api stable
|
||||
* @api
|
||||
*/
|
||||
ol.extent.getBottomRight = function(extent) {
|
||||
return [extent[2], extent[1]];
|
||||
@@ -464,7 +464,7 @@ ol.extent.getBottomRight = function(extent) {
|
||||
* Get the center coordinate of an extent.
|
||||
* @param {ol.Extent} extent Extent.
|
||||
* @return {ol.Coordinate} Center.
|
||||
* @api stable
|
||||
* @api
|
||||
*/
|
||||
ol.extent.getCenter = function(extent) {
|
||||
return [(extent[0] + extent[2]) / 2, (extent[1] + extent[3]) / 2];
|
||||
@@ -546,7 +546,7 @@ ol.extent.getForViewAndSize = function(center, resolution, rotation, size, opt_e
|
||||
* Get the height of an extent.
|
||||
* @param {ol.Extent} extent Extent.
|
||||
* @return {number} Height.
|
||||
* @api stable
|
||||
* @api
|
||||
*/
|
||||
ol.extent.getHeight = function(extent) {
|
||||
return extent[3] - extent[1];
|
||||
@@ -570,7 +570,7 @@ ol.extent.getIntersectionArea = function(extent1, extent2) {
|
||||
* @param {ol.Extent} extent2 Extent 2.
|
||||
* @param {ol.Extent=} opt_extent Optional extent to populate with intersection.
|
||||
* @return {ol.Extent} Intersecting extent.
|
||||
* @api stable
|
||||
* @api
|
||||
*/
|
||||
ol.extent.getIntersection = function(extent1, extent2, opt_extent) {
|
||||
var intersection = opt_extent ? opt_extent : ol.extent.createEmpty();
|
||||
@@ -613,7 +613,7 @@ ol.extent.getMargin = function(extent) {
|
||||
* Get the size (width, height) of an extent.
|
||||
* @param {ol.Extent} extent The extent.
|
||||
* @return {ol.Size} The extent size.
|
||||
* @api stable
|
||||
* @api
|
||||
*/
|
||||
ol.extent.getSize = function(extent) {
|
||||
return [extent[2] - extent[0], extent[3] - extent[1]];
|
||||
@@ -624,7 +624,7 @@ ol.extent.getSize = function(extent) {
|
||||
* Get the top left coordinate of an extent.
|
||||
* @param {ol.Extent} extent Extent.
|
||||
* @return {ol.Coordinate} Top left coordinate.
|
||||
* @api stable
|
||||
* @api
|
||||
*/
|
||||
ol.extent.getTopLeft = function(extent) {
|
||||
return [extent[0], extent[3]];
|
||||
@@ -635,7 +635,7 @@ ol.extent.getTopLeft = function(extent) {
|
||||
* Get the top right coordinate of an extent.
|
||||
* @param {ol.Extent} extent Extent.
|
||||
* @return {ol.Coordinate} Top right coordinate.
|
||||
* @api stable
|
||||
* @api
|
||||
*/
|
||||
ol.extent.getTopRight = function(extent) {
|
||||
return [extent[2], extent[3]];
|
||||
@@ -646,7 +646,7 @@ ol.extent.getTopRight = function(extent) {
|
||||
* Get the width of an extent.
|
||||
* @param {ol.Extent} extent Extent.
|
||||
* @return {number} Width.
|
||||
* @api stable
|
||||
* @api
|
||||
*/
|
||||
ol.extent.getWidth = function(extent) {
|
||||
return extent[2] - extent[0];
|
||||
@@ -658,7 +658,7 @@ ol.extent.getWidth = function(extent) {
|
||||
* @param {ol.Extent} extent1 Extent 1.
|
||||
* @param {ol.Extent} extent2 Extent.
|
||||
* @return {boolean} The two extents intersect.
|
||||
* @api stable
|
||||
* @api
|
||||
*/
|
||||
ol.extent.intersects = function(extent1, extent2) {
|
||||
return extent1[0] <= extent2[2] &&
|
||||
@@ -672,7 +672,7 @@ ol.extent.intersects = function(extent1, extent2) {
|
||||
* Determine if an extent is empty.
|
||||
* @param {ol.Extent} extent Extent.
|
||||
* @return {boolean} Is empty.
|
||||
* @api stable
|
||||
* @api
|
||||
*/
|
||||
ol.extent.isEmpty = function(extent) {
|
||||
return extent[2] < extent[0] || extent[3] < extent[1];
|
||||
@@ -774,7 +774,7 @@ ol.extent.intersectsSegment = function(extent, start, end) {
|
||||
* [minX, minY, maxX, maxY] extent coordinates.
|
||||
* @param {ol.Extent=} opt_extent Destination extent.
|
||||
* @return {ol.Extent} Extent.
|
||||
* @api stable
|
||||
* @api
|
||||
*/
|
||||
ol.extent.applyTransform = function(extent, transformFn, opt_extent) {
|
||||
var coordinates = [
|
||||
|
||||
Reference in New Issue
Block a user