t×tecexpressby TeKOcloud
DEv0.7.1
API & types / VUE

txProject.

Projects geographic coordinates to Web Mercator world pixels at a given zoom; clamps latitude to about ±85.05°.

Parameters: point with lat/lng in degrees and zoom. Synchronous return: { x, y } in Vue, Offset in Dart; world pixels, not pixels relative to the visible viewport.

ts
function txProject(point: TxCoordinate, zoom: number): { x: number; y: number; }
ts
import { txProject } from '@tekocloud.de/tecexpress'
const pixel = txProject({ lat: 52.52, lng: 13.405 }, 5)
console.log(pixel.x, pixel.y)