0

I am in the very early stages of creating a simple web-based tool for a client for internal use that can search their existing data of housing options based on certain criteria, one of which being distance from a given point. I will be using PHP and MySQL.

It's basically like an apartment locator.

The searching within a radius is the one thing I see that could pose a problem. I know this can be done easily if I had the lat/long coordinates already, but as it stands right now, I would have to convert all the addresses, and there are over 100.

The goal is to type in an address and return a list of properties X miles from that address.

Is there a way to do the lat/long conversion on the fly instead of converting all their existing property addresses to lat/long?

If I do need to do a batch conversion of addresses, so be it, but moving forward, is there a way to automate that when adding a new record?

Is there some kind of customizable apartment locator API I could use for this?

I'm not looking for any specific code, just need to be pointed in the right direction to figure out what I need to do to accomplish this.

AdamDallas
  • 67
  • 7
  • 2
    This is not how its done. You have to show us your code, and explain the error which you face. – shahsani Oct 15 '17 at 18:25
  • I would advice you to use something like the Google Maps API it has everything you need and more – SuperDJ Oct 15 '17 at 18:29
  • Use Google maps and geocode the address when you store it. Then use the haversine formula when you want to calculate on the display. https://stackoverflow.com/questions/574691/mysql-great-circle-distance-haversine-formula – chris85 Oct 15 '17 at 18:45

0 Answers0