ExperimentalOptional Experimental__EXPERIMENTAL_shadows?: {Shadow rendering configuration.
OptionalbaseColor?: stringBase color tint applied to shadows. Lighter colors make shadows softer and less harsh.
Optionaldebug?: booleanEnable debug visualization (light camera frustum, snap grid, current cell highlight, shadow map preview)
Master toggle for the entire shadow system
OptionalnormalBias?: numberOffset 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.
OptionalpcfSamples?: numberNumber 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).
OptionalpcfSpread?: numberSampling 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.
OptionalshadowBias?: numberDepth 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).
OptionalshadowMapSize?: "auto" | numberResolution of the shadow map texture in pixels (width/height).
'auto' (default): Automatically switches between high (4096) and low (2048) resolution based on zoom levelOptionalshadowOpacity?: numberOpacity/darkness of shadows (0.0 = invisible, 1.0 = completely black). Lower values create softer, more subtle shadows that blend with ambient lighting.
OptionalsunAzimuth?: numberSun azimuth angle in degrees: 0=North, 90=East, 180=South, 270=West
OptionalsunElevation?: numberSun elevation angle in degrees: 0=horizon, 90=directly overhead
Optionalbearing?: numberThe initial bearing of the map, in degrees.
Optional Experimentaldebug?: booleanEnable debug mode to check the visual representation of performance stats.
OptionalflipImagesToFaceCamera?: booleanEnable or disable the flip of images to face the camera.
OptionalinitialFloor?: Floor | stringFirst 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?: booleanAutomatically 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(...);
OptionalmultiFloorView?: TMultiFloorViewOptionsOptions for controlling multi-floor view.
OptionaloutdoorView?: {The outdoor view options.
Optionalenabled?: booleanEnable or disable the outdoor view.
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.
OptionallowDpi?: booleanReduces 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.
Optionalstyle?: stringA url to a style specification conforming to the Maplibre Style Spec.
Use the environment setting to switch environments.
Optionaltoken?: stringThe token is used to fetch outdoor tiles, which will then be rendered.
Optionalpitch?: numberThe initial pitch of the map, in degrees.
OptionalpreloadFloors?: Floor[]Preload floors for the map. Allows floors to appear faster but requires more time and memory up front.
OptionalscreenOffsets?: InsetPaddingThe screen offsets of the map, in screen pixels.
OptionalshadingAndOutlines?: booleanEnable shading of bottoms of geometry along with outlines to make geometry stand out.
Optional Experimentalstyle?: {Style options for the map.
OptionalbackgroundAlpha?: numberBackground alpha value. Only relevant if outdoor map is disabled.
OptionalbackgroundColor?: stringBackground color. Only relevant if outdoor map is disabled.
Optionaloutlines?: booleanSet the global outlines for all elements. True will enable outlines, false will disable them.
Optionalshading?: boolean | ShadingSet the global shading for all elements. True will use default values, false will disable shading.
OptionalwallTopColor?: stringSpecify a color for the top of wall geometry.
OptionalwallTopColor?: stringSpecify a color for the top of wall geometry.
OptionalzoomLevel?: numberThe 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.
Options for showing a 3D map.