Skip to content

Projections and bounding boxes

The public TypeScript renderer expects the BBOX as four Web Mercator values:

minX,minY,maxX,maxY

That is west, south, east, north in EPSG:3857, for example:

238138.090518,6238073.596726,264358.090923,6264293.626065

Validate before sending

  • Supply exactly four finite numeric values.
  • Ensure minX < maxX and minY < maxY.
  • Use the same CRS for all four values.
  • Preserve enough decimal precision for the required extent.
  • Confirm that the BBOX aspect ratio agrees with the requested width and height, or expect fitting/cropping effects.

Converting longitude and latitude

Transform EPSG:4326 coordinates to EPSG:3857 with a well-tested geospatial library. Do not relabel longitude/latitude degrees as Web Mercator metres.

When the geographic area crosses the antimeridian or approaches the Web Mercator latitude limit, test the exact renderer behavior rather than assuming a conventional rectangular extent.

Rust renderer

The newer Rust implementation accepts an optional epsg parameter, defaults it to 3857, and uses PROJ to transform the BBOX corners to EPSG:4326 before fitting the map. This is experimental implementation behavior and is not yet part of the public TypeScript request contract.