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.h | |
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.h')
-rw-r--r-- | platform/darwin/src/MGLGeometry.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/platform/darwin/src/MGLGeometry.h b/platform/darwin/src/MGLGeometry.h index 5d8e7eccd5..6d1a373cca 100644 --- a/platform/darwin/src/MGLGeometry.h +++ b/platform/darwin/src/MGLGeometry.h @@ -36,6 +36,17 @@ NS_INLINE MGLCoordinateSpan MGLCoordinateSpanMake(CLLocationDegrees latitudeDelt } /** + Creates a new `MGLMapPoint` from the given X and Y coordinates, and zoom level. + */ +NS_INLINE MGLMapPoint MGLMapPointMake(CGFloat x, CGFloat y, CGFloat zoomLevel) { + MGLMapPoint point; + point.x = x; + point.y = y; + point.zoomLevel = zoomLevel; + return point; +} + +/** Returns `YES` if the two coordinate spans represent the same latitudinal change and the same longitudinal change. */ @@ -192,6 +203,6 @@ NS_INLINE CLLocationDegrees MGLDegreesFromRadians(CGFloat radians) { } /** Returns Mercator projection of a WGS84 coordinate at the specified zoom level. */ -extern MGL_EXPORT MGLMapPoint MGLMapPointMake(CLLocationCoordinate2D coordinate, double zoomLevel); +extern MGL_EXPORT MGLMapPoint MGLMapPointForCoordinate(CLLocationCoordinate2D coordinate, double zoomLevel); NS_ASSUME_NONNULL_END |