Skip to content

Instantly share code, notes, and snippets.

View bolatuly's full-sized avatar
😀

Bolat Azamat bolatuly

😀
  • Almaty, Kazakhstan
  • 20:34 (UTC +05:00)
View GitHub Profile
@bolatuly
bolatuly / transform_4326_3857.js
Created March 2, 2021 08:09
transform epsg:4326 <=> epsg:3857
/**
* epsg:3857 <=> epsg:4326
* https://wiki.openstreetmap.org/wiki/Mercator
*/
const EARTH_RADIUS = 6378137; //equatorial radius in m
function degree_to_radian(a) {
return a / (180 / Math.PI);
}