Open askat opened 4 months ago
@askat can you please share the camera state for the blurry screenshot (mapboxMap.cameraState
) + enable couple debug options:
val debugOptions: MutableList<MapDebugOptions> = mutableListOf(
MapDebugOptions.TILE_BORDERS,
MapDebugOptions.PARSE_STATUS,
)
mapboxMap.setDebug(debugOptions, true)
@kiryldz
I hope I got it right.
1) Here is the mapboxMap.cameraState
log
[center: Point{type=Point, bbox=null, coordinates=[55.130000000000024, 25.120000000000015]}, padding: [top: 0.0, left: 0.0, bottom: 0.0, right: 0.0], zoom: 12.0, bearing: -0.0, pitch: 0.0]
2) Here is screenshot with debug enabled and internet disabled
@kiryldz Here another screenshots:
@askat thanks for addition information! I've reached to needed team and turned out we already have an internal ticket tracking this issue. I do not have any timelines sadly but if any new information will pop up - we will add it here, in this GH issue.
@askat same issue than this one https://github.com/mapbox/mapbox-maps-android/issues/1460
The issue is not the resolution, the saved map is just not loaded, what you are seeing is the cached maps, this is why the resolution is ok if you zoom before downloading.
You need to add .pixelRatio(2f)
to the tilesetDescriptor
@kiryldz I don't know if this will be fixed one day, but in the meantime would it be possible to update the documentation ?
@AntoBouteiller Thanks for your response, Antoine. I already added .pixelRatio(2f)
to the TilesetDescriptor as you can see in the issue description. Unfortunately it didn't fix this problem. Or maybe I'm trying to download tileset incorrectly. Did you try this solution yourself?
@askat Sorry I didn't see that. Yes, it fixed the issue for me.
We are experiencing the exact same issue above. On devices that seem to return less than 2.0 for:
hApplication.resources.displayMetrics.density
i.e. return 1.75 then the issue happens. When a device returns 2.0 or more there is no issue. This is only observation, I have no idea about causation. We are passing 2f for pixel ration. The values passed for max zoom seem to have no affect.
One thing we have found is that, you need to ensure the style pack download has finished before you download the tilesets. Seems to resolve the issue, no idea why.
Environment
Observed behavior and steps to reproduce
I'm trying to implement offline mode for my app. User can draw a polygon which will be downloaded and displayed when there is no internet connection. I'm using code from Mapbox's documentation to download
Style.SATELLITE_STREETS
tiles.The problem is unless I zoom to max before downloading
Style.SATELLITE_STREETS
map the quality of downloaded tiles is very low.After download I disconnect phone from internet and try to view map but the quality of map is very bad. If I connect to internet again map quality increases.
I tried to test with different values for
maxZoom()
but quality is still bad when no internetExpected behavior
Map's quality in offline mode must be the same as in online mode
Quality without internet
Quality with internet
Additional links and references
I found similar issue for iOS: https://github.com/mapbox/mapbox-maps-ios/issues/1056