Type Alias TShow3DMapOptionsExperimental

TShow3DMapOptions: {
    __EXPERIMENTAL_shadows?: {
        baseColor?: string;
        debug?: boolean;
        enabled: boolean;
        normalBias?: number;
        pcfSamples?: number;
        pcfSpread?: number;
        shadowBias?: number;
        shadowMapSize?: "auto" | number;
        shadowOpacity?: number;
        sunAzimuth?: number;
        sunElevation?: number;
    };
    bearing?: number;
    debug?: boolean;
    flipImagesToFaceCamera?: boolean;
    initialFloor?: Floor
    | string;
    injectStyles?: boolean;
    multiFloorView?: TMultiFloorViewOptions;
    outdoorView?: {
        enabled?: boolean;
        layersHiddenByGeometry?: string[];
        lowDpi?: boolean;
        style?: string;
        token?: string;
    };
    pitch?: number;
    preloadFloors?: Floor[];
    screenOffsets?: InsetPadding;
    shadingAndOutlines?: boolean;
    style?: {
        backgroundAlpha?: number;
        backgroundColor?: string;
        outlines?: boolean;
        shading?: boolean
        | Shading;
        wallTopColor?: string;
    };
    wallTopColor?: string;
    zoomLevel?: number;
}

Options for showing a 3D map.

Type declaration

  • Optional Experimental__EXPERIMENTAL_shadows?: {
        baseColor?: string;
        debug?: boolean;
        enabled: boolean;
        normalBias?: number;
        pcfSamples?: number;
        pcfSpread?: number;
        shadowBias?: number;
        shadowMapSize?: "auto" | number;
        shadowOpacity?: number;
        sunAzimuth?: number;
        sunElevation?: number;
    }

    Shadow rendering configuration.

    { enabled: false }
    
    • OptionalbaseColor?: string

      Base color tint applied to shadows. Lighter colors make shadows softer and less harsh.

      '#a0a0a0'
      
    • Optionaldebug?: boolean

      Enable debug visualization (light camera frustum, snap grid, current cell highlight, shadow map preview)

      false
      
    • enabled: boolean

      Master toggle for the entire shadow system

      false
      
    • OptionalnormalBias?: number

      Offset shadows along surface normals to prevent self-shadowing artifacts (shadow acne). Increase if you see noise/banding on surfaces. Too high causes shadows to detach from objects.

      0.12
      
    • OptionalpcfSamples?: number

      Number of Poisson disk samples for Percentage Closer Filtering (PCF). Higher values create softer shadow edges but impact performance. Valid range: 1-16 samples (uses rotated Poisson disk pattern).

      4
      
    • OptionalpcfSpread?: number

      Sampling spread/radius for PCF soft shadows in shadow map texels. Larger values create softer, more blurred shadow edges and reduce banding. Smaller values create sharper, more defined shadows.

      2.5
      
    • OptionalshadowBias?: number

      Depth bias to prevent shadow acne and self-shadowing artifacts. Increase if you see moiré patterns, noise, or overall darkening. Too high causes "peter panning" (detached shadows).

      0.001
      
    • OptionalshadowMapSize?: "auto" | number

      Resolution of the shadow map texture in pixels (width/height).

      • 'auto' (default): Automatically switches between high (4096) and low (2048) resolution based on zoom level
      • A number value (e.g., 1024, 2048, 4096): Uses a fixed resolution Higher values create sharper shadows but use more memory and bandwidth. Lower values are faster but may show pixelation.
      'auto'
      
    • OptionalshadowOpacity?: number

      Opacity/darkness of shadows (0.0 = invisible, 1.0 = completely black). Lower values create softer, more subtle shadows that blend with ambient lighting.

      0.35
      
    • OptionalsunAzimuth?: number

      Sun azimuth angle in degrees: 0=North, 90=East, 180=South, 270=West

      225
      
    • OptionalsunElevation?: number

      Sun elevation angle in degrees: 0=horizon, 90=directly overhead

      45
      
  • Optionalbearing?: number

    The initial bearing of the map, in degrees.

    0
    
  • Optional Experimentaldebug?: boolean

    Enable debug mode to check the visual representation of performance stats.

    false
    
  • OptionalflipImagesToFaceCamera?: boolean

    Enable or disable the flip of images to face the camera.

    true
    
  • OptionalinitialFloor?: Floor | string

    First floor to be rendered. By default, floor with the elevation that's closest to 0 is rendered. All floors will be sorted by elevation in ascending order.

  • OptionalinjectStyles?: boolean

    Automatically inject necessary styles into the document head. If false, the index.css file needs to be manually imported.

    import '@mappedin/mappedin-js/lib/index.css';
    ...
    await show3dMap(...);
    true
    
  • OptionalmultiFloorView?: TMultiFloorViewOptions

    Options for controlling multi-floor view.

  • OptionaloutdoorView?: {
        enabled?: boolean;
        layersHiddenByGeometry?: string[];
        lowDpi?: boolean;
        style?: string;
        token?: string;
    }

    The outdoor view options.

    • Optionalenabled?: boolean

      Enable or disable the outdoor view.

      true
      
    • OptionallayersHiddenByGeometry?: string[]

      Layers that should be hidden by geometry. This is useful when you want to hide certain layers when they are below the geometry.

      ['building', 'building-top']
      
    • OptionallowDpi?: boolean

      Reduces the pixel ratio for MapLibre rendering to improve framerate performance. When enabled, the rendering quality will be lower but performance will be better, which can be useful on devices with high-DPI displays or limited GPU capabilities.

      false
      
    • Optionalstyle?: string

      A url to a style specification conforming to the Maplibre Style Spec. Use the environment setting to switch environments.

    • Optionaltoken?: string

      The token is used to fetch outdoor tiles, which will then be rendered.

  • Optionalpitch?: number

    The initial pitch of the map, in degrees.

    45
    
  • OptionalpreloadFloors?: Floor[]

    Preload floors for the map. Allows floors to appear faster but requires more time and memory up front.

  • OptionalscreenOffsets?: InsetPadding

    The screen offsets of the map, in screen pixels.

  • OptionalshadingAndOutlines?: boolean

    Enable shading of bottoms of geometry along with outlines to make geometry stand out.

    true
    

    Use style.shading.

  • Optional Experimentalstyle?: {
        backgroundAlpha?: number;
        backgroundColor?: string;
        outlines?: boolean;
        shading?: boolean | Shading;
        wallTopColor?: string;
    }

    Style options for the map.

    • OptionalbackgroundAlpha?: number

      Background alpha value. Only relevant if outdoor map is disabled.

    • OptionalbackgroundColor?: string

      Background color. Only relevant if outdoor map is disabled.

    • Optionaloutlines?: boolean

      Set the global outlines for all elements. True will enable outlines, false will disable them.

      true
      
    • Optionalshading?: boolean | Shading

      Set the global shading for all elements. True will use default values, false will disable shading.

      true
      
    • OptionalwallTopColor?: string

      Specify a color for the top of wall geometry.

  • OptionalwallTopColor?: string

    Specify a color for the top of wall geometry.

    Use style.wallTopColor.

  • OptionalzoomLevel?: number

    The initial zoom level of the map, in mercator zoom levels. If it is not specified, it will default to the level that fits the map bounds.