ol/geom/flat/straightchunk export

This commit is contained in:
raiyni
2018-02-12 23:42:11 -06:00
parent 2550ab1691
commit 78b418ba9d
3 changed files with 11 additions and 13 deletions
+2 -4
View File
@@ -1,7 +1,6 @@
/**
* @module ol/geom/flat/straightchunk
*/
const _ol_geom_flat_straightchunk_ = {};
/**
@@ -13,7 +12,7 @@ const _ol_geom_flat_straightchunk_ = {};
* @return {Array.<number>} Start and end of the first suitable chunk of the
* given `flatCoordinates`.
*/
_ol_geom_flat_straightchunk_.lineString = function(maxAngle, flatCoordinates, offset, end, stride) {
export function matchingChunk(maxAngle, flatCoordinates, offset, end, stride) {
let chunkStart = offset;
let chunkEnd = offset;
let chunkM = 0;
@@ -49,5 +48,4 @@ _ol_geom_flat_straightchunk_.lineString = function(maxAngle, flatCoordinates, of
}
m += m23;
return m > chunkM ? [start, i] : [chunkStart, chunkEnd];
};
export default _ol_geom_flat_straightchunk_;
}