Skip to content

spatial-monorepo


spatial-monorepo / 3d/src / ModelLayerProps

Interface: ModelLayerProps

Defined in: packages/3d/src/ModelLayer.tsx:10

Properties

altitude

altitude: number

Defined in: packages/3d/src/ModelLayer.tsx:20

Altitude above sea level in metres.


coordinate

coordinate: [number, number]

Defined in: packages/3d/src/ModelLayer.tsx:18

[longitude, latitude] of the model anchor.


id?

optional id?: string

Defined in: packages/3d/src/ModelLayer.tsx:12

Stable id for the MapLibre layer. Defaults to a generated uuid.


map

map: Map$1 | null | undefined

Defined in: packages/3d/src/ModelLayer.tsx:14

MapLibre map instance to attach the custom layer to. Pass null/undefined until the map is loaded (e.g. from useMap()).


modelUrl

modelUrl: string

Defined in: packages/3d/src/ModelLayer.tsx:16

URL of the GLTF or GLB file to load.


onError?

optional onError?: (err) => void

Defined in: packages/3d/src/ModelLayer.tsx:28

Called if the model fails to load.

Parameters

err

Error

Returns

void


onLoad?

optional onLoad?: () => void

Defined in: packages/3d/src/ModelLayer.tsx:26

Called once the model has loaded and been added to the scene.

Returns

void


rotation

rotation: [number, number, number]

Defined in: packages/3d/src/ModelLayer.tsx:22

Rotation [x, y, z] in degrees.


scale

scale: number

Defined in: packages/3d/src/ModelLayer.tsx:24

Uniform scale factor.

Released under commercial licensing.