Skip to content

Commit 2f10c4e

Browse files
committed
Fix drawing a lower zoom level
Don't remove points that are closer than a hard coded epsilon value. The zoom level sets the miniumum distance one can set between any two points.
1 parent 19993ca commit 2f10c4e

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

DrawHelper.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -935,10 +935,7 @@ var DrawHelper = (function() {
935935
if(typeof options.callback == 'function') {
936936
// remove overlapping ones
937937
var index = positions.length - 1;
938-
// TODO - calculate some epsilon based on the zoom level
939-
var epsilon = Cesium.Math.EPSILON3;
940-
for(; index > 0 && positions[index].equalsEpsilon(positions[index - 1], epsilon); index--) {}
941-
options.callback(positions.splice(0, index + 1));
938+
options.callback(positions);
942939
}
943940
}
944941
}

0 commit comments

Comments
 (0)