Add ol.geom.SimpleGeometry#getFirstCoordinate
This commit is contained in:
@@ -99,6 +99,14 @@ ol.geom.SimpleGeometry.prototype.getExtent = function(opt_extent) {
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @return {ol.Coordinate} First coordinate.
|
||||
*/
|
||||
ol.geom.SimpleGeometry.prototype.getFirstCoordinate = function() {
|
||||
return this.flatCoordinates.slice(0, this.stride);
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @return {Array.<number>} Flat coordinates.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user