JavaScript Geodetic SDK

Build high-performance geographic applications with our lightweight JavaScript SDK, designed for both browser-based and server-side environments.

1. Installation (Browser)

Include our geodetic core via CDN or bundle it with your favorite build tool.

<script src="https://www.coordinate-converter.com/static/calculations.js"></script>

2. Basic Conversion

// Lat/Long to UTM const utm = window.LLtoUTM(40.7128, -74.0060); console.log(`Zone: ${utm.zoneNumber}${utm.zoneLetter}, E: ${utm.easting}`);

3. Proj4js Integration

For custom projections (EPSG), we recommend using the Proj4js library with our optimized coordinate reference strings.

import proj4 from 'proj4'; // Define WGS84 and British National Grid const wgs84 = "EPSG:4326"; const bng = "+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +datum=OSGB36 +units=m +no_defs"; const point = proj4(wgs84, bng, [-0.1278, 51.5074]);