Convert altitude and latitude to zoom

PHOTO EMBED

Fri Apr 23 2021 12:45:22 GMT+0000 (Coordinated Universal Time)

Saved by @ilyazub #webscraping #serpapi #googlemaps #deobfuscation #reverse-engineering #javascript

const EARTH_RADIUS_IN_METERS = 6371010
const TILE_SIZE = 256
const SCREEN_PIXEL_HEIGHT = 768

var zoom = (altitude, latitude) => Math.log(1 / Math.tan(Math.PI / 180 * 13.1 / 2) * (SCREEN_PIXEL_HEIGHT / 2) * 2 * Math.PI / (TILE_SIZE * altitude / (EARTH_RADIUS_IN_METERS * Math.cos(Math.PI / 180 * latitude)))) / Math.LN2;
content_copyCOPY