TomTom Maps for JavaScript
    Preparing search index...

    Class Landmarks3D

    Renders TomTom Orbis 3D Landmarks (high-detail building meshes) on a TomTomMap.

    The plugin streams GLB tiles from the Orbis 3D Landmarks API (Private Preview), renders them with Three.js via a MapLibre custom layer, filters overlapping extruded basemap buildings out of the style, and keeps everything restored across map style changes.

    It requires an API key with Orbis 3D Landmarks entitlements. Its look is a set of knobs, listed in landmarks3DKnobCatalogue. Each one you leave unset follows the base map's 3D buildings, through style changes and anything that restyles them, falling back to the streetLight style's look. Whether those buildings show is the buildings3D group of the BaseMapModule, hidden in most standard styles; the plugin leaves it as it is.

    import { Landmarks3D } from '@tomtom-org/maps-sdk-plugin-landmarks-3d';

    // assume `map` is your initialized TomTomMap instance
    const landmarks = new Landmarks3D(map);

    landmarks.updateConfig({ color: '#c8b28a' });
    Index
    • Creates the plugin bound to a TomTom map and starts rendering landmarks as soon as the map is ready.

      Parameters

      • map: TomTomMap

        The TomTom map instance to render landmarks on.

      • Optionaloptions: Landmarks3DOptions

        The knobs to start with, and how to request tiles.

      Returns Landmarks3D

    • get layer(): ModelsLayer

      The underlying MapLibre custom layer, for advanced use beyond this facade.

      Returns ModelsLayer

    • Replaces the whole configuration. An empty object has every knob follow the base map's 3D buildings.

      Parameters

      Returns void

      Use it, and updateConfig, for a look your code writes: as on a map module, the type is the check, and the values are not checked again. For values held as data, the SDK's setKnobs checks each against landmarks3DKnobCatalogue and sets them by id.

      landmarks.applyConfig({ color: '#c8b28a', opacity: 0.9 });
      
    • Returns the knobs set, as a plain serializable copy. The SDK's getKnob reads a knob's value in force, the base map's one when unset.

      Returns Landmarks3DConfig

    • Whether the landmarks are set to be shown: the visible knob, true unless set.

      Returns boolean

    • Unsets every knob, so the landmarks are shown and look like the base map's 3D buildings.

      Returns void

    • Shows or hides the landmarks. Stored as visible in the configuration.

      Parameters

      • visible: boolean

        true to show landmarks, false to hide them.

      Returns void

    • Changes the given knobs and keeps the others.

      Parameters

      Returns void

      landmarks.updateConfig({ opacity: 1 }); // the colour still follows the base map