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

Always request 1× and 2× sprite images for portability #12933

Merged
merged 1 commit into from
Sep 24, 2018

Conversation

kkaefer
Copy link
Member

@kkaefer kkaefer commented Sep 20, 2018

When creating a offline region, we've previously only requested the sprite image for the specified resolution. This lead to offline packs not being usable on devices that have a different pixel ratio. We're now requesting both 1× and 2× sprites. Some devices use even higher or fractional pixel ratios. However, we only ever use 1× and 2× sprite images in our requests.

When creating a offline region, we've previously only requested the sprite image for the specified resolution. This lead to offline packs not being usable on devices that have a different pixel ratio. We're now requesting both 1x and 2x sprites. Some devices use even higher or fractional pixel ratios. However, we only ever use 1x and 2x sprite images in our requests.
@kkaefer kkaefer force-pushed the offline-download-retina-sprite branch from a144a6a to bc8418b Compare September 20, 2018 13:02
@friedbunny friedbunny added the needs changelog Indicates PR needs a changelog entry prior to merging. label Sep 20, 2018
@kkaefer
Copy link
Member Author

kkaefer commented Sep 24, 2018

To clarify, this doesn't change the sprites we are downloading when viewing a map in regular operation. It only requests both when creating an offline pack. This is necessary when creating an offline pack on one device, and transferring it to another device with a different pixel ratio.

Copy link
Contributor

@ivovandongen ivovandongen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kkaefer kkaefer merged commit 153acd9 into master Sep 24, 2018
@kkaefer kkaefer deleted the offline-download-retina-sprite branch September 24, 2018 09:35
@friedbunny friedbunny removed needs changelog Indicates PR needs a changelog entry prior to merging. labels Oct 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Core The cross-platform C++ core, aka mbgl offline
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants