Skip to content

Commit

Permalink
refactor(#10): Added more decimals to lat/lon and elevation target
Browse files Browse the repository at this point in the history
Added more decimals to lat/lon and elevation target for more precission
  • Loading branch information
kleinc committed Oct 6, 2025
1 parent cbe01f8 commit 0b5b038
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/coordinateShowing/coordinateShowing.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ function drawText(ctx, text, canvas) {
export function updatePosition() {
const cam = window.viewer.scene.view.position;
const [lon, lat] = proj4(ecef, wgs84, [cam.x, cam.y, cam.z]);
drawText(posCtx, `lat = ${lat.toFixed(2)}˚ lon = ${lon.toFixed(2)}˚`, posCanvas);
drawText(posCtx, `lat = ${lat.toFixed(5)}˚ lon = ${lon.toFixed(5)}˚`, posCanvas);
}

/**
Expand All @@ -65,7 +65,7 @@ export function updateTargetElevation() {

if (controls === window.viewer.orbitControls) {
elevationCanvas.style.display = 'inline';
drawText(elevationCtx, `Target elevation = ${height.toFixed(2)}m`, elevationCanvas);
drawText(elevationCtx, `Target elevation = ${height.toFixed(4)}m`, elevationCanvas);
} else {
elevationCanvas.style.display = 'none';
}
Expand Down

0 comments on commit 0b5b038

Please sign in to comment.