summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLGeometry.h
diff options
context:
space:
mode:
authorJosh Erb <josh.erb@mapbox.com>2018-10-30 18:03:56 -0400
committerJosh Erb <josh.erb@mapbox.com>2018-11-12 14:45:30 -0800
commit271b78c1309dd9391e9fc315e9d9873381f5999d (patch)
tree9c195e582180898f977eb7e4eb6a22a1178f4444 /platform/darwin/src/MGLGeometry.h
parenta3945bf84004ece5116861266a73a60d67beebbe (diff)
downloadqtlocation-mapboxgl-upstream/je-ios-example-links.tar.gz
[ios][documentation] link API documentation to ios-sdk/examplesupstream/je-ios-example-links
Diffstat (limited to 'platform/darwin/src/MGLGeometry.h')
-rw-r--r--platform/darwin/src/MGLGeometry.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/platform/darwin/src/MGLGeometry.h b/platform/darwin/src/MGLGeometry.h
index c3450359aa..997ff285e2 100644
--- a/platform/darwin/src/MGLGeometry.h
+++ b/platform/darwin/src/MGLGeometry.h
@@ -146,7 +146,15 @@ NS_INLINE BOOL MGLCoordinateBoundsIntersectsCoordinateBounds(MGLCoordinateBounds
bounds1.sw.longitude < bounds2.ne.longitude);
}
-/** Returns `YES` if the coordinate is within the coordinate bounds. */
+/**
+ Returns `YES` if the coordinate is within the coordinate bounds.
+
+ #### Related examples
+ See the <a href="https://www.mapbox.com/ios-sdk/maps/examples/constraining-gestures/">
+ Restrict map panning to an area</a> example to learn how to use
+ `MGLCoordinateInCoordinateBounds` to determine if a point is within, or
+ intersects, a given bounding box.
+ */
NS_INLINE BOOL MGLCoordinateInCoordinateBounds(CLLocationCoordinate2D coordinate, MGLCoordinateBounds bounds) {
return (coordinate.latitude >= bounds.sw.latitude &&
coordinate.latitude <= bounds.ne.latitude &&