mapbox-gl-native icon indicating copy to clipboard operation
mapbox-gl-native copied to clipboard

Custom tileset rendering error

Open P-Zenker opened this issue 9 years ago • 6 comments

Hey,

i've got a rendering error on several zoom levels with the latest SDK version (5.0.2). With SDK version 4.2.0 I had no problems and if I style my Mapbox map everything looks fine (like the first screenshot).

Platform: Android **Mapbox SDK version: 5.0.2 **

Steps to trigger behavior

Use a custom tileset

Expected behavior

Sharp maptiles on every zoom level like this: 3

Actual behavior

Black rendering boxes? 2 1

P-Zenker avatar Apr 07 '17 08:04 P-Zenker

Can you provide the style with custom tileset you're using?

jfirebaugh avatar Apr 07 '17 16:04 jfirebaugh

Style URL: mapbox://styles/patrickzenker/ciuton0ty00yv2hpbjgv5l4df Lat/Lng: 53.874336,10.683844

P-Zenker avatar Apr 10 '17 09:04 P-Zenker

Thank you -- I was able to easily reproduce the issue with your style. The cause of the aliasing seen around the edges of the opaque portions of the raster layer is that tiles from lower zoom levels are being rendered underneath the desired tiles. These low zoom tiles are overzoomed for rendering, producing undesired artifacts. You can see this more clearly when turning on tile borders:

image

These lower zoom tiles are loaded by an overly-aggressive tile loading algorithm, which is detecting that some tiles cannot be loaded at the desired zoom (because they are outside of the bounds of the raster source and don't exist), and loads lower zoom tiles in an effort to fully cover the visible area. This is a bug; we'll need to either adjust what tiles are loaded in this situation or ensure that we clip out child tiles when rendering the lower zoom tiles.

cc @kkaefer

jfirebaugh avatar Apr 12 '17 20:04 jfirebaugh

Might be addressed by https://github.com/mapbox/mapbox-gl-native/issues/5394.

jfirebaugh avatar Apr 12 '17 21:04 jfirebaugh

Fixed by #9468.

kkaefer avatar Jul 24 '17 10:07 kkaefer

@kkaefer @jfirebaugh

With

    compile('com.mapbox.mapboxsdk:mapbox-android-sdk:5.1.4@aar') {
        transitive = true
    }
    compile 'com.mapbox.mapboxsdk:mapbox-android-telemetry:2.2.5'
    compile 'com.mapbox.mapboxsdk:mapbox-android-services:2.2.5'
    compile('com.mapbox.mapboxsdk:mapbox-android-navigation-ui:0.7.0-SNAPSHOT') {
        transitive = true
    }

I still got the issue with Android (and iOS with latest version too).

bildschirmfoto 2017-10-06 um 18 26 33 bildschirmfoto 2017-10-06 um 18 26 22

Am I doing something wrong when I convert my images to MBTiles (to upload them into Mapbox Studio)?

If I watch the style with Mapbox Studio everything is fine.

Update: With @5.2.0-beta.1 this issue is gone.

P-Zenker avatar Oct 06 '17 16:10 P-Zenker