Skip to content

Commit

Permalink
Update martin-tile-utils/src/lib.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
nyurik committed Dec 16, 2023
1 parent 2dfff7d commit 1bb848e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion martin-tile-utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ pub fn webmercator_to_wgs84(x: f64, y: f64) -> (f64, f64) {
pub fn wgs84_to_webmercator(lon: f64, lat: f64) -> (f64, f64) {
let x = EARTH_CIRCUMFERENCE / 360.0 * lon;
let y = ((90.0 + lat) * PI / 360.0).tan().ln() / (PI / 180.0);
let y = PI * 6_378_137.0 * y / 180.0;
let y = EARTH_CIRCUMFERENCE / 360.0 * y;
(x, y)
}

Expand Down

0 comments on commit 1bb848e

Please sign in to comment.