I upload a geotiff file to mapbox and created a layer with it. It works as expected on zoom level 2 up to 5.4 and then suddenly the background changes from transparent to black. Any ideas why that happens?

You can see the map here:


The greyish border next to the coastline is the raster layer.

  • Same issue here though at a different zoom. Ever find an answer @felix? – ickydime Mar 30 '18 at 0:05
  • Nevermind, figured it out. Answered below. :) – ickydime Mar 30 '18 at 0:22

The trick is to ensure your transparency is set to 0 instead of NoData.

This article from Mapbox talks about how you can do it with a program called Rasterio: https://www.mapbox.com/help/troubleshoot-raster-transparency-issues/

It states you need to run this command to set NoData values to zero:

rio edit-info --nodata 0 filename255.tif

However, I was creating my geoTiff in QGis and there was an option to use 0 for transparency when needed. So first check whatever software you are using for creating the raster images.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.