-2

I am working on an app that tracks user location and makes a route on google map. I am providing a google map polyline to travel on that. currently, I want to know that user is travelling on provided polyline(route) or not. So I need to compare provided polyline(route) and user traveling polyline(route).

Please help me to find a solution for this. Thanks in advance.

1 Answers1

1

I think, u need to check whether the user coordinate is in gmspolyline or not. For that you can use GMSGeometryContainsLocation (CLLocationCoordinate2D point, GMSPath *path, BOOL geodesic)

U just pass GMSpath and Coordinate of user, it return BOOL yes, if user coordinate is in GMSpath

Maharajan S
  • 93
  • 10