Once we request the coordinates. How do we know that the location is in New York or LA? Or neither?
How do we calculate it?
I have no idea how to do it. Any help please
P.S.: Reverse Geocoding will convert the coordinate to name. But That is not my question. I am asking how do we know that this location is within a city or not? Is it by comparing string generated by the reverse geocoding, cause it sounds "error prone" to me
What you're looking for is called reverse geocoding. Look at the CLGeocoder class and the
reverseGeocodeLocation:completionHandler:method.