diff options
author | John Firebaugh <john.firebaugh@gmail.com> | 2017-04-21 13:35:34 -0700 |
---|---|---|
committer | John Firebaugh <john.firebaugh@gmail.com> | 2017-06-22 08:04:39 -0700 |
commit | 1520a56813f82bbe875774fdc2b3df26392278d6 (patch) | |
tree | d8f6ccc10e118bd2be6a954951c037f9c2fc1384 /platform/ios/src/MGLMapView.mm | |
parent | be7e9bbb8d54c775127f53d793c117c4bf5e2764 (diff) | |
download | qtlocation-mapboxgl-1520a56813f82bbe875774fdc2b3df26392278d6.tar.gz |
[all] Promote Style to public API
Diffstat (limited to 'platform/ios/src/MGLMapView.mm')
-rw-r--r-- | platform/ios/src/MGLMapView.mm | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/platform/ios/src/MGLMapView.mm b/platform/ios/src/MGLMapView.mm index 8ae3049e3e..0d00fe75fb 100644 --- a/platform/ios/src/MGLMapView.mm +++ b/platform/ios/src/MGLMapView.mm @@ -15,6 +15,7 @@ #include <mbgl/util/default_thread_pool.hpp> #include <mbgl/storage/default_file_source.hpp> #include <mbgl/storage/network_status.hpp> +#include <mbgl/style/style.hpp> #include <mbgl/style/image.hpp> #include <mbgl/style/transition_options.hpp> #include <mbgl/style/layers/custom_layer.hpp> @@ -2152,10 +2153,10 @@ public: - (void)resetPosition { - CGFloat pitch = _mbglMap->getDefaultPitch(); - CLLocationDirection heading = mbgl::util::wrap(_mbglMap->getDefaultBearing(), 0., 360.); - CLLocationDistance distance = MGLAltitudeForZoomLevel(_mbglMap->getDefaultZoom(), pitch, 0, self.frame.size); - self.camera = [MGLMapCamera cameraLookingAtCenterCoordinate:MGLLocationCoordinate2DFromLatLng(_mbglMap->getDefaultLatLng()) + CGFloat pitch = _mbglMap->getStyle().getDefaultPitch(); + CLLocationDirection heading = mbgl::util::wrap(_mbglMap->getStyle().getDefaultBearing(), 0., 360.); + CLLocationDistance distance = MGLAltitudeForZoomLevel(_mbglMap->getStyle().getDefaultZoom(), pitch, 0, self.frame.size); + self.camera = [MGLMapCamera cameraLookingAtCenterCoordinate:MGLLocationCoordinate2DFromLatLng(_mbglMap->getStyle().getDefaultLatLng()) fromDistance:distance pitch:pitch heading:heading]; @@ -4986,7 +4987,7 @@ public: return; } - self.style = [[MGLStyle alloc] initWithMapView:self]; + self.style = [[MGLStyle alloc] initWithRawStyle:&_mbglMap->getStyle() mapView:self]; if ([self.delegate respondsToSelector:@selector(mapView:didFinishLoadingStyle:)]) { [self.delegate mapView:self didFinishLoadingStyle:self.style]; |