Skip to content

Commit

Permalink
DDF-2779 Remove extra points from line / polygon drawings in Cesium (…
Browse files Browse the repository at this point in the history
…#1647)

- codice/ddf#1534 made a change to DrawHelper which allowed drawings at higher zooms to work.  However, DrawHelper was relying on this to remove the extra points that occur when finishing a drawing.  As a result, we need to remove the final two points on all polygon / line drawings.
  • Loading branch information
andrewkfiedler authored and shaundmorris committed Feb 8, 2017
1 parent 8164d7a commit 0da55ad
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -934,7 +934,8 @@ var DrawHelper = (function() {
_self.stopDrawing();
if(typeof options.callback == 'function') {
//https://github.com/leforthomas/cesium-drawhelper/issues/13
options.callback(positions);
//need to remove last 2 positions since those are from finishing the drawing
options.callback(positions.slice(0, positions.length - 2));
}
}
}
Expand Down

0 comments on commit 0da55ad

Please sign in to comment.