OptionalauthRequest authorizer for fetching a model URL from a secured host.
OptionaldatumHow each instance's position[2] is referenced. Default 'basemap'.
'basemap' — height counts from the MAP SURFACE: 0 sits on the ground, on the flat map and
on 3D terrain alike. The layer samples the terrain PER INSTANCE and re-seats as the DEM
streams in, so a spread of models follows a slope instead of hanging off one elevation.'ellipsoid' — absolute WGS84 ellipsoidal height, terrain-independent.'orthometric' — absolute MSL height; the layer adds the geoid undulation N so it lands on
ellipsoidal ground (needs a loaded EGM96 grid, else equivalent to 'ellipsoid').Matches the 3D-Tiles / I3S layers' datum contract (see Tiles3DMeshLayerOptions.datum)
rather than inventing a fourth convention.
MapLibre layer id (must be unique within the map).
Where to place the model — each with position ([lng, lat, height], degrees/metres) and an
optional per-instance scale + heading.
The shared model: a glTF/GLB URL (fetched), raw GLB bytes, or a pre-built NormalizedMesh
(e.g. a generated primitive). Drawn once per instance.
OptionalonFired if the model fails to load (bad URL, non-OK HTTP, empty instances).
OptionalonFired once the model has been resolved + uploaded and the instances are rendering.
OptionalopacityInitial opacity 0–1 (default 1).
OptionalrequestStatic auth/headers escape hatch for the model URL fetch. Superseded by auth when both are set.
OptionalseamsGeometry codec seams (Draco/meshopt) if the model GLB is compressed.
OptionalvisibleInitial visibility (default true).
Options for ModelInstancesLayer.
id,modeland a non-emptyinstancesare required; everything else defaults.modelis the single shared geometry drawn once per instance, and ModelInstancesLayerOptions.datum decides what each instance'sposition[2]means — the default'basemap're-seats every instance on the terrain under it as the DEM streams in.