TomTom Maps for JavaScript
    Preparing search index...

    Type Alias TerrainModuleConfig

    TerrainModuleConfig: MapModuleCommonConfig & {
        elevation?: TerrainElevationConfig;
        hillshade?: TerrainHillshadeConfig;
    }

    The TerrainModule configuration, for the two ways it draws the relief of the style's elevation data.

    Type Declaration

    By default, the hillshade is hidden like the other style parts the SDK adds (traffic flow and incidents), and the surface stays as the map draws it: flat, unless the style or your MapLibre code raised it. So resetConfig() hides the hillshade and puts back the surface the map drew before.

    const config: TerrainModuleConfig = {
    hillshade: { visible: true, method: 'multidirectional', colors: { shaded: '#3b2f2f' } },
    elevation: { visible: true, exaggeration: 1.5 },
    };