LineString#forEachSegment
This commit is contained in:
@@ -39,7 +39,8 @@ The map and sources no longer accept a `logo` option. Instead, if you wish to a
|
|||||||
|
|
||||||
The following methods did get the optional this (i.e. opt_this) arguments removed. Please use closures, the es6 arrow function or the bind method to achieve this effect (Bind is explained here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind).
|
The following methods did get the optional this (i.e. opt_this) arguments removed. Please use closures, the es6 arrow function or the bind method to achieve this effect (Bind is explained here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind).
|
||||||
|
|
||||||
* ol.Collection#forEach
|
* Collection#forEach
|
||||||
|
* geom/LineString#forEachSegment
|
||||||
|
|
||||||
### v4.6.0
|
### v4.6.0
|
||||||
|
|
||||||
|
|||||||
@@ -114,15 +114,13 @@ LineString.prototype.closestPointXY = function(x, y, closestPoint, minSquaredDis
|
|||||||
*
|
*
|
||||||
* @param {function(this: S, ol.Coordinate, ol.Coordinate): T} callback Function
|
* @param {function(this: S, ol.Coordinate, ol.Coordinate): T} callback Function
|
||||||
* called for each segment.
|
* called for each segment.
|
||||||
* @param {S=} opt_this The object to be used as the value of 'this'
|
|
||||||
* within callback.
|
|
||||||
* @return {T|boolean} Value.
|
* @return {T|boolean} Value.
|
||||||
* @template T,S
|
* @template T,S
|
||||||
* @api
|
* @api
|
||||||
*/
|
*/
|
||||||
LineString.prototype.forEachSegment = function(callback, opt_this) {
|
LineString.prototype.forEachSegment = function(callback) {
|
||||||
return _ol_geom_flat_segments_.forEach(this.flatCoordinates, 0,
|
return _ol_geom_flat_segments_.forEach(this.flatCoordinates, 0,
|
||||||
this.flatCoordinates.length, this.stride, callback, opt_this);
|
this.flatCoordinates.length, this.stride, callback);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user