3D JS API reference

This reference documents every object and method available. Each section describes classes or objects as well as their properties, parameters, methods, and associated events. Many sections also include inline code examples and related resources.

The MapTiler Layer3D can add 3D objects to your basemap with plenty of customizations from glTF/glb files! Those can be meshes, groups of meshes, point clouds and a mix of all these.

Example (create layer with some not default options)

Constructor

Creates a instance of Layer3D class. The constructor takes two arguments:

Parameters

A layer ID. (String).
Options to provide to the Layer3D constructor (Layer3DOptions)

Properties

options.minZoom
default: 0
Bellow this zoom level, the meshes are not visible
options.maxZoom
default: 22
Beyond this zoom level, the meshes are not visible.
options.antialias
default: true
Shows the AR button if true, hide it otherwise.
options.ambientLightColor
default: 0xffffff (white)
Ambient light color.
options.ambientLightIntensity
default: 1
Ambient light intensity.

Methods

MapTiler SDK JS 3D objects/models module.
On this page