Add ol.geom.LineString#getLength
This commit is contained in:
@@ -27,6 +27,15 @@ ol.geom.LineString.prototype.getCoordinates = function() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return {number} Length.
|
||||||
|
*/
|
||||||
|
ol.geom.LineString.prototype.getLength = function() {
|
||||||
|
return ol.geom.flat.lineStringLength(
|
||||||
|
this.flatCoordinates, 0, this.flatCoordinates.length, this.stride);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user