Created
April 20, 2020 05:44
-
-
Save blaurt/06d08052232888601ce2d70dad99a803 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const x = (longitude + 180) * (mapWidth / 360); | |
const latRad = (latitude * Math.PI) / 180; | |
const mercN = Math.log(Math.tan(Math.PI / 4 + latRad / 2)); | |
const y = mapHeight / 2 - (mapWidth * mercN) / (2 * Math.PI); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment