diff options
author | Asheem Mamoowala <asheem.mamoowala@mapbox.com> | 2018-04-05 18:57:54 -0700 |
---|---|---|
committer | Asheem Mamoowala <asheem.mamoowala@mapbox.com> | 2018-04-05 19:01:45 -0700 |
commit | 1052ef3ce82a6f231bdb5cce79ec387437128275 (patch) | |
tree | 528dddb10cfe34467d42c499819c7e2b10ac320b /platform/darwin/src/MGLGeometry.mm | |
parent | cc01781db7281032f8c0c5eae54281187522a861 (diff) | |
download | qtlocation-mapboxgl-upstream/changelog-custom-layer.tar.gz |
Change MGLMapPointMake to MGLMapPointForCoordinateupstream/changelog-custom-layer
Diffstat (limited to 'platform/darwin/src/MGLGeometry.mm')
-rw-r--r-- | platform/darwin/src/MGLGeometry.mm | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/platform/darwin/src/MGLGeometry.mm b/platform/darwin/src/MGLGeometry.mm index 63886b6474..0b044f7521 100644 --- a/platform/darwin/src/MGLGeometry.mm +++ b/platform/darwin/src/MGLGeometry.mm @@ -107,11 +107,7 @@ CGPoint MGLPointRounded(CGPoint point) { return CGPointMake(round(point.x * scaleFactor) / scaleFactor, round(point.y * scaleFactor) / scaleFactor); } -MGLMapPoint MGLMapPointMake(CLLocationCoordinate2D coordinate, double zoomLevel) { +MGLMapPoint MGLMapPointForCoordinate(CLLocationCoordinate2D coordinate, double zoomLevel) { mbgl::Point<double> projectedCoordinate = mbgl::Projection::project(MGLLatLngFromLocationCoordinate2D(coordinate), std::pow(2.0, zoomLevel)); - MGLMapPoint point; - point.x = projectedCoordinate.x; - point.y = projectedCoordinate.y; - point.zoomLevel = zoomLevel; - return point; + return MGLMapPointMake(projectedCoordinate.x, projectedCoordinate.y, zoomLevel); } |