0
votes

I am developing a Map based iOS app in Objective C. Basically what I need to achieve is to get the details data of suggested location that is within 5 kilo meter to the current user location without using Google API. I have searched a lot but could not find any answer to my question.

I tried below links related to my problem but could not get satisfactory solution :

how to find nearest latitude and longitude form current place?

get nearest locations from my current location

http://api.geonames.org/findNearbyPlaceNameJSON?lat=12.9972&lng=77.6143&radius=5&username=demo

How to get the nearest area from a list of locations?

I want to know if there is some other good and efficient approach (free).

Thank You !

1

1 Answers

0
votes

If you have the coordinates of all the places you want to search from in database, then you can implement Haversine formula in sql query and this will return results within the specified distance as in your case 2km.Refer to this link for detailed information.