Gcoord is a lightweight JavaScript library for transforming coordinates between common web map coordinate reference systems.
The tool solves the problem of coordinate system incompatibility across different map providers. GPS devices, Baidu Maps, AMap, Google China Maps, and other services use different coordinate reference systems, making it difficult to display location data consistently across platforms. Gcoord normalizes these coordinates by providing a transform function that converts between WGS-84, GCJ-02, BD-09, and other supported systems. It accepts coordinate arrays and GeoJSON objects as input, with the return type matching the input type. The library has no runtime dependencies and works in Node.js, modern browsers, and React Native, with a browser build of approximately 3 KB after gzip compression.
Developers should choose this tool when building map applications that need to work with coordinates from multiple sources or display data on different map providers. It suits projects ranging from simple coordinate conversion utilities to complex mapping applications that aggregate location data from various services. The README includes a legal notice emphasizing compliance with local regulations regarding map data usage, particularly relevant for applications operating in jurisdictions with surveying and mapping restrictions.
The project maintains a focused scope on coordinate transformation without expanding into broader mapping functionality. Development activity shows consistent attention to the core use case of supporting multiple coordinate reference systems through a straightforward API.