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

Offline packs should load @1x and @2x sprites #11584

Closed
kkaefer opened this issue Apr 3, 2018 · 6 comments
Closed

Offline packs should load @1x and @2x sprites #11584

kkaefer opened this issue Apr 3, 2018 · 6 comments
Labels

Comments

@kkaefer
Copy link
Member

kkaefer commented Apr 3, 2018

OfflineDownload should default to include both @1x and @2x assets to account for the offline pack being used in multiple environments.

@kkaefer kkaefer added the offline label Apr 3, 2018
@jfirebaugh
Copy link
Contributor

What about raster sources? It would be prohibitively expensive to include both @1x and @2x raster tiles.

I think I'd rather keep it the way it is, for consistency.

@ChrisLoer
Copy link
Contributor

Good point about raster tiles, but there are probably still situations where someone’s creating a vector tile offline pack that’s going to run on devices with multiple pixel ratios, right? How should we tell them to build their packs? Maybe keep the default at a single pixel ratio but allow multiple ratios?

Maybe we can also do something to help developers who make the (easy) mistake of bundling the wrong pixelRatio? As is the map just fails to load and the sprite loading error message isn’t very obviously the cause. It’s not much but maybe the simplest thing we can do is add an “if you’re using an offline cache...” blurb to the sprite loading error message?

@mb12
Copy link

mb12 commented Apr 3, 2018

@jfirebaugh Are you suggesting that the native client automatically appends @1x or @2x prefix for raster tile URLs? Or is there some pixel ratio parameter that gets automatically added to tile URL templates for mapbox sources that mapbox tile servers use when serving raster tiles?

@1ec5
Copy link
Contributor

1ec5 commented Apr 4, 2018

there are probably still situations where someone’s creating a vector tile offline pack that’s going to run on devices with multiple pixel ratios, right?

This could potentially happen in two scenarios: map snapshots and sideloading (which at the moment isn’t officially supported).

@stale
Copy link

stale bot commented Oct 25, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the archived Archived because of inactivity label Oct 25, 2018
@kkaefer
Copy link
Member Author

kkaefer commented Nov 9, 2018

Fixed in #12933

@kkaefer kkaefer closed this as completed Nov 9, 2018
@chloekraw chloekraw removed the archived Archived because of inactivity label Dec 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

6 participants