Skip to content

Commit

Permalink
Add Coordinate Precision Checks
Browse files Browse the repository at this point in the history
  • Loading branch information
ingalls committed Jan 6, 2025
1 parent 6d5d390 commit 4b210a7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions api/web/src/components/CloudTAK/Map.vue
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,11 @@ function editGeometry(featid: string) {
if (coord.length > 2) {
coord.splice(2, coord.length - 2);
}
// Ensure precision is within bounds
for (let i = 0; i < coord.length; i++) {
coord[i] = Math.round(coord[i] * Math.pow(10, 9)) / Math.pow(10, 9);
}
});
cotStore.hidden.add(cot.id);
Expand Down

0 comments on commit 4b210a7

Please sign in to comment.