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

Enhance! - #1843

Merged
incanus merged 1 commit into
masterfrom
1ec5-lasik-963
Jul 7, 2015
Merged

incanus merged 1 commit into
masterfrom
1ec5-lasik-963

Conversation

@1ec5

@1ec5 1ec5 commented Jul 7, 2015

Copy link
Copy Markdown
Contributor

For raster and video sources, fetch tiles from one zoom level higher when the map’s logical zoom level is halfway or greater. So z14.49 loads z14 tiles like before, but z14.5 loads z15 tiles. This behavior avoids blurriness in styles such as Satellite, given that the zoom level is rarely integral, especially after the user manually pinches to zoom. Leaflet apparently does the same thing.

Fixes #963.

/cc @incanus @peterqliu

@1ec5 1ec5 added bug GL JS parity For feature parity with Mapbox GL JS iOS Mapbox Maps SDK for iOS labels Jul 7, 2015
@1ec5 1ec5 self-assigned this Jul 7, 2015
@1ec5 1ec5 added this to the iOS Beta 3 milestone Jul 7, 2015
@peterqliu

Copy link
Copy Markdown
Contributor

👏

@1ec5

1ec5 commented Jul 7, 2015

Copy link
Copy Markdown
Contributor Author
z Before After
14.4 before_14 4_thumb after_14 4_thumb
14.6 before_14 6_thumb after_14 6_thumb

@incanus

incanus commented Jul 7, 2015

Copy link
Copy Markdown
Contributor

Oh man this looks soooooo good. I have just been testing with latest gl-styles@mb-pages Satellite style, which doesn't have any vectors. It'd be good to test with that, too, to see the interplay.

@1ec5

1ec5 commented Jul 7, 2015

Copy link
Copy Markdown
Contributor Author

Yep, I'm working with mapbox/mapbox-gl-styles#161 locally.

@incanus

incanus commented Jul 7, 2015

Copy link
Copy Markdown
Contributor

Raster styles look great too (color is off in this screenshot, but looks great on device).

img_0652

incanus added a commit that referenced this pull request Jul 7, 2015
@incanus
incanus merged commit c83d3b3 into master Jul 7, 2015
@incanus
incanus deleted the 1ec5-lasik-963 branch July 7, 2015 22:33
@1ec5 1ec5 mentioned this pull request Jul 8, 2015
@mb12

mb12 commented Jul 30, 2015

Copy link
Copy Markdown

@1ec5 this could also have been fixed by just modifying the style.json file for raster and video source. In your style.json just add "tileSize": 256 for the raster source. This would have the equivalent effect because in Source::getZoom we also compute an offset like this.

double Source::getZoom(const TransformState& state) const {

@1ec5

1ec5 commented Jul 30, 2015

Copy link
Copy Markdown
Contributor Author

@mb12, the Satellite style in question did already have "tileSize": 256, but the issue here was that we needed to be more tolerant of downloading and displaying higher-resolution imagery than the truncated zoom level would call for. This comment illustrates the problem well: mapbox/mapbox-gl-js#1030 (comment).

@mb12

mb12 commented Jul 30, 2015

Copy link
Copy Markdown

Thanks a lot for the clarification @1ec5. .

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

bug GL JS parity For feature parity with Mapbox GL JS iOS Mapbox Maps SDK for iOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants