summaryrefslogtreecommitdiff
path: root/platform/darwin/src/MGLGeometry_Private.h
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2016-05-31 17:34:11 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2016-06-01 17:37:01 -0700
commit0fba70d5a8465499b0dce900e5aa74f7189e4594 (patch)
tree7902b9bd29d25de0de6d116fc3245b1b269477f4 /platform/darwin/src/MGLGeometry_Private.h
parentcfd6757ecc9bd4d9b1f4c5266d19da48c529f58b (diff)
downloadqtlocation-mapboxgl-0fba70d5a8465499b0dce900e5aa74f7189e4594.tar.gz
[all] Rationalize annotation API
Diffstat (limited to 'platform/darwin/src/MGLGeometry_Private.h')
-rw-r--r--platform/darwin/src/MGLGeometry_Private.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/platform/darwin/src/MGLGeometry_Private.h b/platform/darwin/src/MGLGeometry_Private.h
index 0538cd94ea..fc57460128 100644
--- a/platform/darwin/src/MGLGeometry_Private.h
+++ b/platform/darwin/src/MGLGeometry_Private.h
@@ -6,6 +6,7 @@
#endif
#import <mbgl/util/geo.hpp>
+#import <mbgl/util/geometry.hpp>
/// Returns the smallest rectangle that contains both the given rectangle and
/// the given point.
@@ -15,6 +16,10 @@ NS_INLINE mbgl::LatLng MGLLatLngFromLocationCoordinate2D(CLLocationCoordinate2D
return mbgl::LatLng(coordinate.latitude, coordinate.longitude);
}
+NS_INLINE mbgl::Point<double> MGLPointFromLocationCoordinate2D(CLLocationCoordinate2D coordinate) {
+ return mbgl::Point<double>(coordinate.longitude, coordinate.latitude);
+}
+
NS_INLINE CLLocationCoordinate2D MGLLocationCoordinate2DFromLatLng(mbgl::LatLng latLng) {
return CLLocationCoordinate2DMake(latLng.latitude, latLng.longitude);
}