From cc01781db7281032f8c0c5eae54281187522a861 Mon Sep 17 00:00:00 2001 From: Asheem Mamoowala Date: Mon, 18 Dec 2017 17:11:43 -0800 Subject: [ios, macos] Projection Matrix and LatLng projection to Mercator methods --- platform/darwin/src/MGLOpenGLStyleLayer.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'platform/darwin/src/MGLOpenGLStyleLayer.h') diff --git a/platform/darwin/src/MGLOpenGLStyleLayer.h b/platform/darwin/src/MGLOpenGLStyleLayer.h index 0b494e8062..50d226457f 100644 --- a/platform/darwin/src/MGLOpenGLStyleLayer.h +++ b/platform/darwin/src/MGLOpenGLStyleLayer.h @@ -1,5 +1,6 @@ #import #import +#import #import "MGLFoundation.h" #import "MGLStyleValue.h" @@ -17,6 +18,7 @@ typedef struct MGLStyleLayerDrawingContext { CLLocationDirection direction; CGFloat pitch; CGFloat fieldOfView; + CATransform3D projectionMatrix; } MGLStyleLayerDrawingContext; MGL_EXPORT -- cgit v1.2.1 From 3d3b87e020b727d38c56d0c9aa357cf8d4f14951 Mon Sep 17 00:00:00 2001 From: Jason Wray Date: Mon, 16 Apr 2018 19:17:37 -0400 Subject: [ios] Fix type narrowing issue with MGLOpenGLStyleLayer projection matrix (#11664) `CATransform3D`'s matrix is internally typed as `CGFloat`, which we were implicitly casting to from `double`.... except that the `-Wc++11-narrowing` flag disallows implicit narrowing casts and we need `double` precision, anyway. * [ios, macos] Use MGLMatrix4 a 4x4 double matrix for MGLOpenGLStyleLayer projection matrix. * [ios, macos] Don't use union for MGLMatrix4 --- platform/darwin/src/MGLOpenGLStyleLayer.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'platform/darwin/src/MGLOpenGLStyleLayer.h') diff --git a/platform/darwin/src/MGLOpenGLStyleLayer.h b/platform/darwin/src/MGLOpenGLStyleLayer.h index 50d226457f..df8d2c5365 100644 --- a/platform/darwin/src/MGLOpenGLStyleLayer.h +++ b/platform/darwin/src/MGLOpenGLStyleLayer.h @@ -5,6 +5,7 @@ #import "MGLFoundation.h" #import "MGLStyleValue.h" #import "MGLStyleLayer.h" +#import "MGLGeometry.h" NS_ASSUME_NONNULL_BEGIN @@ -18,7 +19,7 @@ typedef struct MGLStyleLayerDrawingContext { CLLocationDirection direction; CGFloat pitch; CGFloat fieldOfView; - CATransform3D projectionMatrix; + MGLMatrix4 projectionMatrix; } MGLStyleLayerDrawingContext; MGL_EXPORT -- cgit v1.2.1