summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinh Nguyễn <mxn@1ec5.org>2017-01-08 18:07:56 -0800
committerMinh Nguyễn <mxn@1ec5.org>2017-01-09 09:09:47 -0800
commit2b61880b579b8ab0015bf15bf225f0807ed0306d (patch)
tree67de765dd721f3114716ab22eafc73d73228d1a0
parente162d4f4c80989bf369e3471ee7f55c72f364b03 (diff)
downloadqtlocation-mapboxgl-2b61880b579b8ab0015bf15bf225f0807ed0306d.tar.gz
[macos] Include pitch in shared URL
-rw-r--r--platform/macos/app/MapDocument.m7
1 files changed, 4 insertions, 3 deletions
diff --git a/platform/macos/app/MapDocument.m b/platform/macos/app/MapDocument.m
index 8554772af3..57efda1b2d 100644
--- a/platform/macos/app/MapDocument.m
+++ b/platform/macos/app/MapDocument.m
@@ -146,11 +146,12 @@ NS_ARRAY_OF(id <MGLAnnotation>) *MBXFlattenedShapes(NS_ARRAY_OF(id <MGLAnnotatio
- (NSURL *)shareURL {
NSArray *components = self.mapView.styleURL.pathComponents;
- CLLocationCoordinate2D centerCoordinate = self.mapView.centerCoordinate;
+ MGLMapCamera *camera = self.mapView.camera;
return [NSURL URLWithString:
- [NSString stringWithFormat:@"https://api.mapbox.com/styles/v1/%@/%@.html?access_token=%@#%.2f/%.5f/%.5f/%.f",
+ [NSString stringWithFormat:@"https://api.mapbox.com/styles/v1/%@/%@.html?access_token=%@#%.2f/%.5f/%.5f/%.f/%.f",
components[1], components[2], [MGLAccountManager accessToken],
- self.mapView.zoomLevel, centerCoordinate.latitude, centerCoordinate.longitude, self.mapView.direction]];
+ self.mapView.zoomLevel, camera.centerCoordinate.latitude, camera.centerCoordinate.longitude,
+ camera.heading, camera.pitch]];
}
#pragma mark View methods