Search code examples
node.jsgoogle-maps-api-3geocodinggoogle-geocoderfuzzy-search

Implementing geocoding of cities with my own DB or Google Maps API (or other solution)?


I would like to know what people recommend for geocoding city inputs from users. I am trying to get the Lat/Long of a city a user inputs. One option is to utilize an API with such a service, i.e. Google Maps. Another I was considering was creating my own DB with an online dataset of cities and build an api around it myself. I think fuzzy search capabilities would be a requirement. Are there any thoughts on what the best way to implement this would be, or is it better to just go with a robust existing API? I am building my web app with Express/NodeJS. Thanks for the help!


Solution

  • The best and easiest solution is to go with the Geocoding API from Google, since it is built having in mind the integration with other services from Google Maps.

    It has a very simple setup process, you just create your geocoder which you feed give the input which has passed through the autocomplete from Places

    Hope this helps! Best of luck!