Merge pull request #2093 from bjornharrtell/fix_opt_dest2

Assign to provided array instead of pushing when getting a linestring midpoint.
This commit is contained in:
Tim Schaub
2014-05-21 09:28:06 -06:00
2 changed files with 10 additions and 1 deletions

View File

@@ -61,7 +61,8 @@ ol.geom.flat.interpolate.lineString =
}
}
if (goog.isDefAndNotNull(opt_dest)) {
opt_dest.push(pointX, pointY);
opt_dest[0] = pointX;
opt_dest[1] = pointY;
return opt_dest;
} else {
return [pointX, pointY];