Reputation: 696
In my react app I need to convert street address into latitude and longitude. Also, it is demo project, so I am really looking for cost-free solution.
Any suggestions?
Thx in advance
Upvotes: 2
Views: 20097
Reputation: 696
UPDATE:
I menaged to solve this problem with this package: react-geocode
Make new project on: https://console.developers.google.com
Enable Api: Geocoding API
Install npm package: npm install --save react-geocode
And follow the code instructions on: https://www.npmjs.com/package/react-geocode
It turned out to be really simple stuff
Upvotes: 4
Reputation: 748
What you want to do is called reverse geocoding. A quick google search brings up this library for react. It's very simple to learn and use:
https://www.npmjs.com/package/react-geocode
Upvotes: 3