VmLayerGltf

The VmLayerGltf component is a custom style layer with three.js to add 3D models to a map. see

Basic usage

API

Props

NameDescriptionTypeDefault
urlThe url address of the gltf model.string-
positionThe position of the gltf model..array-
rotateThe rotation angle of the gltf model, in radians.array[Math.PI / 2, 0, 0]
scaleThe scale angle of the gltf model.number1

Events

NameDescriptionType
beforeLoadTriggers before the maplibreObject is loaded.Function
readyTriggers when the maplibreObject is successfully loaded.Function
unreadyTriggers when the maplibreObject loading failed.Function
destroyedTriggers when the maplibreObject is destroyed.Function

Exposes

NameDescriptionType
loadLoad the component manually.Function
unloadDestroy the loaded component manually.Function
reloadLoad the component manually.Function
creatingPromiseDetermine whether the component is created by this.object
maplibreObjectThe maplibreObject created by component.object
getMaplibreObjectGet the maplibreObject created by component.Function

Source

ComponentDocs

Contributors