Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Snapshot style’s default camera unless overridden - #280

Merged
1ec5 merged 1 commit into
masterfrom
1ec5-snapshotter-null-camera-279
Apr 24, 2020
Merged

1ec5 merged 1 commit into
masterfrom
1ec5-snapshotter-null-camera-279

Conversation

@1ec5

@1ec5 1ec5 commented Apr 24, 2020

Copy link
Copy Markdown
Contributor

Only set a snapshotter’s underlying camera options – overriding the style’s default – if the application has set a valid MGLMapCamera.centerCoordinate, nonnegative MGLMapCamera.heading, nonnegative MGLMapCamera.pitch, or nonnegative MGLMapSnapshotOptions.zoomLevel.

Fixes #279.

/cc @mapbox/maps-ios

@1ec5 1ec5 added bug Something isn't working ios macOS labels Apr 24, 2020
@1ec5
1ec5 requested a review from a team April 24, 2020 03:04
@1ec5 1ec5 self-assigned this Apr 24, 2020
@1ec5

1ec5 commented Apr 24, 2020

Copy link
Copy Markdown
Contributor Author

The risk from this change is that someone may have been relying on being able to set the heading to a negative value to rotate the snapshot counterclockwise from north. That would be a misuse of CLLocationDirection according to Apple documentation, but it’s an easy enough mistake to make in Objective-C.

@chloekraw
chloekraw self-requested a review April 24, 2020 04:31
@chloekraw
chloekraw requested a review from julianrex April 24, 2020 04:33
@1ec5
1ec5 merged commit f3da2d7 into master Apr 24, 2020
@1ec5
1ec5 deleted the 1ec5-snapshotter-null-camera-279 branch April 24, 2020 17:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug Something isn't working ios macOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MGLMapSnapshotter is centered at Null Island instead of the style’s default camera

3 participants