A lightweight JavaScript library for identifying cities based on geographical coordinates and determining if provided coordinates match those of a city with high accuracy.
MIT License
A lightweight JavaScript library for identifying cities based on geographical coordinates and determining if provided coordinates match those of a city with high accuracy.
Add Geo City Finder
to your project with npm:
npm install geo-city-finder
Or use yarn:
yarn add geo-city-finder
import { getCoordinatesMatch } from 'geo-city-finder';
// Find if is user from current city
const cityCoordinates = {
accuracy: 2546.076925492267,
latitude: 40.1872,
longitude: 44.5152,
};
getCoordinatesMatch(cityCoordinates).then((result) => {
// Compares user coordinates with city coordinates...
console.log(result); // true or false
});
Got ideas or found a bug? We appreciate your contributions! Here's how you can get involved:
Open an Issue: If you have a new feature idea, want to report a bug, or have a general question, open an issue.
Send a Pull Request (PR): Contributions are welcome! If you'd like to contribute code, follow these steps:
Licensed under the MIT License.
Made with ❤️ by Albert Arakelyan