diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2017-04-03 11:51:06 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2017-04-06 09:22:51 -0700 |
commit | 391a10db0e599f970c989b2db5c6b2dc04597206 (patch) | |
tree | c8512fc1348639425393f092c0d8aa4309b955b5 /platform/darwin | |
parent | 0314a46ee411b97810d49908ab110bbef049e7b7 (diff) | |
download | qtlocation-mapboxgl-391a10db0e599f970c989b2db5c6b2dc04597206.tar.gz |
[darwin] Use MGLLatLngFromLocationCoordinate2D where appropriate
Diffstat (limited to 'platform/darwin')
-rw-r--r-- | platform/darwin/src/MGLMapCamera.mm | 5 | ||||
-rw-r--r-- | platform/darwin/src/MGLMultiPoint.mm | 2 | ||||
-rw-r--r-- | platform/darwin/src/MGLPointCollection.mm | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/platform/darwin/src/MGLMapCamera.mm b/platform/darwin/src/MGLMapCamera.mm index 613124da66..ecac2892b1 100644 --- a/platform/darwin/src/MGLMapCamera.mm +++ b/platform/darwin/src/MGLMapCamera.mm @@ -1,4 +1,5 @@ #import "MGLMapCamera.h" +#import "MGLGeometry_Private.h" #include <mbgl/util/projection.hpp> @@ -23,8 +24,8 @@ BOOL MGLEqualFloatWithAccuracy(CGFloat left, CGFloat right, CGFloat accuracy) fromEyeCoordinate:(CLLocationCoordinate2D)eyeCoordinate eyeAltitude:(CLLocationDistance)eyeAltitude { - mbgl::LatLng centerLatLng = mbgl::LatLng(centerCoordinate.latitude, centerCoordinate.longitude); - mbgl::LatLng eyeLatLng = mbgl::LatLng(eyeCoordinate.latitude, eyeCoordinate.longitude); + mbgl::LatLng centerLatLng = MGLLatLngFromLocationCoordinate2D(centerCoordinate); + mbgl::LatLng eyeLatLng = MGLLatLngFromLocationCoordinate2D(eyeCoordinate); mbgl::ProjectedMeters centerMeters = mbgl::Projection::projectedMetersForLatLng(centerLatLng); mbgl::ProjectedMeters eyeMeters = mbgl::Projection::projectedMetersForLatLng(eyeLatLng); diff --git a/platform/darwin/src/MGLMultiPoint.mm b/platform/darwin/src/MGLMultiPoint.mm index 8e8c5be304..4ab4ceb007 100644 --- a/platform/darwin/src/MGLMultiPoint.mm +++ b/platform/darwin/src/MGLMultiPoint.mm @@ -163,7 +163,7 @@ if (!_bounds) { mbgl::LatLngBounds bounds = mbgl::LatLngBounds::empty(); for (auto coordinate : _coordinates) { - bounds.extend(mbgl::LatLng(coordinate.latitude, coordinate.longitude)); + bounds.extend(MGLLatLngFromLocationCoordinate2D(coordinate)); } _bounds = bounds; } diff --git a/platform/darwin/src/MGLPointCollection.mm b/platform/darwin/src/MGLPointCollection.mm index ac4aaed60c..d8f0f0d3dc 100644 --- a/platform/darwin/src/MGLPointCollection.mm +++ b/platform/darwin/src/MGLPointCollection.mm @@ -54,7 +54,7 @@ NS_ASSUME_NONNULL_BEGIN if (!_bounds) { mbgl::LatLngBounds bounds = mbgl::LatLngBounds::empty(); for (auto coordinate : _coordinates) { - bounds.extend(mbgl::LatLng(coordinate.latitude, coordinate.longitude)); + bounds.extend(MGLLatLngFromLocationCoordinate2D(coordinate)); } _bounds = bounds; } |