An0ket_codes
An0ket_codes

Reputation: 13

Mapbox raster image not working in mobile

In mobile view mapbox renders black image instead of raster image. I suspect this is because of the size of image(3.9 MB), also this is happening mostly on chrome browser for mobile. Please help me find the potential issue here?

Upvotes: 1

Views: 710

Answers (1)

Moritz
Moritz

Reputation: 1790

This sounds as if you could be running into the No-Data issue, when rendering transparency.

The black background that appears is the part of the raster image that does not contain any data. Generally a raster image is a rectangular grid of pixels. When you are working with data that is not rectangular, there are pixels within the grid that don't contain any data. These pixels are expressed as NoData values and represent the absence of data. GeoTIFFs that are uploaded to Mapbox Studio are displayed as JPEG to save space and make maps load quickly. Since JPEG cannot display transparency, NoData values appear black.

Please see this documentation on how to resolve this:

https://docs.mapbox.com/help/troubleshooting/raster-transparency-issues/#why-black-backgrounds-appear

Upvotes: 2

Related Questions