Class TextPlacement

java.lang.Object
dev.avelar.mapnik.TextPlacement

public final class TextPlacement extends Object
One alternative way to place a label. Mapnik tries them in order and uses the first that fits without overlapping other labels, for example a normal size and then a smaller one. See Symbolizer.placementList(dev.avelar.mapnik.TextPlacement...).
  • Method Details

    • create

      public static TextPlacement create()
    • attr

      public TextPlacement attr(String name, Object value)
      Set any attribute of a <Placement> element, such as size, dx, dy or wrap-width.
    • fontSize

      public TextPlacement fontSize(double size)
      This alternative uses a different font size.
    • offset

      public TextPlacement offset(double dx, double dy)
    • toXml

      public String toXml()
    • toString

      public String toString()
      Overrides:
      toString in class Object