Change getInteriorPoint type to XYM with intersection length as M
This commit is contained in:
@@ -14,7 +14,8 @@ goog.require('ol.geom.flat.contains');
|
||||
* @param {Array.<number>} flatCenters Flat centers.
|
||||
* @param {number} flatCentersOffset Flat center offset.
|
||||
* @param {Array.<number>=} opt_dest Destination.
|
||||
* @return {Array.<number>} Destination.
|
||||
* @return {Array.<number>} Destination point as XYM coordinate, where M is the
|
||||
* length of the horizontal intersection that the point belongs to.
|
||||
*/
|
||||
ol.geom.flat.interiorpoint.linearRings = function(flatCoordinates, offset,
|
||||
ends, stride, flatCenters, flatCentersOffset, opt_dest) {
|
||||
@@ -61,10 +62,10 @@ ol.geom.flat.interiorpoint.linearRings = function(flatCoordinates, offset,
|
||||
pointX = flatCenters[flatCentersOffset];
|
||||
}
|
||||
if (opt_dest) {
|
||||
opt_dest.push(pointX, y);
|
||||
opt_dest.push(pointX, y, maxSegmentLength);
|
||||
return opt_dest;
|
||||
} else {
|
||||
return [pointX, y];
|
||||
return [pointX, y, maxSegmentLength];
|
||||
}
|
||||
};
|
||||
|
||||
@@ -75,7 +76,8 @@ ol.geom.flat.interiorpoint.linearRings = function(flatCoordinates, offset,
|
||||
* @param {Array.<Array.<number>>} endss Endss.
|
||||
* @param {number} stride Stride.
|
||||
* @param {Array.<number>} flatCenters Flat centers.
|
||||
* @return {Array.<number>} Interior points.
|
||||
* @return {Array.<number>} Interior points as XYM coordinates, where M is the
|
||||
* length of the horizontal intersection that the point belongs to.
|
||||
*/
|
||||
ol.geom.flat.interiorpoint.linearRingss = function(flatCoordinates, offset, endss, stride, flatCenters) {
|
||||
var interiorPoints = [];
|
||||
|
||||
Reference in New Issue
Block a user