2

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:

https://api.mapbox.com/styles/v1/felixmichel/cj1550ogw002s2smkgbz60keh.html?title=true&access_token=pk.eyJ1IjoiZmVsaXhtaWNoZWwiLCJhIjoiZWZrazRjOCJ9.62fkOEqGMxFxJZPJuo2iIQ#2.1/-3.499049/50.617268/0

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
0

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.