how to do location based search

后端 未结 3 1694
旧巷少年郎
旧巷少年郎 2020-12-11 20:52

I need to develop a solution that will provide the ability for a user to search based on a city and state. The user should have the ability to request that the search result

3条回答
  •  北海茫月
    2020-12-11 21:13

    You'll want to start with a database of cities, states and zip codes with their corresponding latitude and longitude. Here's a link to a site where you can download such a database for free.

    Next you'll need an algorithm to find which cities/zip codes are within an X mile radius of the city/zip the person entered. Here's another link that should explain how to do that.

提交回复
热议问题