This is the documentation of version 0.64.0. Go to the latest version, 1.0.0-rc.5.
TomTom Maps for JavaScript
    Preparing search index...

    Type Alias GeometryHighlightConfig

    How a hovered or clicked geometry is drawn: a denser fill and a wider border, in its own colours.

    The factors multiply the fill opacity and border width in force, the configured fill.opacity and line.width included; a line-width in layers.line is drawn as given. The geometries draw their event states once a handler covers them, or GeometriesModule.setEventState puts one.

    // A bolder border alone
    const highlight: GeometryHighlightConfig = { fill: { opacityFactor: 1 }, line: { widthFactor: 2.5 } };
    type GeometryHighlightConfig = {
        fill?: { opacityFactor?: number };
        line?: { widthFactor?: number };
    }
    Index
    fill?: { opacityFactor?: number }

    The hovered or clicked geometry's fill.

    Type Declaration

    • OptionalopacityFactor?: number

      Multiplier on the fill opacity, at most opaque; 1 draws the fill as on any other geometry. Clamped to 1 to 4.

      2

    line?: { widthFactor?: number }

    The hovered or clicked geometry's border.

    Type Declaration

    • OptionalwidthFactor?: number

      Multiplier on the border width; 1 draws the border as on any other geometry. Clamped to 1 to 3.

      1.75