geohernaydesh
v1.0.0
Published
Wher i am?
Downloads
2
Readme
Geocoding API
A simple geocoding API package for Node.js. Uses the Google Maps Geocoding API to convert addresses to latitude/longitude coordinates.
Installation
To install the package, run the following command:
Usage
To use the geocoding API, you'll need to obtain a Google Maps API key and replace YOUR_API_KEY in the code with your key. You can obtain a free API key by following the instructions in the Google Maps Platform documentation.
Once you have your API key, you can use the geocode function to convert addresses to latitude/longitude coordinates:
const geocodingApi = require('geocoding-api');
geocodingApi.geocode('1600 Amphitheatre Parkway, Mountain View, CA')
.then(location => {
console.log(location);
// Output: { lat: 37.4224084, lng: -122.0856085 }
})
.catch(error => {
console.error(error);
});#� �f�e�b�i�n�o�c�i�9�8�
�
�