Saturday 18 May 2019

Suggestion needed: Node.js geocoding

My Node.js webservice is hosted on Heroku with Postgres DB. I have user profiles table on it with {latitude, longitude} as the user's location.Problem: I have to fetch nearby places (10 miles) when a device shares its location (as zipcode or latitude-and-longitude).The help/suggestion I need is about this:This REST API https://www.zipcodeapi.com/API#radius returns zipcodes with in 10 miles radius from a given zipcode. (This API does not take latitude and longitudes as inputs which is a problem)​Is it good a architecture design or right thing to do if I call above external API and fetch all the zipcodes and then build a query SELECT usernames from MYTABLE where zipcodes in {RESULT_OF_API} and fetch the info from DB and return response to the device/browser?​Please suggest me better APIs to do this. I have checked Google API, but I did not come across an API that returns zipcodes with in 10 miles or similar. Please suggest.

Submitted May 18, 2019 at 05:13PM by yoyochuck

No comments:

Post a Comment