class
GltfPlugin
Event emitter
(map, pluginOptions?)The main class of the plugin
Example:
const plugin = new GltfPlugin (map, {
modelsLoadStrategy: 'waitAll',
dracoScriptsUrl: 'libs/draco/',
ambientLight: { color: 'white', intencity: 2.5 },
});
plugin.addModels([
{
modelId: '03a234cb',
coordinates: [82.886554, 54.980988],
modelUrl: 'models/cube_draco.glb',
rotateX: 90,
scale: 1000,
},
]);
The map instance
GltfPlugin initialization options
(modelOptions)Add model to the map
(modelOptions)Add the list of models to the map Use this method if you want to add a list of models to the map at the same time
An array of models' options
(modelOptions, ids)Add the list of models to the map partially Use this method if you want to add to the map some models from the list of models and want to preserve remaining ones in the cache without adding them to the map
An array of models' options
An array of identifiers of the models that must be added to the scene
(options, state?)Add the group of poi to the map
Options of the group of poi to add to the map
State of the active building to connect with added the group of poi
(scene, state?)Add the interactive realty scene to the map
The options of the scene to add to the map
State of the active building to connect with added scene
(id, preserveCache?)Remove the model from the map and cache or from the map only
Identifier of the model to delete
Flag to keep the model in the cache
(ids, preserveCache?)Remove models from the map and cache or from the map only
Flag to keep the model in the cache
(id)Remove the group of poi from the map
(preserveCache?)Remove interactive realty scene from the map
Flag to keep the model in the cache
(pluginOptions)