Skip to content

Instantly share code, notes, and snippets.

@elijahzarlin
Created July 18, 2019 17:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save elijahzarlin/c3a6adcc3d34cb732e7d0a486b635126 to your computer and use it in GitHub Desktop.
Save elijahzarlin/c3a6adcc3d34cb732e7d0a486b635126 to your computer and use it in GitHub Desktop.
const proj4 = require('proj4');
let pixel_position = [10, 20];
let geo_position = proj4('EPSG:3857', 'EPSG:4326',[
minLng + (maxLng - minLng) * (p[0] / w),
maxLat - (maxLat - minLat) * (p[1] / h)
]);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment