summaryrefslogtreecommitdiff
path: root/platform/macos/src
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2017-05-30 15:14:00 -0700
committerGitHub <noreply@github.com>2017-05-30 15:14:00 -0700
commita39116a552bbb7b77f2946b5931944c7065d818e (patch)
tree48b7a9cb7eff236af236c9d879cf13a4aeebc08e /platform/macos/src
parent608fd66ab833937671a52d1366caf11a23f7c457 (diff)
downloadqtlocation-mapboxgl-a39116a552bbb7b77f2946b5931944c7065d818e.tar.gz
Migrate to GL JS–powered feedback form (#9078)
* [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
Diffstat (limited to 'platform/macos/src')
-rw-r--r--platform/macos/src/MGLMapView.mm15
1 files changed, 10 insertions, 5 deletions
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];
}