From 239a90cd557abd47b6e28befe37b028242dcdd5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Tue, 19 Aug 2014 17:02:25 +0200 Subject: [PATCH 01/18] Add @api stable annotations for ol.Feature --- src/ol/feature.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/ol/feature.js b/src/ol/feature.js index 0ad334338f..2a08a89bfc 100644 --- a/src/ol/feature.js +++ b/src/ol/feature.js @@ -55,7 +55,7 @@ goog.require('ol.style.Style'); * You may pass a Geometry object directly, or an object literal * containing properties. If you pass an object literal, you may * include a Geometry associated with a `geometry` key. - * @api + * @api stable */ ol.Feature = function(opt_geometryOrProperties) { @@ -117,7 +117,7 @@ goog.inherits(ol.Feature, ol.Object); * Clone this feature. If the original feature has a geometry it * is also cloned. The feature id is not set in the clone. * @return {ol.Feature} The clone. - * @api + * @api stable */ ol.Feature.prototype.clone = function() { var clone = new ol.Feature(this.getProperties()); @@ -139,7 +139,7 @@ ol.Feature.prototype.clone = function() { * with this feature using the current geometry name property. By * default, this is `geometry` but it may be changed by calling * `setGeometryName`. - * @api + * @api stable * @observable */ ol.Feature.prototype.getGeometry = function() { @@ -154,7 +154,7 @@ goog.exportProperty( /** * @return {number|string|undefined} Id. - * @api + * @api stable */ ol.Feature.prototype.getId = function() { return this.id_; @@ -165,7 +165,7 @@ ol.Feature.prototype.getId = function() { * @return {string} Get the property name associated with the geometry for * this feature. By default, this is `geometry` but it may be changed by * calling `setGeometryName`. - * @api + * @api stable */ ol.Feature.prototype.getGeometryName = function() { return this.geometryName_; @@ -177,7 +177,7 @@ ol.Feature.prototype.getGeometryName = function() { * ol.feature.FeatureStyleFunction} Return the style as set by setStyle in * the same format that it was provided in. If setStyle has not been run, * return `undefined`. - * @api + * @api stable */ ol.Feature.prototype.getStyle = function() { return this.style_; @@ -187,7 +187,7 @@ ol.Feature.prototype.getStyle = function() { /** * @return {ol.feature.FeatureStyleFunction|undefined} Return a function * representing the current style of this feature. - * @api + * @api stable */ ol.Feature.prototype.getStyleFunction = function() { return this.styleFunction_; @@ -224,7 +224,7 @@ ol.Feature.prototype.handleGeometryChanged_ = function() { * feature. This will update the property associated with the current * geometry property name. By default, this is `geometry` but it can be * changed by calling `setGeometryName`. - * @api + * @api stable * @observable */ ol.Feature.prototype.setGeometry = function(geometry) { @@ -239,7 +239,7 @@ goog.exportProperty( /** * @param {ol.style.Style|Array.| * ol.feature.FeatureStyleFunction} style Set the style for this feature. - * @api + * @api stable */ ol.Feature.prototype.setStyle = function(style) { this.style_ = style; @@ -252,7 +252,7 @@ ol.Feature.prototype.setStyle = function(style) { * @param {number|string|undefined} id Set a unique id for this feature. * The id may be used to retrieve a feature from a vector source with the * {@link ol.source.Vector#getFeatureById} method. - * @api + * @api stable */ ol.Feature.prototype.setId = function(id) { this.id_ = id; @@ -263,7 +263,7 @@ ol.Feature.prototype.setId = function(id) { /** * @param {string} name Set the property name from which this feature's * geometry will be fetched when calling `getGeometry`. - * @api + * @api stable */ ol.Feature.prototype.setGeometryName = function(name) { goog.events.unlisten( @@ -284,7 +284,7 @@ ol.Feature.prototype.setGeometryName = function(name) { * {@link ol.Feature} to be styled. * * @typedef {function(this: ol.Feature, number): Array.} - * @api + * @api stable */ ol.feature.FeatureStyleFunction; From 9b0ce7b80ca833a6919445ceebf2d1cdfe8e97f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Tue, 19 Aug 2014 17:04:05 +0200 Subject: [PATCH 02/18] Add @api stable annotations for ol.geom.Geometry --- src/ol/geom/geometry.js | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/src/ol/geom/geometry.js b/src/ol/geom/geometry.js index 743fb62951..70e8a1882a 100644 --- a/src/ol/geom/geometry.js +++ b/src/ol/geom/geometry.js @@ -12,7 +12,7 @@ goog.require('ol.proj'); * `'Polygon'`, `'MultiPoint'`, `'MultiLineString'`, `'MultiPolygon'`, * `'GeometryCollection'`, `'Circle'`. * @enum {string} - * @api + * @api stable */ ol.geom.GeometryType = { POINT: 'Point', @@ -32,7 +32,7 @@ ol.geom.GeometryType = { * or measure ('M') coordinate is available. Supported values are `'XY'`, * `'XYZ'`, `'XYM'`, `'XYZM'`. * @enum {string} - * @api + * @api stable */ ol.geom.GeometryLayout = { XY: 'XY', @@ -52,7 +52,7 @@ ol.geom.GeometryLayout = { * @constructor * @extends {ol.Observable} * @fires change Triggered when the geometry changes. - * @api + * @api stable */ ol.geom.Geometry = function() { @@ -96,7 +96,7 @@ goog.inherits(ol.geom.Geometry, ol.Observable); * Make a complete copy of the geometry. * @function * @return {ol.geom.Geometry} Clone. - * @api + * @api stable */ ol.geom.Geometry.prototype.clone = goog.abstractMethod; @@ -115,7 +115,7 @@ ol.geom.Geometry.prototype.closestPointXY = goog.abstractMethod; * @param {ol.Coordinate} point Point. * @param {ol.Coordinate=} opt_closestPoint Closest point. * @return {ol.Coordinate} Closest point. - * @api + * @api stable */ ol.geom.Geometry.prototype.getClosestPoint = function(point, opt_closestPoint) { var closestPoint = goog.isDef(opt_closestPoint) ? @@ -147,7 +147,7 @@ ol.geom.Geometry.prototype.containsXY = goog.functions.FALSE; * @function * @param {ol.Extent=} opt_extent Extent. * @return {ol.Extent} extent Extent. - * @api + * @api stable */ ol.geom.Geometry.prototype.getExtent = goog.abstractMethod; @@ -159,7 +159,6 @@ ol.geom.Geometry.prototype.getExtent = goog.abstractMethod; * @function * @param {number} squaredTolerance Squared tolerance. * @return {ol.geom.Geometry} Simplified geometry. - * @api */ ol.geom.Geometry.prototype.getSimplifiedGeometry = goog.abstractMethod; @@ -168,7 +167,7 @@ ol.geom.Geometry.prototype.getSimplifiedGeometry = goog.abstractMethod; * Get the type of this geometry. * @function * @return {ol.geom.GeometryType} Geometry type. - * @api + * @api stable */ ol.geom.Geometry.prototype.getType = goog.abstractMethod; @@ -179,7 +178,7 @@ ol.geom.Geometry.prototype.getType = goog.abstractMethod; * then use this function on the clone. * @function * @param {ol.TransformFunction} transformFn Transform. - * @api + * @api stable */ ol.geom.Geometry.prototype.applyTransform = goog.abstractMethod; @@ -196,7 +195,7 @@ ol.geom.Geometry.prototype.applyTransform = goog.abstractMethod; * string identifier or a {@link ol.proj.Projection} object. * @return {ol.geom.Geometry} This geometry. Note that original geometry is * modified in place. - * @api + * @api stable */ ol.geom.Geometry.prototype.transform = function(source, destination) { this.applyTransform(ol.proj.getTransform(source, destination)); @@ -207,7 +206,7 @@ ol.geom.Geometry.prototype.transform = function(source, destination) { /** * Array representation of a point. Example: `[16, 48]`. * @typedef {ol.Coordinate} - * @api + * @api stable */ ol.geom.RawPoint; @@ -215,7 +214,7 @@ ol.geom.RawPoint; /** * Array representation of a linestring. * @typedef {Array.} - * @api + * @api stable */ ol.geom.RawLineString; @@ -223,7 +222,7 @@ ol.geom.RawLineString; /** * Array representation of a linear ring. * @typedef {Array.} - * @api + * @api stable */ ol.geom.RawLinearRing; @@ -231,7 +230,7 @@ ol.geom.RawLinearRing; /** * Array representation of a polygon. * @typedef {Array.} - * @api + * @api stable */ ol.geom.RawPolygon; @@ -239,7 +238,7 @@ ol.geom.RawPolygon; /** * Array representation of a multipoint. * @typedef {Array.} - * @api + * @api stable */ ol.geom.RawMultiPoint; @@ -247,7 +246,7 @@ ol.geom.RawMultiPoint; /** * Array representation of a multilinestring. * @typedef {Array.} - * @api + * @api stable */ ol.geom.RawMultiLineString; @@ -255,6 +254,6 @@ ol.geom.RawMultiLineString; /** * Array representation of a multipolygon. * @typedef {Array.} - * @api + * @api stable */ ol.geom.RawMultiPolygon; From 5ccb0fae0723ff2ba02caf83663796a889019805 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Tue, 19 Aug 2014 17:05:15 +0200 Subject: [PATCH 03/18] Add @api stable annotations for ol.geom.GeometryCollection --- src/ol/geom/geometrycollection.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/ol/geom/geometrycollection.js b/src/ol/geom/geometrycollection.js index 48b7c080bd..4c4f0631f7 100644 --- a/src/ol/geom/geometrycollection.js +++ b/src/ol/geom/geometrycollection.js @@ -18,7 +18,7 @@ goog.require('ol.geom.GeometryType'); * @constructor * @extends {ol.geom.Geometry} * @param {Array.=} opt_geometries Geometries. - * @api + * @api stable */ ol.geom.GeometryCollection = function(opt_geometries) { @@ -84,7 +84,7 @@ ol.geom.GeometryCollection.prototype.listenGeometriesChange_ = function() { /** * @inheritDoc - * @api + * @api stable */ ol.geom.GeometryCollection.prototype.clone = function() { var geometryCollection = new ol.geom.GeometryCollection(null); @@ -129,7 +129,7 @@ ol.geom.GeometryCollection.prototype.containsXY = function(x, y) { /** * @inheritDoc - * @api + * @api stable */ ol.geom.GeometryCollection.prototype.getExtent = function(opt_extent) { if (this.extentRevision != this.getRevision()) { @@ -149,7 +149,7 @@ ol.geom.GeometryCollection.prototype.getExtent = function(opt_extent) { /** * @return {Array.} Geometries. - * @api + * @api stable */ ol.geom.GeometryCollection.prototype.getGeometries = function() { return ol.geom.GeometryCollection.cloneGeometries_(this.geometries_); @@ -166,7 +166,6 @@ ol.geom.GeometryCollection.prototype.getGeometriesArray = function() { /** * @inheritDoc - * @api */ ol.geom.GeometryCollection.prototype.getSimplifiedGeometry = function(squaredTolerance) { @@ -211,7 +210,7 @@ ol.geom.GeometryCollection.prototype.getSimplifiedGeometry = /** * @inheritDoc - * @api + * @api stable */ ol.geom.GeometryCollection.prototype.getType = function() { return ol.geom.GeometryType.GEOMETRY_COLLECTION; @@ -228,7 +227,7 @@ ol.geom.GeometryCollection.prototype.isEmpty = function() { /** * @param {Array.} geometries Geometries. - * @api + * @api stable */ ol.geom.GeometryCollection.prototype.setGeometries = function(geometries) { this.setGeometriesArray( From 516be9041edc75e348fced5c7249831be1f664e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Tue, 19 Aug 2014 17:05:58 +0200 Subject: [PATCH 04/18] Add @api stable annotations for ol.geom.LinearRing --- src/ol/geom/linearring.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ol/geom/linearring.js b/src/ol/geom/linearring.js index eaf6bb01af..3bbc04b80d 100644 --- a/src/ol/geom/linearring.js +++ b/src/ol/geom/linearring.js @@ -20,7 +20,7 @@ goog.require('ol.geom.flat.simplify'); * @extends {ol.geom.SimpleGeometry} * @param {ol.geom.RawLinearRing} coordinates Coordinates. * @param {ol.geom.GeometryLayout=} opt_layout Layout. - * @api + * @api stable */ ol.geom.LinearRing = function(coordinates, opt_layout) { @@ -47,7 +47,7 @@ goog.inherits(ol.geom.LinearRing, ol.geom.SimpleGeometry); /** * @inheritDoc - * @api + * @api stable */ ol.geom.LinearRing.prototype.clone = function() { var linearRing = new ol.geom.LinearRing(null); @@ -78,7 +78,7 @@ ol.geom.LinearRing.prototype.closestPointXY = /** * @return {number} Area (on projected plane). - * @api + * @api stable */ ol.geom.LinearRing.prototype.getArea = function() { return ol.geom.flat.area.linearRing( @@ -88,7 +88,7 @@ ol.geom.LinearRing.prototype.getArea = function() { /** * @return {ol.geom.RawLinearRing} Coordinates. - * @api + * @api stable */ ol.geom.LinearRing.prototype.getCoordinates = function() { return ol.geom.flat.inflate.coordinates( @@ -114,7 +114,7 @@ ol.geom.LinearRing.prototype.getSimplifiedGeometryInternal = /** * @inheritDoc - * @api + * @api stable */ ol.geom.LinearRing.prototype.getType = function() { return ol.geom.GeometryType.LINEAR_RING; @@ -124,7 +124,7 @@ ol.geom.LinearRing.prototype.getType = function() { /** * @param {ol.geom.RawLinearRing} coordinates Coordinates. * @param {ol.geom.GeometryLayout=} opt_layout Layout. - * @api + * @api stable */ ol.geom.LinearRing.prototype.setCoordinates = function(coordinates, opt_layout) { From 180c6aa7a972f34eddb857673b11ae07b956358a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Tue, 19 Aug 2014 17:06:40 +0200 Subject: [PATCH 05/18] Add @api stable annotations for ol.geom.LineString --- src/ol/geom/linestring.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/ol/geom/linestring.js b/src/ol/geom/linestring.js index b6cf7d4dfa..967de88134 100644 --- a/src/ol/geom/linestring.js +++ b/src/ol/geom/linestring.js @@ -22,7 +22,7 @@ goog.require('ol.geom.flat.simplify'); * @extends {ol.geom.SimpleGeometry} * @param {ol.geom.RawLineString} coordinates Coordinates. * @param {ol.geom.GeometryLayout=} opt_layout Layout. - * @api + * @api stable */ ol.geom.LineString = function(coordinates, opt_layout) { @@ -61,7 +61,7 @@ goog.inherits(ol.geom.LineString, ol.geom.SimpleGeometry); /** * @param {ol.Coordinate} coordinate Coordinate. - * @api + * @api stable */ ol.geom.LineString.prototype.appendCoordinate = function(coordinate) { goog.asserts.assert(coordinate.length == this.stride); @@ -76,7 +76,7 @@ ol.geom.LineString.prototype.appendCoordinate = function(coordinate) { /** * @inheritDoc - * @api + * @api stable */ ol.geom.LineString.prototype.clone = function() { var lineString = new ol.geom.LineString(null); @@ -117,7 +117,7 @@ ol.geom.LineString.prototype.closestPointXY = * @param {number} m M. * @param {boolean=} opt_extrapolate Extrapolate. * @return {ol.Coordinate} Coordinate. - * @api + * @api stable */ ol.geom.LineString.prototype.getCoordinateAtM = function(m, opt_extrapolate) { if (this.layout != ol.geom.GeometryLayout.XYM && @@ -132,7 +132,7 @@ ol.geom.LineString.prototype.getCoordinateAtM = function(m, opt_extrapolate) { /** * @return {ol.geom.RawLineString} Coordinates. - * @api + * @api stable */ ol.geom.LineString.prototype.getCoordinates = function() { return ol.geom.flat.inflate.coordinates( @@ -142,7 +142,7 @@ ol.geom.LineString.prototype.getCoordinates = function() { /** * @return {number} Length (on projected plane). - * @api + * @api stable */ ol.geom.LineString.prototype.getLength = function() { return ol.geom.flat.length.lineString( @@ -182,7 +182,7 @@ ol.geom.LineString.prototype.getSimplifiedGeometryInternal = /** * @inheritDoc - * @api + * @api stable */ ol.geom.LineString.prototype.getType = function() { return ol.geom.GeometryType.LINE_STRING; @@ -192,7 +192,7 @@ ol.geom.LineString.prototype.getType = function() { /** * @param {ol.geom.RawLineString} coordinates Coordinates. * @param {ol.geom.GeometryLayout=} opt_layout Layout. - * @api + * @api stable */ ol.geom.LineString.prototype.setCoordinates = function(coordinates, opt_layout) { From ce7fda71afd94ffcc6f562fad2ea9611801bbbd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Tue, 19 Aug 2014 17:07:23 +0200 Subject: [PATCH 06/18] Add @api stable annotations for ol.geom.MultiLineString --- src/ol/geom/multilinestring.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/ol/geom/multilinestring.js b/src/ol/geom/multilinestring.js index b2b92830a6..138d233cb0 100644 --- a/src/ol/geom/multilinestring.js +++ b/src/ol/geom/multilinestring.js @@ -22,7 +22,7 @@ goog.require('ol.geom.flat.simplify'); * @extends {ol.geom.SimpleGeometry} * @param {ol.geom.RawMultiLineString} coordinates Coordinates. * @param {ol.geom.GeometryLayout=} opt_layout Layout. - * @api + * @api stable */ ol.geom.MultiLineString = function(coordinates, opt_layout) { @@ -55,7 +55,7 @@ goog.inherits(ol.geom.MultiLineString, ol.geom.SimpleGeometry); /** * @param {ol.geom.LineString} lineString LineString. - * @api + * @api stable */ ol.geom.MultiLineString.prototype.appendLineString = function(lineString) { goog.asserts.assert(lineString.getLayout() == this.layout); @@ -72,7 +72,7 @@ ol.geom.MultiLineString.prototype.appendLineString = function(lineString) { /** * @inheritDoc - * @api + * @api stable */ ol.geom.MultiLineString.prototype.clone = function() { var multiLineString = new ol.geom.MultiLineString(null); @@ -122,7 +122,7 @@ ol.geom.MultiLineString.prototype.closestPointXY = * @param {boolean=} opt_extrapolate Extrapolate. * @param {boolean=} opt_interpolate Interpolate. * @return {ol.Coordinate} Coordinate. - * @api + * @api stable */ ol.geom.MultiLineString.prototype.getCoordinateAtM = function(m, opt_extrapolate, opt_interpolate) { @@ -140,7 +140,7 @@ ol.geom.MultiLineString.prototype.getCoordinateAtM = /** * @return {ol.geom.RawMultiLineString} Coordinates. - * @api + * @api stable */ ol.geom.MultiLineString.prototype.getCoordinates = function() { return ol.geom.flat.inflate.coordinatess( @@ -159,7 +159,7 @@ ol.geom.MultiLineString.prototype.getEnds = function() { /** * @param {number} index Index. * @return {ol.geom.LineString} LineString. - * @api + * @api stable */ ol.geom.MultiLineString.prototype.getLineString = function(index) { goog.asserts.assert(0 <= index && index < this.ends_.length); @@ -175,7 +175,7 @@ ol.geom.MultiLineString.prototype.getLineString = function(index) { /** * @return {Array.} LineStrings. - * @api + * @api stable */ ol.geom.MultiLineString.prototype.getLineStrings = function() { var flatCoordinates = this.flatCoordinates; @@ -236,7 +236,7 @@ ol.geom.MultiLineString.prototype.getSimplifiedGeometryInternal = /** * @inheritDoc - * @api + * @api stable */ ol.geom.MultiLineString.prototype.getType = function() { return ol.geom.GeometryType.MULTI_LINE_STRING; @@ -246,7 +246,7 @@ ol.geom.MultiLineString.prototype.getType = function() { /** * @param {ol.geom.RawMultiLineString} coordinates Coordinates. * @param {ol.geom.GeometryLayout=} opt_layout Layout. - * @api + * @api stable */ ol.geom.MultiLineString.prototype.setCoordinates = function(coordinates, opt_layout) { From 6ecd31fe628eadf6b2501d23c5e0f0feca619547 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Tue, 19 Aug 2014 17:08:00 +0200 Subject: [PATCH 07/18] Add @api stable annotations for ol.geom.MultiPoint --- src/ol/geom/multipoint.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/ol/geom/multipoint.js b/src/ol/geom/multipoint.js index 0916f0db8c..e2eeb8c1dd 100644 --- a/src/ol/geom/multipoint.js +++ b/src/ol/geom/multipoint.js @@ -20,7 +20,7 @@ goog.require('ol.math'); * @extends {ol.geom.SimpleGeometry} * @param {ol.geom.RawMultiPoint} coordinates Coordinates. * @param {ol.geom.GeometryLayout=} opt_layout Layout. - * @api + * @api stable */ ol.geom.MultiPoint = function(coordinates, opt_layout) { goog.base(this); @@ -32,7 +32,7 @@ goog.inherits(ol.geom.MultiPoint, ol.geom.SimpleGeometry); /** * @param {ol.geom.Point} point Point. - * @api + * @api stable */ ol.geom.MultiPoint.prototype.appendPoint = function(point) { goog.asserts.assert(point.getLayout() == this.layout); @@ -47,7 +47,7 @@ ol.geom.MultiPoint.prototype.appendPoint = function(point) { /** * @inheritDoc - * @api + * @api stable */ ol.geom.MultiPoint.prototype.clone = function() { var multiPoint = new ol.geom.MultiPoint(null); @@ -85,7 +85,7 @@ ol.geom.MultiPoint.prototype.closestPointXY = /** * @return {ol.geom.RawMultiPoint} Coordinates. - * @api + * @api stable */ ol.geom.MultiPoint.prototype.getCoordinates = function() { return ol.geom.flat.inflate.coordinates( @@ -96,7 +96,7 @@ ol.geom.MultiPoint.prototype.getCoordinates = function() { /** * @param {number} index Index. * @return {ol.geom.Point} Point. - * @api + * @api stable */ ol.geom.MultiPoint.prototype.getPoint = function(index) { var n = goog.isNull(this.flatCoordinates) ? @@ -114,7 +114,7 @@ ol.geom.MultiPoint.prototype.getPoint = function(index) { /** * @return {Array.} Points. - * @api + * @api stable */ ol.geom.MultiPoint.prototype.getPoints = function() { var flatCoordinates = this.flatCoordinates; @@ -134,7 +134,7 @@ ol.geom.MultiPoint.prototype.getPoints = function() { /** * @inheritDoc - * @api + * @api stable */ ol.geom.MultiPoint.prototype.getType = function() { return ol.geom.GeometryType.MULTI_POINT; @@ -144,7 +144,7 @@ ol.geom.MultiPoint.prototype.getType = function() { /** * @param {ol.geom.RawMultiPoint} coordinates Coordinates. * @param {ol.geom.GeometryLayout=} opt_layout Layout. - * @api + * @api stable */ ol.geom.MultiPoint.prototype.setCoordinates = function(coordinates, opt_layout) { From 2c5464aa768f573160f4da8c62368c0d88357da6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Tue, 19 Aug 2014 17:08:51 +0200 Subject: [PATCH 08/18] Add @api stable annotations for ol.geom.MultiPolygon --- src/ol/geom/multipolygon.js | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/ol/geom/multipolygon.js b/src/ol/geom/multipolygon.js index 0df586aaf0..faa11cec5a 100644 --- a/src/ol/geom/multipolygon.js +++ b/src/ol/geom/multipolygon.js @@ -27,7 +27,7 @@ goog.require('ol.geom.flat.simplify'); * @extends {ol.geom.SimpleGeometry} * @param {ol.geom.RawMultiPolygon} coordinates Coordinates. * @param {ol.geom.GeometryLayout=} opt_layout Layout. - * @api + * @api stable */ ol.geom.MultiPolygon = function(coordinates, opt_layout) { @@ -84,7 +84,7 @@ goog.inherits(ol.geom.MultiPolygon, ol.geom.SimpleGeometry); /** * @param {ol.geom.Polygon} polygon Polygon. - * @api + * @api stable */ ol.geom.MultiPolygon.prototype.appendPolygon = function(polygon) { goog.asserts.assert(polygon.getLayout() == this.layout); @@ -110,7 +110,7 @@ ol.geom.MultiPolygon.prototype.appendPolygon = function(polygon) { /** * @inheritDoc - * @api + * @api stable */ ol.geom.MultiPolygon.prototype.clone = function() { var multiPolygon = new ol.geom.MultiPolygon(null); @@ -151,7 +151,7 @@ ol.geom.MultiPolygon.prototype.containsXY = function(x, y) { /** * @return {number} Area (on projected plane). - * @api + * @api stable */ ol.geom.MultiPolygon.prototype.getArea = function() { return ol.geom.flat.area.linearRingss( @@ -161,7 +161,7 @@ ol.geom.MultiPolygon.prototype.getArea = function() { /** * @return {ol.geom.RawMultiPolygon} Coordinates. - * @api + * @api stable */ ol.geom.MultiPolygon.prototype.getCoordinates = function() { return ol.geom.flat.inflate.coordinatesss( @@ -195,7 +195,7 @@ ol.geom.MultiPolygon.prototype.getFlatInteriorPoints = function() { /** * @return {ol.geom.MultiPoint} Interior points. - * @api + * @api stable */ ol.geom.MultiPolygon.prototype.getInteriorPoints = function() { var interiorPoints = new ol.geom.MultiPoint(null); @@ -247,7 +247,7 @@ ol.geom.MultiPolygon.prototype.getSimplifiedGeometryInternal = /** * @param {number} index Index. * @return {ol.geom.Polygon} Polygon. - * @api + * @api stable */ ol.geom.MultiPolygon.prototype.getPolygon = function(index) { goog.asserts.assert(0 <= index && index < this.endss_.length); @@ -278,7 +278,7 @@ ol.geom.MultiPolygon.prototype.getPolygon = function(index) { /** * @return {Array.} Polygons. - * @api + * @api stable */ ol.geom.MultiPolygon.prototype.getPolygons = function() { var layout = this.layout; @@ -307,7 +307,7 @@ ol.geom.MultiPolygon.prototype.getPolygons = function() { /** * @inheritDoc - * @api + * @api stable */ ol.geom.MultiPolygon.prototype.getType = function() { return ol.geom.GeometryType.MULTI_POLYGON; @@ -317,7 +317,7 @@ ol.geom.MultiPolygon.prototype.getType = function() { /** * @param {ol.geom.RawMultiPolygon} coordinates Coordinates. * @param {ol.geom.GeometryLayout=} opt_layout Layout. - * @api + * @api stable */ ol.geom.MultiPolygon.prototype.setCoordinates = function(coordinates, opt_layout) { From b865958efb89771a7a248985885fb93ba3c52043 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Tue, 19 Aug 2014 17:09:19 +0200 Subject: [PATCH 09/18] Add @api stable annotations for ol.geom.Point --- src/ol/geom/point.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ol/geom/point.js b/src/ol/geom/point.js index c37d4a4518..9f1fcd75e8 100644 --- a/src/ol/geom/point.js +++ b/src/ol/geom/point.js @@ -17,7 +17,7 @@ goog.require('ol.math'); * @extends {ol.geom.SimpleGeometry} * @param {ol.geom.RawPoint} coordinates Coordinates. * @param {ol.geom.GeometryLayout=} opt_layout Layout. - * @api + * @api stable */ ol.geom.Point = function(coordinates, opt_layout) { goog.base(this); @@ -29,7 +29,7 @@ goog.inherits(ol.geom.Point, ol.geom.SimpleGeometry); /** * @inheritDoc - * @api + * @api stable */ ol.geom.Point.prototype.clone = function() { var point = new ol.geom.Point(null); @@ -62,7 +62,7 @@ ol.geom.Point.prototype.closestPointXY = /** * @return {ol.geom.RawPoint} Coordinates. - * @api + * @api stable */ ol.geom.Point.prototype.getCoordinates = function() { return goog.isNull(this.flatCoordinates) ? [] : this.flatCoordinates.slice(); @@ -85,7 +85,7 @@ ol.geom.Point.prototype.getExtent = function(opt_extent) { /** * @inheritDoc - * @api + * @api stable */ ol.geom.Point.prototype.getType = function() { return ol.geom.GeometryType.POINT; @@ -95,7 +95,7 @@ ol.geom.Point.prototype.getType = function() { /** * @param {ol.geom.RawPoint} coordinates Coordinates. * @param {ol.geom.GeometryLayout=} opt_layout Layout. - * @api + * @api stable */ ol.geom.Point.prototype.setCoordinates = function(coordinates, opt_layout) { if (goog.isNull(coordinates)) { From e9eb22bc477b8b884a558cd37b861e5f45bc5940 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Tue, 19 Aug 2014 17:09:59 +0200 Subject: [PATCH 10/18] Add @api stable annotations for ol.geom.Polygon --- src/ol/geom/polygon.js | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/ol/geom/polygon.js b/src/ol/geom/polygon.js index 9b38853418..b0f386ce47 100644 --- a/src/ol/geom/polygon.js +++ b/src/ol/geom/polygon.js @@ -27,7 +27,7 @@ goog.require('ol.geom.flat.simplify'); * @extends {ol.geom.SimpleGeometry} * @param {ol.geom.RawPolygon} coordinates Coordinates. * @param {ol.geom.GeometryLayout=} opt_layout Layout. - * @api + * @api stable */ ol.geom.Polygon = function(coordinates, opt_layout) { @@ -84,7 +84,7 @@ goog.inherits(ol.geom.Polygon, ol.geom.SimpleGeometry); /** * @param {ol.geom.LinearRing} linearRing Linear ring. - * @api + * @api stable */ ol.geom.Polygon.prototype.appendLinearRing = function(linearRing) { goog.asserts.assert(linearRing.getLayout() == this.layout); @@ -100,7 +100,7 @@ ol.geom.Polygon.prototype.appendLinearRing = function(linearRing) { /** * @inheritDoc - * @api + * @api stable */ ol.geom.Polygon.prototype.clone = function() { var polygon = new ol.geom.Polygon(null); @@ -141,7 +141,7 @@ ol.geom.Polygon.prototype.containsXY = function(x, y) { /** * @return {number} Area (on projected plane). - * @api + * @api stable */ ol.geom.Polygon.prototype.getArea = function() { return ol.geom.flat.area.linearRings( @@ -151,7 +151,7 @@ ol.geom.Polygon.prototype.getArea = function() { /** * @return {ol.geom.RawPolygon} Coordinates. - * @api + * @api stable */ ol.geom.Polygon.prototype.getCoordinates = function() { return ol.geom.flat.inflate.coordinatess( @@ -184,7 +184,7 @@ ol.geom.Polygon.prototype.getFlatInteriorPoint = function() { /** * @return {ol.geom.Point} Interior point. - * @api + * @api stable */ ol.geom.Polygon.prototype.getInteriorPoint = function() { return new ol.geom.Point(this.getFlatInteriorPoint()); @@ -194,7 +194,7 @@ ol.geom.Polygon.prototype.getInteriorPoint = function() { /** * @param {number} index Index. * @return {ol.geom.LinearRing} Linear ring. - * @api + * @api stable */ ol.geom.Polygon.prototype.getLinearRing = function(index) { goog.asserts.assert(0 <= index && index < this.ends_.length); @@ -210,7 +210,7 @@ ol.geom.Polygon.prototype.getLinearRing = function(index) { /** * @return {Array.} Linear rings. - * @api + * @api stable */ ol.geom.Polygon.prototype.getLinearRings = function() { var layout = this.layout; @@ -271,7 +271,7 @@ ol.geom.Polygon.prototype.getSimplifiedGeometryInternal = /** * @inheritDoc - * @api + * @api stable */ ol.geom.Polygon.prototype.getType = function() { return ol.geom.GeometryType.POLYGON; @@ -281,7 +281,7 @@ ol.geom.Polygon.prototype.getType = function() { /** * @param {ol.geom.RawPolygon} coordinates Coordinates. * @param {ol.geom.GeometryLayout=} opt_layout Layout. - * @api + * @api stable */ ol.geom.Polygon.prototype.setCoordinates = function(coordinates, opt_layout) { if (goog.isNull(coordinates)) { @@ -326,7 +326,7 @@ ol.geom.Polygon.prototype.setFlatCoordinates = * @param {number} radius Radius. * @param {number=} opt_n Optional number of points. Default is `32`. * @return {ol.geom.Polygon} Circle geometry. - * @api + * @api stable */ ol.geom.Polygon.circular = function(sphere, center, radius, opt_n) { var n = goog.isDef(opt_n) ? opt_n : 32; From feba61af25efc81c4dad975e6e3ae1eaaea96d42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Tue, 19 Aug 2014 17:10:32 +0200 Subject: [PATCH 11/18] Add @api stable annotations for ol.geom.SimpleGeometry --- src/ol/geom/simplegeometry.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/ol/geom/simplegeometry.js b/src/ol/geom/simplegeometry.js index b8cef3f7b8..67ad222936 100644 --- a/src/ol/geom/simplegeometry.js +++ b/src/ol/geom/simplegeometry.js @@ -16,7 +16,7 @@ goog.require('ol.geom.flat.transform'); * * @constructor * @extends {ol.geom.Geometry} - * @api + * @api stable */ ol.geom.SimpleGeometry = function() { @@ -90,7 +90,7 @@ ol.geom.SimpleGeometry.prototype.containsXY = goog.functions.FALSE; /** * @inheritDoc - * @api + * @api stable */ ol.geom.SimpleGeometry.prototype.getExtent = function(opt_extent) { if (this.extentRevision != this.getRevision()) { @@ -106,7 +106,7 @@ ol.geom.SimpleGeometry.prototype.getExtent = function(opt_extent) { /** * @return {ol.Coordinate} First coordinate. - * @api + * @api stable */ ol.geom.SimpleGeometry.prototype.getFirstCoordinate = function() { return this.flatCoordinates.slice(0, this.stride); @@ -123,7 +123,7 @@ ol.geom.SimpleGeometry.prototype.getFlatCoordinates = function() { /** * @return {ol.Coordinate} Last point. - * @api + * @api stable */ ol.geom.SimpleGeometry.prototype.getLastCoordinate = function() { return this.flatCoordinates.slice(this.flatCoordinates.length - this.stride); @@ -132,7 +132,7 @@ ol.geom.SimpleGeometry.prototype.getLastCoordinate = function() { /** * @return {ol.geom.GeometryLayout} Layout. - * @api + * @api stable */ ol.geom.SimpleGeometry.prototype.getLayout = function() { return this.layout; @@ -141,7 +141,6 @@ ol.geom.SimpleGeometry.prototype.getLayout = function() { /** * @inheritDoc - * @api */ ol.geom.SimpleGeometry.prototype.getSimplifiedGeometry = function(squaredTolerance) { From 72bcb2db8036c2fbcc7fb6dcdb5536832ebab024 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Thu, 21 Aug 2014 10:38:45 +0200 Subject: [PATCH 12/18] Remove the ol.geom.RawPoint type --- src/ol/geom/circle.js | 8 ++++---- src/ol/geom/geometry.js | 10 +--------- src/ol/geom/point.js | 6 +++--- 3 files changed, 8 insertions(+), 16 deletions(-) diff --git a/src/ol/geom/circle.js b/src/ol/geom/circle.js index aa92f46080..e324b9b558 100644 --- a/src/ol/geom/circle.js +++ b/src/ol/geom/circle.js @@ -14,7 +14,7 @@ goog.require('ol.geom.flat.deflate'); * * @constructor * @extends {ol.geom.SimpleGeometry} - * @param {ol.geom.RawPoint} center Center. + * @param {ol.Coordinate} center Center. * @param {number=} opt_radius Radius. * @param {ol.geom.GeometryLayout=} opt_layout Layout. * @api @@ -82,7 +82,7 @@ ol.geom.Circle.prototype.containsXY = function(x, y) { /** - * @return {ol.geom.RawPoint} Center. + * @return {ol.Coordinate} Center. * @api */ ol.geom.Circle.prototype.getCenter = function() { @@ -139,7 +139,7 @@ ol.geom.Circle.prototype.getType = function() { /** - * @param {ol.geom.RawPoint} center Center. + * @param {ol.Coordinate} center Center. * @api */ ol.geom.Circle.prototype.setCenter = function(center) { @@ -157,7 +157,7 @@ ol.geom.Circle.prototype.setCenter = function(center) { /** - * @param {ol.geom.RawPoint} center Center. + * @param {ol.Coordinate} center Center. * @param {number} radius Radius. * @param {ol.geom.GeometryLayout=} opt_layout Layout. * @api diff --git a/src/ol/geom/geometry.js b/src/ol/geom/geometry.js index 70e8a1882a..d65860418a 100644 --- a/src/ol/geom/geometry.js +++ b/src/ol/geom/geometry.js @@ -203,14 +203,6 @@ ol.geom.Geometry.prototype.transform = function(source, destination) { }; -/** - * Array representation of a point. Example: `[16, 48]`. - * @typedef {ol.Coordinate} - * @api stable - */ -ol.geom.RawPoint; - - /** * Array representation of a linestring. * @typedef {Array.} @@ -237,7 +229,7 @@ ol.geom.RawPolygon; /** * Array representation of a multipoint. - * @typedef {Array.} + * @typedef {Array.} * @api stable */ ol.geom.RawMultiPoint; diff --git a/src/ol/geom/point.js b/src/ol/geom/point.js index 9f1fcd75e8..53cdadd8cb 100644 --- a/src/ol/geom/point.js +++ b/src/ol/geom/point.js @@ -15,7 +15,7 @@ goog.require('ol.math'); * * @constructor * @extends {ol.geom.SimpleGeometry} - * @param {ol.geom.RawPoint} coordinates Coordinates. + * @param {ol.Coordinate} coordinates Coordinates. * @param {ol.geom.GeometryLayout=} opt_layout Layout. * @api stable */ @@ -61,7 +61,7 @@ ol.geom.Point.prototype.closestPointXY = /** - * @return {ol.geom.RawPoint} Coordinates. + * @return {ol.Coordinate} Coordinates. * @api stable */ ol.geom.Point.prototype.getCoordinates = function() { @@ -93,7 +93,7 @@ ol.geom.Point.prototype.getType = function() { /** - * @param {ol.geom.RawPoint} coordinates Coordinates. + * @param {ol.Coordinate} coordinates Coordinates. * @param {ol.geom.GeometryLayout=} opt_layout Layout. * @api stable */ From fb1c764a3813743339ba3cb5da1f3f99739da2a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Thu, 21 Aug 2014 10:40:54 +0200 Subject: [PATCH 13/18] Remove the ol.geom.RawLineString type --- src/ol/geom/geometry.js | 10 +--------- src/ol/geom/linestring.js | 6 +++--- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/ol/geom/geometry.js b/src/ol/geom/geometry.js index d65860418a..f151cfb733 100644 --- a/src/ol/geom/geometry.js +++ b/src/ol/geom/geometry.js @@ -203,14 +203,6 @@ ol.geom.Geometry.prototype.transform = function(source, destination) { }; -/** - * Array representation of a linestring. - * @typedef {Array.} - * @api stable - */ -ol.geom.RawLineString; - - /** * Array representation of a linear ring. * @typedef {Array.} @@ -237,7 +229,7 @@ ol.geom.RawMultiPoint; /** * Array representation of a multilinestring. - * @typedef {Array.} + * @typedef {Array.>} * @api stable */ ol.geom.RawMultiLineString; diff --git a/src/ol/geom/linestring.js b/src/ol/geom/linestring.js index 967de88134..12a0529343 100644 --- a/src/ol/geom/linestring.js +++ b/src/ol/geom/linestring.js @@ -20,7 +20,7 @@ goog.require('ol.geom.flat.simplify'); * * @constructor * @extends {ol.geom.SimpleGeometry} - * @param {ol.geom.RawLineString} coordinates Coordinates. + * @param {Array.} coordinates Coordinates. * @param {ol.geom.GeometryLayout=} opt_layout Layout. * @api stable */ @@ -131,7 +131,7 @@ ol.geom.LineString.prototype.getCoordinateAtM = function(m, opt_extrapolate) { /** - * @return {ol.geom.RawLineString} Coordinates. + * @return {Array.} Coordinates. * @api stable */ ol.geom.LineString.prototype.getCoordinates = function() { @@ -190,7 +190,7 @@ ol.geom.LineString.prototype.getType = function() { /** - * @param {ol.geom.RawLineString} coordinates Coordinates. + * @param {Array.} coordinates Coordinates. * @param {ol.geom.GeometryLayout=} opt_layout Layout. * @api stable */ From 838415218fffa1ce2002981642b82c017db125eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Thu, 21 Aug 2014 10:42:21 +0200 Subject: [PATCH 14/18] Remove the ol.geom.RawLinearRing type --- src/ol/geom/geometry.js | 10 +--------- src/ol/geom/linearring.js | 6 +++--- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/ol/geom/geometry.js b/src/ol/geom/geometry.js index f151cfb733..9e33e2dd37 100644 --- a/src/ol/geom/geometry.js +++ b/src/ol/geom/geometry.js @@ -203,17 +203,9 @@ ol.geom.Geometry.prototype.transform = function(source, destination) { }; -/** - * Array representation of a linear ring. - * @typedef {Array.} - * @api stable - */ -ol.geom.RawLinearRing; - - /** * Array representation of a polygon. - * @typedef {Array.} + * @typedef {Array.>} * @api stable */ ol.geom.RawPolygon; diff --git a/src/ol/geom/linearring.js b/src/ol/geom/linearring.js index 3bbc04b80d..42aac8aade 100644 --- a/src/ol/geom/linearring.js +++ b/src/ol/geom/linearring.js @@ -18,7 +18,7 @@ goog.require('ol.geom.flat.simplify'); * * @constructor * @extends {ol.geom.SimpleGeometry} - * @param {ol.geom.RawLinearRing} coordinates Coordinates. + * @param {Array.} coordinates Coordinates. * @param {ol.geom.GeometryLayout=} opt_layout Layout. * @api stable */ @@ -87,7 +87,7 @@ ol.geom.LinearRing.prototype.getArea = function() { /** - * @return {ol.geom.RawLinearRing} Coordinates. + * @return {Array.} Coordinates. * @api stable */ ol.geom.LinearRing.prototype.getCoordinates = function() { @@ -122,7 +122,7 @@ ol.geom.LinearRing.prototype.getType = function() { /** - * @param {ol.geom.RawLinearRing} coordinates Coordinates. + * @param {Array.} coordinates Coordinates. * @param {ol.geom.GeometryLayout=} opt_layout Layout. * @api stable */ From 47c1f1908e7a57379b3b3cd9a76c394c1a5fdc89 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Thu, 21 Aug 2014 10:46:56 +0200 Subject: [PATCH 15/18] Remove the ol.geom.RawPolygon type --- src/ol/geom/geometry.js | 10 +--------- src/ol/geom/polygon.js | 6 +++--- src/ol/interaction/drawinteraction.js | 26 +++++++++++++------------- 3 files changed, 17 insertions(+), 25 deletions(-) diff --git a/src/ol/geom/geometry.js b/src/ol/geom/geometry.js index 9e33e2dd37..5293ec1e41 100644 --- a/src/ol/geom/geometry.js +++ b/src/ol/geom/geometry.js @@ -203,14 +203,6 @@ ol.geom.Geometry.prototype.transform = function(source, destination) { }; -/** - * Array representation of a polygon. - * @typedef {Array.>} - * @api stable - */ -ol.geom.RawPolygon; - - /** * Array representation of a multipoint. * @typedef {Array.} @@ -229,7 +221,7 @@ ol.geom.RawMultiLineString; /** * Array representation of a multipolygon. - * @typedef {Array.} + * @typedef {Array.>>} * @api stable */ ol.geom.RawMultiPolygon; diff --git a/src/ol/geom/polygon.js b/src/ol/geom/polygon.js index b0f386ce47..4c5b266539 100644 --- a/src/ol/geom/polygon.js +++ b/src/ol/geom/polygon.js @@ -25,7 +25,7 @@ goog.require('ol.geom.flat.simplify'); * * @constructor * @extends {ol.geom.SimpleGeometry} - * @param {ol.geom.RawPolygon} coordinates Coordinates. + * @param {Array.>} coordinates Coordinates. * @param {ol.geom.GeometryLayout=} opt_layout Layout. * @api stable */ @@ -150,7 +150,7 @@ ol.geom.Polygon.prototype.getArea = function() { /** - * @return {ol.geom.RawPolygon} Coordinates. + * @return {Array.>} Coordinates. * @api stable */ ol.geom.Polygon.prototype.getCoordinates = function() { @@ -279,7 +279,7 @@ ol.geom.Polygon.prototype.getType = function() { /** - * @param {ol.geom.RawPolygon} coordinates Coordinates. + * @param {Array.>} coordinates Coordinates. * @param {ol.geom.GeometryLayout=} opt_layout Layout. * @api stable */ diff --git a/src/ol/interaction/drawinteraction.js b/src/ol/interaction/drawinteraction.js index c99cf1be15..03b6f7e476 100644 --- a/src/ol/interaction/drawinteraction.js +++ b/src/ol/interaction/drawinteraction.js @@ -166,10 +166,10 @@ ol.interaction.Draw = function(options) { /** * Sketch polygon. Used when drawing polygon. - * @type {ol.geom.RawPolygon} + * @type {Array.>} * @private */ - this.sketchRawPolygon_ = null; + this.sketchPolygonCoords_ = null; /** * Squared tolerance for handling up events. If the squared distance @@ -331,8 +331,8 @@ ol.interaction.Draw.prototype.atFinish_ = function(event) { goog.asserts.assertInstanceof(geometry, ol.geom.Polygon); potentiallyDone = geometry.getCoordinates()[0].length > this.minPointsPerRing_; - potentiallyFinishCoordinates = [this.sketchRawPolygon_[0][0], - this.sketchRawPolygon_[0][this.sketchRawPolygon_[0].length - 2]]; + potentiallyFinishCoordinates = [this.sketchPolygonCoords_[0][0], + this.sketchPolygonCoords_[0][this.sketchPolygonCoords_[0].length - 2]]; } if (potentiallyDone) { var map = event.map; @@ -388,8 +388,8 @@ ol.interaction.Draw.prototype.startDrawing_ = function(event) { } else if (this.mode_ === ol.interaction.DrawMode.POLYGON) { this.sketchLine_ = new ol.Feature(new ol.geom.LineString([start.slice(), start.slice()])); - this.sketchRawPolygon_ = [[start.slice(), start.slice()]]; - geometry = new ol.geom.Polygon(this.sketchRawPolygon_); + this.sketchPolygonCoords_ = [[start.slice(), start.slice()]]; + geometry = new ol.geom.Polygon(this.sketchPolygonCoords_); } } goog.asserts.assert(goog.isDef(geometry)); @@ -425,7 +425,7 @@ ol.interaction.Draw.prototype.modifyDrawing_ = function(event) { coordinates = geometry.getCoordinates(); } else if (this.mode_ === ol.interaction.DrawMode.POLYGON) { goog.asserts.assertInstanceof(geometry, ol.geom.Polygon); - coordinates = this.sketchRawPolygon_[0]; + coordinates = this.sketchPolygonCoords_[0]; } if (this.atFinish_(event)) { // snap to finish @@ -445,7 +445,7 @@ ol.interaction.Draw.prototype.modifyDrawing_ = function(event) { goog.asserts.assertInstanceof(sketchLineGeom, ol.geom.LineString); sketchLineGeom.setCoordinates(coordinates); goog.asserts.assertInstanceof(geometry, ol.geom.Polygon); - geometry.setCoordinates(this.sketchRawPolygon_); + geometry.setCoordinates(this.sketchPolygonCoords_); } } this.updateSketchFeatures_(); @@ -468,9 +468,9 @@ ol.interaction.Draw.prototype.addToDrawing_ = function(event) { coordinates.push(coordinate.slice()); geometry.setCoordinates(coordinates); } else if (this.mode_ === ol.interaction.DrawMode.POLYGON) { - this.sketchRawPolygon_[0].push(coordinate.slice()); + this.sketchPolygonCoords_[0].push(coordinate.slice()); goog.asserts.assertInstanceof(geometry, ol.geom.Polygon); - geometry.setCoordinates(this.sketchRawPolygon_); + geometry.setCoordinates(this.sketchPolygonCoords_); } this.updateSketchFeatures_(); }; @@ -500,9 +500,9 @@ ol.interaction.Draw.prototype.finishDrawing_ = function(event) { // When we finish drawing a polygon on the last point, // the last coordinate is duplicated as for LineString // we force the replacement by the first point - this.sketchRawPolygon_[0].pop(); - this.sketchRawPolygon_[0].push(this.sketchRawPolygon_[0][0]); - geometry.setCoordinates(this.sketchRawPolygon_); + this.sketchPolygonCoords_[0].pop(); + this.sketchPolygonCoords_[0].push(this.sketchPolygonCoords_[0][0]); + geometry.setCoordinates(this.sketchPolygonCoords_); coordinates = geometry.getCoordinates(); } From d17993794da9ce345340bee63c37389bf1b85516 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Thu, 21 Aug 2014 10:48:15 +0200 Subject: [PATCH 16/18] Remove the ol.geom.RawMultiPoint type --- src/ol/geom/geometry.js | 8 -------- src/ol/geom/multipoint.js | 6 +++--- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/ol/geom/geometry.js b/src/ol/geom/geometry.js index 5293ec1e41..838375025c 100644 --- a/src/ol/geom/geometry.js +++ b/src/ol/geom/geometry.js @@ -203,14 +203,6 @@ ol.geom.Geometry.prototype.transform = function(source, destination) { }; -/** - * Array representation of a multipoint. - * @typedef {Array.} - * @api stable - */ -ol.geom.RawMultiPoint; - - /** * Array representation of a multilinestring. * @typedef {Array.>} diff --git a/src/ol/geom/multipoint.js b/src/ol/geom/multipoint.js index e2eeb8c1dd..3418deebdd 100644 --- a/src/ol/geom/multipoint.js +++ b/src/ol/geom/multipoint.js @@ -18,7 +18,7 @@ goog.require('ol.math'); * * @constructor * @extends {ol.geom.SimpleGeometry} - * @param {ol.geom.RawMultiPoint} coordinates Coordinates. + * @param {Array.} coordinates Coordinates. * @param {ol.geom.GeometryLayout=} opt_layout Layout. * @api stable */ @@ -84,7 +84,7 @@ ol.geom.MultiPoint.prototype.closestPointXY = /** - * @return {ol.geom.RawMultiPoint} Coordinates. + * @return {Array.} Coordinates. * @api stable */ ol.geom.MultiPoint.prototype.getCoordinates = function() { @@ -142,7 +142,7 @@ ol.geom.MultiPoint.prototype.getType = function() { /** - * @param {ol.geom.RawMultiPoint} coordinates Coordinates. + * @param {Array.} coordinates Coordinates. * @param {ol.geom.GeometryLayout=} opt_layout Layout. * @api stable */ From 95d7598227dc58a3ce4797bd94cc13f134d4e805 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Thu, 21 Aug 2014 10:49:31 +0200 Subject: [PATCH 17/18] Remove the ol.geom.RawMultiLineString type --- src/ol/geom/geometry.js | 8 -------- src/ol/geom/multilinestring.js | 6 +++--- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/ol/geom/geometry.js b/src/ol/geom/geometry.js index 838375025c..b2a5f766cc 100644 --- a/src/ol/geom/geometry.js +++ b/src/ol/geom/geometry.js @@ -203,14 +203,6 @@ ol.geom.Geometry.prototype.transform = function(source, destination) { }; -/** - * Array representation of a multilinestring. - * @typedef {Array.>} - * @api stable - */ -ol.geom.RawMultiLineString; - - /** * Array representation of a multipolygon. * @typedef {Array.>>} diff --git a/src/ol/geom/multilinestring.js b/src/ol/geom/multilinestring.js index 138d233cb0..e508833234 100644 --- a/src/ol/geom/multilinestring.js +++ b/src/ol/geom/multilinestring.js @@ -20,7 +20,7 @@ goog.require('ol.geom.flat.simplify'); * * @constructor * @extends {ol.geom.SimpleGeometry} - * @param {ol.geom.RawMultiLineString} coordinates Coordinates. + * @param {Array.>} coordinates Coordinates. * @param {ol.geom.GeometryLayout=} opt_layout Layout. * @api stable */ @@ -139,7 +139,7 @@ ol.geom.MultiLineString.prototype.getCoordinateAtM = /** - * @return {ol.geom.RawMultiLineString} Coordinates. + * @return {Array.>} Coordinates. * @api stable */ ol.geom.MultiLineString.prototype.getCoordinates = function() { @@ -244,7 +244,7 @@ ol.geom.MultiLineString.prototype.getType = function() { /** - * @param {ol.geom.RawMultiLineString} coordinates Coordinates. + * @param {Array.>} coordinates Coordinates. * @param {ol.geom.GeometryLayout=} opt_layout Layout. * @api stable */ From 4764cbc9088d634529552462049994a7439af508 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89ric=20Lemoine?= Date: Thu, 21 Aug 2014 10:50:58 +0200 Subject: [PATCH 18/18] Remove the ol.geom.RawMultiPolygon type --- src/ol/geom/geometry.js | 8 -------- src/ol/geom/multipolygon.js | 6 +++--- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/ol/geom/geometry.js b/src/ol/geom/geometry.js index b2a5f766cc..3c24b91133 100644 --- a/src/ol/geom/geometry.js +++ b/src/ol/geom/geometry.js @@ -201,11 +201,3 @@ ol.geom.Geometry.prototype.transform = function(source, destination) { this.applyTransform(ol.proj.getTransform(source, destination)); return this; }; - - -/** - * Array representation of a multipolygon. - * @typedef {Array.>>} - * @api stable - */ -ol.geom.RawMultiPolygon; diff --git a/src/ol/geom/multipolygon.js b/src/ol/geom/multipolygon.js index faa11cec5a..641b615772 100644 --- a/src/ol/geom/multipolygon.js +++ b/src/ol/geom/multipolygon.js @@ -25,7 +25,7 @@ goog.require('ol.geom.flat.simplify'); * * @constructor * @extends {ol.geom.SimpleGeometry} - * @param {ol.geom.RawMultiPolygon} coordinates Coordinates. + * @param {Array.>>} coordinates Coordinates. * @param {ol.geom.GeometryLayout=} opt_layout Layout. * @api stable */ @@ -160,7 +160,7 @@ ol.geom.MultiPolygon.prototype.getArea = function() { /** - * @return {ol.geom.RawMultiPolygon} Coordinates. + * @return {Array.>>} Coordinates. * @api stable */ ol.geom.MultiPolygon.prototype.getCoordinates = function() { @@ -315,7 +315,7 @@ ol.geom.MultiPolygon.prototype.getType = function() { /** - * @param {ol.geom.RawMultiPolygon} coordinates Coordinates. + * @param {Array.>>} coordinates Coordinates. * @param {ol.geom.GeometryLayout=} opt_layout Layout. * @api stable */