Type alias TFlatLabelAppearance

TFlatLabelAppearance: {
    color?: string;
    font?: string;
    fontSize?: number;
    height?: number;
    hoverColor?: string;
    margin?: number;
    scaleMin?: number;
    scaleStep?: number;
}

Control how a flat label looks

Type declaration

  • Optional color?: string

    Optional color in hexadecimal string e.g. #2e2e2e.

  • Optional font?: string

    A CSS style string font, e.g. "sans-serif". You can specify your own font via @font-face rule with a font family, and then include that here.

  • Optional fontSize?: number

    Size of the font in pixels.

    Default

    12
    
  • Optional height?: number

    By default this is the upper bounds of the Polygon. If you don't have a Polygon, or want a custom height for some reason, you can set this.

  • Optional hoverColor?: string

    Optional hover color in hexadecimal string e.g. #2e2e2e.

  • Optional margin?: number

    The amount of space to leave before starting the text in pixels

    Default

    5
    
  • Optional scaleMin?: number

    The minimum percentage we can shrink the label to if it won't fit within the bounds at 100%. If it doesn't fit at that level, it won't be created.

    Default

    0.25
    
  • Optional scaleStep?: number

    How much to decrement the scale each time it doesn't fit, so we don't end up with too many different font sizes on screen at once. If you are only labeling a few MappedinPolygons rather than everything, you can set this and and scaleMin to 0.1 to fit everything except really long names perfectly.

    Default

    0.25