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

Snapshotter scales incorrectly #10089

Closed
1ec5 opened this issue Sep 29, 2017 · 2 comments
Closed

Snapshotter scales incorrectly #10089

1ec5 opened this issue Sep 29, 2017 · 2 comments
Labels
beta blocker Blocks the next beta release bug iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS MapKit parity For feature parity with MapKit on iOS or macOS

Comments

@1ec5
Copy link
Contributor

1ec5 commented Sep 29, 2017

If I create an MGLMapSnapshotOptions object with size set to 456×480 on a 2× display, MGLMapSnapshotter produces an image 1,824 pixels wide by 1,920 pixels tall, which is what I would expect on a 4× display if MGLMapSnapshotOptions.size were measured in points (#10088). As the property is currently documented, however, a size of 456×480 should result in a 456×480-pixel image regardless of the screen resolution.

/ref #10020 (comment)
/cc @fabian-guerra @frederoni

@1ec5 1ec5 added bug iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS MapKit parity For feature parity with MapKit on iOS or macOS labels Sep 29, 2017
@1ec5 1ec5 added this to the ios-v3.7.0 milestone Sep 29, 2017
@fabian-guerra
Copy link
Contributor

As #10020 (comment) we do handle internally the scale. The output image is scaled accordingly. 456x480 will scale as 1:1 on non-retina screens otherwise will be 1824x1920 px on a 4× display.

@1ec5
Copy link
Contributor Author

1ec5 commented Oct 2, 2017

Regardless of whether we internally handle the scale, MGLMapSnapshotter is incorrectly scaling the output image. The example above was on a 2× display, not a 4× display, yet MGLMapSnapshotter was behaving as if it was on a 4× display and size was measured in points. 456×480 pixels should mean 456×480 pixels regardless of screen resolution.

@1ec5 1ec5 added the beta blocker Blocks the next beta release label Oct 2, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
beta blocker Blocks the next beta release bug iOS Mapbox Maps SDK for iOS macOS Mapbox Maps SDK for macOS MapKit parity For feature parity with MapKit on iOS or macOS
Projects
None yet
Development

No branches or pull requests

2 participants