This project is a Google Maps API aggregator that accepts CSV or XLSX files and queries the Google Maps API for the latitude, longitude, and Google Maps URL of each address. Please note that this project is still in development and is not yet ready for production.
- Accepts CSV or XLSX files with addresses
- Queries the Google Maps API for each address
- Returns the latitude, longitude, and Google Maps URL for each address
- Clone this repository:
git clone https://github.com/c4lyp5o/maps-aggregator.git
- Install the required packages:
yarn install
- Create a
.env
file in the root of the project with the following content:
GEOCODE_API_KEY=your_api_key
Replace your_api_key
with your Google Maps API key.
- Run the project:
yarn start
To use this API aggregator, send a GET request to the /geocode endpoint with the alamat, daerah, and negeri query parameters. For example:
GET /geocode?alamat=Jalan+PJS+11%2F28&daerah=Bandar+Sunway&negeri=Selangor
This server will respond with a JSON object containing the latitude, longitude, and Google Maps URL for the address:
{
"latitude": 3.0757,
"longitude": 101.6043,
"googleMapsUrl": "https://www.google.com/maps/search/?api=1&query=3.0757,101.6043"
}
To contribute to this project, follow these steps:
- Fork this repository.
- Create a branch:
git checkout -b <branch_name>
. - Make your changes and commit them:
git commit -m '<commit_message>'
. - Push to the original branch:
git push origin <project_name>/<location>
. - Create the pull request.
This project uses the following license: MIT.