IOS – Getting coordinates for frequent locations


In iOS, if “system services” are active in privacy, my “frequent locations” are recorded, but I can only see, for each of them, a fragment of a map and a quite generic description: the name of a road, for instance, which is less than useful for a long, out-of-town road without specific nearby points of reference. Is there a way to get more useful data, such as latitude and longitude?

Best Answer

There is nothing directly on the iOS device to provide the coordinates. Through the iOS developer sdk you can access the CLVisit class which has the following properties:

coordinate- which will give you the geographic coordinates horizontalAccuracy- gives the horizontal accuracy of the above coordinates arrivalDate- date arrived to location departureDate- date departed location

There is also a CLFloor class which has the following property

level- which will give you a value for the floor. 0 bring ground floor, 2 being 2 floors above the ground floor, etc.