-1

Is there any way to add a water mark to every tile using Tilemill? I would like to put my company name in small transparent writing in the bottom right hand corner of every tile. I'm exporting as MBTiles and using them in my android app.

Alternatively, is there another program I could use to post process the MBTiles file and give each tile the overlay?

Many thanks!

Gyroscope
  • 3,121
  • 4
  • 26
  • 33

1 Answers1

1

You can do this in TileMill by adding a polygon layer that covers the entire world and styling it with a PNG image of your watermark.

  1. Add the following URL as a new layer and add it as a new layer called 'watermark': http://mapbox-geodata.s3.amazonaws.com/natural-earth-1.4.0/physical/10m-900913-bounding-box.zip (If you add more layers later you'll want to make sure that the 'watermark' one stays at the top of the layers stack.)
  2. Use an image editor to create an image that is 256x256 pixels (the same size as a tile) and has your desired watermark in the corner. Save it as a PNG file to preserve the transparency.
  3. Style the watermark with the polygon-pattern CartoCSS options as below. You'll need to update the image to point at the location of your watermark image.

#watermark {
polygon-pattern-file:url("/path/to/watermark.png");
polygon-pattern-alignment:global;
}

ajashton
  • 591
  • 3
  • 5