Asymmetric viewport changelog entry
Check edge insets difference, in addition to isEqualToMapCamera in all the places in MGLMapView before map.easeTo/map.flyTo.
This commit is contained in:
@@ -3,6 +3,11 @@
|
||||
Mapbox welcomes participation and contributions from everyone. If you'd like to do so please see the [`Contributing Guide`](https://github.com/mapbox/mapbox-gl-native/blob/master/CONTRIBUTING.md) first to get started.
|
||||
|
||||
## master
|
||||
|
||||
### Styles and rendering
|
||||
|
||||
- Implemented asymmetric center of perspective: fixed an issue that caused the focal point to be always based on the view's horizontal center when setting [MapboxMap setPadding](https://docs.mapbox.com/android/api/map-sdk/8.0.0/com/mapbox/mapboxsdk/maps/MapboxMap.html#setPadding-int-int-int-int-). [#14664](https://github.com/mapbox/mapbox-gl-native/pull/14664)
|
||||
|
||||
## 8.0.0 - May 22, 2019
|
||||
- This release improves the method for counting monthly active users. By upgrading to this release, you are opting into the changes outlined [in this blog post](https://www.mapbox.com/52219). [#14404](https://github.com/mapbox/mapbox-gl-native/pull/14404)
|
||||
|
||||
|
||||
@@ -2,6 +2,12 @@
|
||||
|
||||
Mapbox welcomes participation and contributions from everyone. Please read [CONTRIBUTING.md](../../CONTRIBUTING.md) to get started.
|
||||
|
||||
## master
|
||||
|
||||
### Styles and rendering
|
||||
|
||||
* Implemented asymmetric center of perspective: fixed an issue that caused the focal point to be always based on the view's horizontal center when setting [MGLMapView contentInset](https://docs.mapbox.com/ios/api/maps/5.0.0/Classes/MGLMapView.html#/c:objc(cs)MGLMapView(py)contentInset). ([#14664](https://github.com/mapbox/mapbox-gl-native/pull/14664))
|
||||
|
||||
## 5.0.0 - May 22, 2019
|
||||
|
||||
This release improves how monthly active users are counted. By upgrading to this release, you are opting into the changes outlined in [this blog post](https://www.mapbox.com/52219) and [#14421](https://github.com/mapbox/mapbox-gl-native/pull/14421).
|
||||
|
||||
@@ -788,14 +788,14 @@ CLLocationCoordinate2D randomWorldCoordinate() {
|
||||
heading:0];
|
||||
__weak typeof(self) weakSelf = self;
|
||||
[self.mapView setCamera:camera withDuration:0.3 animationTimingFunction:nil completionHandler:^{
|
||||
[weakSelf.mapView setContentInset:contentInsets animated:TRUE];
|
||||
[weakSelf.mapView setContentInset:contentInsets animated:YES];
|
||||
}];
|
||||
} else {
|
||||
[self.view sendSubviewToBack:self.contentInsetsOverlays[0]];
|
||||
[self.view sendSubviewToBack:self.contentInsetsOverlays[1]];
|
||||
[self.view sendSubviewToBack:self.contentInsetsOverlays[2]];
|
||||
[self.view sendSubviewToBack:self.contentInsetsOverlays[3]];
|
||||
[self.mapView setContentInset:_originalContentInsets animated:TRUE];
|
||||
[self.mapView setContentInset:_originalContentInsets animated:YES];
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1079,7 +1079,7 @@ public:
|
||||
if (self.userTrackingMode == MGLUserTrackingModeNone)
|
||||
{
|
||||
// Don’t call -setCenterCoordinate:, which resets the user tracking mode.
|
||||
[self _setCenterCoordinate:self.centerCoordinate edgePadding:contentInset zoomLevel:self.zoomLevel direction:self.direction duration:animated ? MGLAnimationDuration : 0 animationTimingFunction:nil completionHandler:NULL];
|
||||
[self _setCenterCoordinate:self.centerCoordinate edgePadding:contentInset zoomLevel:self.zoomLevel direction:self.direction duration:animated ? MGLAnimationDuration : 0 animationTimingFunction:nil completionHandler:nil];
|
||||
_contentInset = contentInset;
|
||||
}
|
||||
else
|
||||
@@ -1088,7 +1088,7 @@ public:
|
||||
[self didUpdateLocationWithUserTrackingAnimated:animated];
|
||||
}
|
||||
|
||||
// Compass, logo and attribution button constraints needs to be updated.
|
||||
// Compass, logo and attribution button constraints needs to be updated.z
|
||||
[self installConstraints];
|
||||
}
|
||||
|
||||
@@ -3290,7 +3290,7 @@ public:
|
||||
zoomLevel,
|
||||
direction,
|
||||
MGLStringFromBOOL(animated));
|
||||
[self setCenterCoordinate:centerCoordinate zoomLevel:zoomLevel direction:direction animated:animated completionHandler:NULL];
|
||||
[self setCenterCoordinate:centerCoordinate zoomLevel:zoomLevel direction:direction animated:animated completionHandler:nil];
|
||||
}
|
||||
|
||||
- (void)setCenterCoordinate:(CLLocationCoordinate2D)centerCoordinate zoomLevel:(double)zoomLevel direction:(CLLocationDirection)direction animated:(BOOL)animated completionHandler:(nullable void (^)(void))completion
|
||||
@@ -3554,7 +3554,7 @@ public:
|
||||
}
|
||||
|
||||
MGLMapCamera *camera = [self cameraForCameraOptions:cameraOptions];
|
||||
if ([self.camera isEqualToMapCamera:camera])
|
||||
if ([self.camera isEqualToMapCamera:camera] && UIEdgeInsetsEqualToEdgeInsets(_contentInset, insets))
|
||||
{
|
||||
if (completion)
|
||||
{
|
||||
@@ -3671,7 +3671,7 @@ public:
|
||||
- (void)setCamera:(MGLMapCamera *)camera withDuration:(NSTimeInterval)duration animationTimingFunction:(nullable CAMediaTimingFunction *)function
|
||||
{
|
||||
MGLLogDebug(@"Setting camera: %@ duration: %f animationTimingFunction: %@", camera, duration, function);
|
||||
[self setCamera:camera withDuration:duration animationTimingFunction:function completionHandler:NULL];
|
||||
[self setCamera:camera withDuration:duration animationTimingFunction:function completionHandler:nil];
|
||||
}
|
||||
|
||||
- (void)setCamera:(MGLMapCamera *)camera withDuration:(NSTimeInterval)duration animationTimingFunction:(nullable CAMediaTimingFunction *)function completionHandler:(nullable void (^)(void))completion
|
||||
@@ -3707,7 +3707,7 @@ public:
|
||||
};
|
||||
}
|
||||
|
||||
if ([self.camera isEqualToMapCamera:camera])
|
||||
if ([self.camera isEqualToMapCamera:camera] && UIEdgeInsetsEqualToEdgeInsets(_contentInset, edgePadding))
|
||||
{
|
||||
if (completion)
|
||||
{
|
||||
@@ -3778,7 +3778,7 @@ public:
|
||||
};
|
||||
}
|
||||
|
||||
if ([self.camera isEqualToMapCamera:camera])
|
||||
if ([self.camera isEqualToMapCamera:camera] && UIEdgeInsetsEqualToEdgeInsets(_contentInset, insets))
|
||||
{
|
||||
if (completion)
|
||||
{
|
||||
@@ -3884,7 +3884,7 @@ public:
|
||||
return self.residualCamera;
|
||||
}
|
||||
|
||||
mbgl::CameraOptions mapCamera = self.mbglMap.getCameraOptions(cameraOptions.padding.value_or(mbgl::EdgeInsets()));
|
||||
mbgl::CameraOptions mapCamera = self.mbglMap.getCameraOptions();
|
||||
CLLocationCoordinate2D centerCoordinate = MGLLocationCoordinate2DFromLatLng(cameraOptions.center ? *cameraOptions.center : *mapCamera.center);
|
||||
double zoomLevel = cameraOptions.zoom ? *cameraOptions.zoom : self.zoomLevel;
|
||||
CLLocationDirection direction = cameraOptions.bearing ? mbgl::util::wrap(*cameraOptions.bearing, 0., 360.) : self.direction;
|
||||
@@ -5678,7 +5678,7 @@ public:
|
||||
direction:self.directionByFollowingWithCourse
|
||||
duration:animated ? MGLUserLocationAnimationDuration : 0
|
||||
animationTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear]
|
||||
completionHandler:NULL];
|
||||
completionHandler:nil];
|
||||
}
|
||||
|
||||
/// Changes the viewport based on a significant location update, such as the
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
# Changelog for Mapbox Maps SDK for macOS
|
||||
|
||||
## master
|
||||
|
||||
### Styles and rendering
|
||||
|
||||
* Implemented asymmetric center of perspective: fixed an issue that caused the focal point to be always based on the view's horizontal center when setting [MGLMapView contentInset](https://docs.mapbox.com/ios/api/maps/5.0.0/Classes/MGLMapView.html#/c:objc(cs)MGLMapView(py)contentInset). ([#14664](https://github.com/mapbox/mapbox-gl-native/pull/14664))
|
||||
|
||||
## 0.14.0 - May 22, 2018
|
||||
|
||||
### Styles and rendering
|
||||
|
||||
Reference in New Issue
Block a user