GoogleNavigation Framework Reference
Stay organized with collections
Save and categorize content based on your preferences.
GMSGeometryIsLocationOnPathTolerance
extern BOOL GMSGeometryIsLocationOnPathTolerance(CLLocationCoordinate2D point,
GMSPath *_Nonnull path,
BOOL geodesic,
CLLocationDistance tolerance)
Returns whether point
lies on or near path
, within the specified tolerance
in meters.
path
is composed of great circle segments if geodesic
is YES, and of rhumb (loxodromic)
segments if geodesic
is NO.
See also GMSGeometryIsLocationOnPath(point, path, geodesic)
.
The tolerance, in meters, is relative to the spherical radius of the Earth. If you need to work
on a sphere of different radius, you may compute the equivalent tolerance from the desired
tolerance on the sphere of radius R: tolerance = toleranceR * (RadiusEarth / R), with
RadiusEarth==6371009.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-27 UTC.
[null,null,["Last updated 2025-08-27 UTC."],[[["\u003cp\u003eDetermines if a given location (\u003ccode\u003epoint\u003c/code\u003e) is on or near a specified path (\u003ccode\u003epath\u003c/code\u003e) within a certain distance tolerance.\u003c/p\u003e\n"],["\u003cp\u003eThe path can be composed of great circle segments (for geodesic calculations) or rhumb segments (for non-geodesic calculations).\u003c/p\u003e\n"],["\u003cp\u003eThe tolerance value, representing the acceptable distance from the path, is in meters and relative to the Earth's radius.\u003c/p\u003e\n"],["\u003cp\u003eOffers flexibility for calculations on spheres with different radii by adjusting the tolerance accordingly.\u003c/p\u003e\n"]]],[],null,["# GoogleNavigation Framework Reference\n\nGMSGeometryIsLocationOnPathTolerance\n====================================\n\n extern BOOL GMSGeometryIsLocationOnPathTolerance(CLLocationCoordinate2D point,\n ../Classes/GMSPath.html *_Nonnull path,\n BOOL geodesic,\n CLLocationDistance tolerance)\n\nReturns whether `point` lies on or near `path`, within the specified `tolerance` in meters.\n`path` is composed of great circle segments if `geodesic` is YES, and of rhumb (loxodromic)\nsegments if `geodesic` is NO.\n\nSee also `GMSGeometryIsLocationOnPath(point, path, geodesic)`.\n\nThe tolerance, in meters, is relative to the spherical radius of the Earth. If you need to work\non a sphere of different radius, you may compute the equivalent tolerance from the desired\ntolerance on the sphere of radius R: tolerance = toleranceR \\* (RadiusEarth / R), with\nRadiusEarth==6371009."]]