Skip to content

Commit

Permalink
Tweak calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
supersonicclay committed May 7, 2019
1 parent 959314c commit bcf9cd9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/layers/src/mode-handlers/elevation-handler.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,6 @@ export class ElevationHandler extends ModifyHandler {
const metersPerPixel =
(156543.03392 * Math.cos((viewport.latitude * Math.PI) / 180)) / Math.pow(2, viewport.zoom);

return metersPerPixel * (pointerDownScreenCoords[1] - screenCoords[1]);
return (metersPerPixel * (pointerDownScreenCoords[1] - screenCoords[1])) / 2;
}
}

0 comments on commit bcf9cd9

Please sign in to comment.