Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
Moved cameraAltitudeAffectedByPitch to private API. Changelog updated
Browse files Browse the repository at this point in the history
  • Loading branch information
d-prukop committed Aug 2, 2018
1 parent 9b26024 commit 0b1e7c2
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 12 deletions.
1 change: 1 addition & 0 deletions platform/ios/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Mapbox welcomes participation and contributions from everyone. Please read [CONT
* Fixed a crash when switching between two styles having layers with the same identifier but different layer types. ([#12432](https://github.com/mapbox/mapbox-gl-native/issues/12432))
* Fixed an issue where the symbols for `MGLMapPointForCoordinate` could not be found. ([#12445](https://github.com/mapbox/mapbox-gl-native/issues/12445))
* Fixed an issue causing country and ocean labels to disappear after calling `-[MGLStyle localizeLabelsIntoLocale:]` when the system language is set to Simplified Chinese. ([#12164](https://github.com/mapbox/mapbox-gl-native/issues/12164))
* Added a new method `-[MGLMapView setCamera:edgePadding:]` that sets the camera with arbitrary insets. ([#12518](https://github.com/mapbox/mapbox-gl-native/pull/12518))

## 4.2.0 - July 18, 2018

Expand Down
12 changes: 0 additions & 12 deletions platform/ios/src/MGLMapView.h
Original file line number Diff line number Diff line change
Expand Up @@ -555,18 +555,6 @@ MGL_EXPORT IB_DESIGNABLE
*/
@property(nonatomic, getter=isHapticFeedbackEnabled) BOOL hapticFeedbackEnabled;

/**
A Boolean value that determines whether the updating pitch will also affect the altitude.
When this property is set to `NO`, pitch will work independently from altitude.
The default value of this property is YES.
Setting this property to NO will allow animation libraries outside of this SDK to control the
map camera without the built-in side effect that pitch influences altitude. This will make the
results of using outside animation more predictable and easier to control.
*/
@property(nonatomic, getter=isCameraAltitudeAffectedByPitch) BOOL cameraAltitudeAffectedByPitch;

/**
A floating-point value that determines the rate of deceleration after the user
lifts their finger.
Expand Down
3 changes: 3 additions & 0 deletions platform/ios/src/MGLMapView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,9 @@ @interface MGLMapView () <UIGestureRecognizerDelegate,
@property (nonatomic) MGLUserLocation *userLocation;
@property (nonatomic) NSMutableDictionary<NSString *, NSMutableArray<MGLAnnotationView *> *> *annotationViewReuseQueueByIdentifier;

/// A Boolean value that determines whether the updating pitch will also affect the altitude.
@property(nonatomic, getter=isCameraAltitudeAffectedByPitch) BOOL cameraAltitudeAffectedByPitch;

@end

@implementation MGLMapView
Expand Down
4 changes: 4 additions & 0 deletions platform/macos/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
* Token string syntax (`"{token}"`) in `MGLSymbolStyleLayer` `text` and `iconImageName` properties is now correctly converted to the appropriate `NSExpression` equivalent. ([#11659](https://github.com/mapbox/mapbox-gl-native/issues/11659))
* Fixed a crash when switching between two styles having layers with the same identifier but different layer types. ([#12432](https://github.com/mapbox/mapbox-gl-native/issues/12432))

## Other changes

* Added a new method `-[MGLMapView setCamera:edgePadding:]` that sets the camera with arbitrary insets. ([#12518](https://github.com/mapbox/mapbox-gl-native/pull/12518))

# 0.9.0 - July 18, 2018

## Styles and rendering
Expand Down
9 changes: 9 additions & 0 deletions platform/macos/src/MGLMapView.h
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,15 @@ MGL_EXPORT IB_DESIGNABLE
*/
- (void)setCamera:(MGLMapCamera *)camera animated:(BOOL)animated;

/**
Moves the viewpoint to a different location without using a transition.
@param camera The new viewpoint.
@param edgePadding The minimum padding (in screen points) that would be visible
*/
- (void)setCamera:(MGLMapCamera *)camera edgePadding:(NSEdgeInsets)edgePadding;

/**
Moves the viewpoint to a different location with respect to the map with an
optional transition duration and timing function.
Expand Down
5 changes: 5 additions & 0 deletions platform/macos/src/MGLMapView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1124,6 +1124,11 @@ - (void)setCamera:(MGLMapCamera *)camera animated:(BOOL)animated {
[self setCamera:camera withDuration:animated ? MGLAnimationDuration : 0 animationTimingFunction:nil completionHandler:NULL];
}

- (void)setCamera:(MGLMapCamera *)camera edgePadding:(NSEdgeInsets)edgePadding
{
[self setCamera:camera withDuration:0 animationTimingFunction:nil edgePadding:edgePadding completionHandler:nil];
}

- (void)setCamera:(MGLMapCamera *)camera withDuration:(NSTimeInterval)duration animationTimingFunction:(nullable CAMediaTimingFunction *)function completionHandler:(nullable void (^)(void))completion {
[self setCamera:camera withDuration:duration animationTimingFunction:function edgePadding:self.contentInsets completionHandler:completion];
}
Expand Down

0 comments on commit 0b1e7c2

Please sign in to comment.