Repository navigation
Load 2× raster tiles on HiDPI screens - #924
Conversation
There was a problem hiding this comment.
It's not just .png that's relevant here.
There was a problem hiding this comment.
It's also important that this only insert {ratio} on Mapbox sources, since we can't guarantee that other sources support @2x. That's why gl-js check the source URL against mapbox://.
There was a problem hiding this comment.
Fixed gl-js support for other image formats in mapbox/mapbox-gl-js@241a07d.
|
@incanus @jfirebaugh are we good to go here? |
|
Oh, according to the README, we’re still targeting g++ 4.8 for Linux. I’ll get rid of the dependency. |
|
I wonder how the linux+gcc travis build using std::regex still passed though... |
|
Instead of hardcoding for file extensions (.jpg, .png etc), you can use source.type == SourceInfo::Raster in TileData::Request. |
3871552 to
42cbfbc
Compare
|
Looks like it’s still failing on Linux with error code 2. Is it possible that this compiler is defaulting to some syntax other than |
|
It’s |
|
I think we’re still looking at a stubbed-out |
|
sigh Ok, let's revert to the string based implementation and open an issue about upgrading to gcc 4.9. |
|
There is no need to do any string manipulation for this issue. Just pass an additional boolean flag to normalize method that '@ratio' needs to be appended. In caller just use SourceInfo.type == SourceType::Raster for this boolean flag. |
|
“{ratio}” needs to be inserted before the file extension and any parameters, not appended, hence the regex / string manipulation. But |
7fd4cea to
8804c47
Compare
Load 2× raster tiles on HiDPI screens
Based on
mapbox.normalizeTileURL()in mapbox/mapbox-gl-js, but insert a{ratio}placeholder instead of@2xin order to keep thepixelRatiologic inTileData::request().Fixes #919, so Satellite should look like it did before feae53f: