-1

I have a list of lat/longs that represent the places I want to show on the Google Maps. How can I check which of these places are near my current location. Something like Near Me functionality that we generally see. I am using Google Maps SDK for iOS. Hope the question is clear now?

bytecode77
  • 14,163
  • 30
  • 110
  • 141
JDev
  • 15
  • 10

1 Answers1

2

Make sure that you have imported CoreLocation Framework

 CLLocation *locA = [[CLLocation alloc] initWithLatitude:lat1 longitude:long1];

 CLLocation *locB = [[CLLocation alloc] initWithLatitude:lat2 longitude:long2];

 CLLocationDistance distance = [locA distanceFromLocation:locB];

 //Distance in Meters
Ushan87
  • 1,608
  • 8
  • 15