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

    Type Alias GeometryBeforeLayerConfig

    GeometryBeforeLayerConfig: PartsBeforeLayerConfig<"fill" | "line">

    Layer positioning configuration for geometries.

    Controls where geometry layers are placed in the map's layer stack.

    A single BeforeLayerConfig ('top' or a layer id) positions all geometry layers together. The record form positions the parts independently, all covering any it doesn't name:

    • fill — the fill layer.
    • line — the border/outline, with its line labels.

    A part the config names no target for sits where the module adds it, just below the geometry titles. 'top' keeps those titles above the geometries themselves.

    // Place all geometry layers on top
    const beforeLayer: GeometryBeforeLayerConfig = 'top';

    // Place all below labels
    const beforeLayer: GeometryBeforeLayerConfig = 'lowestLabel';

    // Fill below the road network, border on top
    const beforeLayer: GeometryBeforeLayerConfig = { fill: 'lowestRoadLine', line: 'top' };