From a39116a552bbb7b77f2946b5931944c7065d818e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguy=E1=BB=85n?= Date: Tue, 30 May 2017 15:14:00 -0700 Subject: =?UTF-8?q?Migrate=20to=20GL=20JS=E2=80=93powered=20feedback=20for?= =?UTF-8?q?m=20(#9078)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [ios, macos] Updated feedback URL * [ios, macos] Add referrer, heading, pitch to feedback URL * [ios, macos] Updated changelogs for feedback changes * [ios] Vary referrer by platform --- platform/macos/src/MGLMapView.mm | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'platform/macos/src/MGLMapView.mm') diff --git a/platform/macos/src/MGLMapView.mm b/platform/macos/src/MGLMapView.mm index a36766b745..3e91a6c5a5 100644 --- a/platform/macos/src/MGLMapView.mm +++ b/platform/macos/src/MGLMapView.mm @@ -1,17 +1,18 @@ #import "MGLMapView_Private.h" -#import "MGLAnnotationImage_Private.h" + #import "MGLAttributionButton.h" -#import "MGLAttributionInfo.h" #import "MGLCompassCell.h" #import "MGLOpenGLLayer.h" #import "MGLStyle.h" +#import "MGLAnnotationImage_Private.h" +#import "MGLAttributionInfo_Private.h" #import "MGLFeature_Private.h" +#import "MGLFoundation_Private.h" #import "MGLGeometry_Private.h" #import "MGLMultiPoint_Private.h" #import "MGLOfflineStorage_Private.h" #import "MGLStyle_Private.h" -#import "MGLFoundation_Private.h" #import "MGLAccountManager.h" #import "MGLMapCamera.h" @@ -1735,11 +1736,15 @@ public: } - (IBAction)giveFeedback:(id)sender { - CLLocationCoordinate2D centerCoordinate = self.centerCoordinate; + MGLMapCamera *camera = self.camera; double zoomLevel = self.zoomLevel; NSMutableArray *urls = [NSMutableArray array]; for (MGLAttributionInfo *info in [self.style attributionInfosWithFontSize:0 linkColor:nil]) { - NSURL *url = [info feedbackURLAtCenterCoordinate:centerCoordinate zoomLevel:zoomLevel]; + NSURL *url = [info feedbackURLForStyleURL:self.styleURL + atCenterCoordinate:camera.centerCoordinate + zoomLevel:zoomLevel + direction:camera.heading + pitch:camera.pitch]; if (url) { [urls addObject:url]; } -- cgit v1.2.1 From 92157762cf501c9b96de2d1c6d384cb8633c554b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Minh=20Nguye=CC=82=CC=83n?= Date: Wed, 28 Jun 2017 22:47:30 -0700 Subject: [macos] Fixed cursor shifting after drag gesture When redisplaying the mouse cursor after a modified drag gesture, incorporate the conversion from view coordinates to window coordinates. Previously, this code performed the conversion but threw away the results. Fixes #8670. --- platform/macos/src/MGLMapView.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'platform/macos/src/MGLMapView.mm') diff --git a/platform/macos/src/MGLMapView.mm b/platform/macos/src/MGLMapView.mm index 3e91a6c5a5..1908a46cf9 100644 --- a/platform/macos/src/MGLMapView.mm +++ b/platform/macos/src/MGLMapView.mm @@ -1369,7 +1369,7 @@ public: // Move the cursor back to the start point and show it again, creating // the illusion that it has stayed in place during the entire gesture. CGPoint cursorPoint = [self convertPoint:startPoint toView:nil]; - cursorPoint = [self.window convertRectToScreen:{ startPoint, NSZeroSize }].origin; + cursorPoint = [self.window convertRectToScreen:{ cursorPoint, NSZeroSize }].origin; cursorPoint.y = self.window.screen.frame.size.height - cursorPoint.y; CGDisplayMoveCursorToPoint(kCGDirectMainDisplay, cursorPoint); CGDisplayShowCursor(kCGDirectMainDisplay); -- cgit v1.2.1