You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**`PolyUtil::containsLocation(LatLng point, LatLngList polygon, bool geodesic = false)`** - Computes whether the given point lies inside the specified polygon
116
+
**`PolyUtil::containsLocation(const LatLng& point, const LatLngList& polygon, bool geodesic = false)`** - Computes whether the given point lies inside the specified polygon
117
117
118
118
*`point` - a point in geographical coordinates: latitude and longitude
119
119
*`polygon` - a series of connected coordinates in an ordered sequence
120
120
*`geodesic` - the polyline is composed of great circle segments if geodesic is true, and of Rhumb segments otherwise
121
121
122
-
Return value: `boolean` - whether the given point lies inside the specified polygon
122
+
Return value: `bool` - whether the given point lies inside the specified polygon
**`PolyUtil::isLocationOnEdge(LatLng point, LatLngList polygon, double tolerance = PolyUtil::DEFAULT_TOLERANCE, bool geodesic = true)`** - Computes whether the given point lies on or near to a polyline, or the edge of a polygon, within a specified tolerance. Returns true when the difference between the latitude and longitude of the supplied point, and the closest point on the edge, is less than the tolerance. The tolerance defaults to `0.1` meters.
135
+
**`PolyUtil::isLocationOnEdge(const LatLng& point, const LatLngList& polygon, double tolerance = PolyUtil::DEFAULT_TOLERANCE, bool geodesic = true)`** - Computes whether the given point lies on or near to a polyline, or the edge of a polygon, within a specified tolerance. Returns true when the difference between the latitude and longitude of the supplied point, and the closest point on the edge, is less than the tolerance. The tolerance defaults to `0.1` meters.
136
136
137
137
* `point` - a point in geographical coordinates: latitude and longitude
138
138
* `polygon` - a series of connected coordinates in an ordered sequence
139
139
* `tolerance` - tolerance value in meters
140
140
* `geodesic` - the polyline is composed of great circle segments if geodesic is true, and of Rhumb segments otherwise
141
141
142
-
Return value: `boolean` - whether the given point lies on or near the edge of a polygon
142
+
Return value: `bool` - whether the given point lies on or near the edge of a polygon
**`PolyUtil::isLocationOnPath(LatLng point, LatLngList polyline, double tolerance = PolyUtil::DEFAULT_TOLERANCE, bool geodesic = true)`** - Computes whether the given point lies on or near a polyline, within a specified tolerance in meters. The polyline is composed of great circle segments if geodesic is true, and of Rhumb segments otherwise. The polyline is not closed -- the closing segment between the first point and the last point is not included.
158
+
**`PolyUtil::isLocationOnPath(const LatLng& point, const LatLngList& polyline, double tolerance = PolyUtil::DEFAULT_TOLERANCE, bool geodesic = true)`** - Computes whether the given point lies on or near a polyline, within a specified tolerance in meters. The polyline is composed of great circle segments if geodesic is true, and of Rhumb segments otherwise. The polyline is not closed -- the closing segment between the first point and the last point is not included.
159
159
160
160
*`point` - a point in geographical coordinates: latitude and longitude
161
161
*`polygon` - a series of connected coordinates in an ordered sequence
162
162
*`tolerance` - tolerance value in meters
163
163
*`geodesic` - the polyline is composed of great circle segments if geodesic is true, and of Rhumb segments otherwise
164
164
165
-
Return value: `boolean` - whether the point lies on or near a polyline
165
+
Return value: `bool` - whether the point lies on or near a polyline
**`PolyUtil::distanceToLine(LatLng p, LatLng start, LatLng end)`** - Computes the distance on the sphere between the point p and the line segment start to end.
181
+
**`PolyUtil::distanceToLine(const LatLng& p, const LatLng& start, const LatLng& end)`** - Computes the distance on the sphere between the point p and the line segment start to end.
**`SphericalUtil::computeHeading(LatLng from, LatLng to)`** - Returns the heading from one LatLng to another LatLng. Headings are expressed in degrees clockwise from North within the range [-180,180).
200
+
**`SphericalUtil::computeHeading(const LatLng& from, const LatLng& to)`** - Returns the heading from one LatLng to another LatLng. Headings are expressed in degrees clockwise from North within the range [-180,180).
201
201
202
202
*`from` - a point in geographical coordinates: latitude and longitude
203
203
*`to` - a point in geographical coordinates: latitude and longitude
**`computeOffset(LatLng from, double distance, double heading)`** - Returns the LatLng resulting from moving a distance from an origin in the specified heading (expressed in degrees clockwise from north).
218
+
**`SphericalUtil::computeOffset(const LatLng& from, double distance, double heading)`** - Returns the LatLng resulting from moving a distance from an origin in the specified heading (expressed in degrees clockwise from north).
219
219
220
220
* `from` - the LatLng from which to start.
221
221
* `distance` - the distance to travel.
@@ -236,7 +236,7 @@ auto back = SphericalUtil::computeOffset(front, M_PI * MathUtil::EARTH_RADIUS,
236
236
---
237
237
238
238
<aname="computeOffsetOrigin"></a>
239
-
**`computeOffsetOrigin(LatLng to, double distance, double heading)`** - Returns the location of origin when provided with a LatLng destination, meters travelled and original heading. Headings are expressed in degrees clockwise from North.
239
+
**`SphericalUtil::computeOffsetOrigin(const LatLng& to, double distance, double heading)`** - Returns the location of origin when provided with a LatLng destination, meters travelled and original heading. Headings are expressed in degrees clockwise from North.
**`interpolate(LatLng from, LatLng to, double fraction)`** - Returns the LatLng which lies the given fraction of the way between the origin LatLng and the destination LatLng.
261
+
**`SphericalUtil::interpolate(const LatLng& from, const LatLng& to, double fraction)`** - Returns the LatLng which lies the given fraction of the way between the origin LatLng and the destination LatLng.
**`computeSignedArea(LatLngList path)`** - Returns the signed area of a closed path on Earth. The sign of the area may be used to determine the orientation of the path. "inside" is the surface that does not contain the South Pole.
336
+
**`SphericalUtil::computeSignedArea(const LatLngList& path)`** - Returns the signed area of a closed path on Earth. The sign of the area may be used to determine the orientation of the path. "inside" is the surface that does not contain the South Pole.
337
337
338
338
* `path` - a closed path. Any iterable containers.
0 commit comments