0

I have created a set of annotations for different web zoom levels in ArcMap, and would like to use these labels in Tilemill rather than using the tilemill labeling engine.

I am aware that I can't import annotations to tilemill as if they are features, so what I would like to do is export each zoom level's labels as a raster at scale (as high resolution geotiff with a transparent background), and overlay these on each zoom in my tilemill project.

I can bring the label rasters into tilemill no problem and they show up in the right place, however I can't figure out how to make a transparent background work.

I have explored some of the raster-colorizer methods with no luck, anyone have any other solution to this?

2

I had the same problem and was able to solve it using the nodata parameter in TileMill. When adding the geotiff as a layer, in the Advanced box I entered nodata="255" to make a white background transparent. The only CartoCSS I used was this:

#geotifflayer {
  raster-opacity:1;
  raster-scaling: bilinear;
}

The mapnik documentation on the nodata parameter is a bit vague, but I think it needs to be an RGB value, e.g nodata="255" to make a white background transparent in an 8-bit colour image, or nodata="255 255 255" to do the same to a 24-bit colour image.

I have TileMill v0.10.1 on both Linux and Windows, and for some reason this only seems to work in the Linux version.

| improve this answer | |

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.