class
GltfPlugin
Event emitter.
(map, pluginOptions?)The main class of the plugin.
Example:
const plugin = new GltfPlugin(map, {
modelsLoadStrategy: 'waitAll',
modelsBaseUrl: 'https://url_to_models',
});
plugin.addModels([
{
modelId: '03a234cb',
coordinates: [82.886554, 54.980988],
modelUrl: 'models/cube_draco.glb',
rotateZ: 90,
scale: 2,
},
]);
The map instance.
GltfPlugin initialization options.
(options, state?)Adds a group of labels to the map.
Options of the group of labels.
A state of active building and floor a group of labels is associated with.
(modelToLoad, hideOnLoad)Adds a model to the map.
Options of a model.
Set to
true
if a model should be hidden on loading completion.
(modelsToLoad, modelIdsToShow?)Adds a list of models to the map.
An array of options of models.
An array of ids of models that should be shown. If it's not provided all models will be shown.
(scene, state?)Adds an interactive realty scene to the map.
Options of the scene to add to the map.
A state of building and floor that should be active on realty scene initialization.
Destroys the plugin.
(id)Returns a current status of a model. There can be no model or it can be loading or loaded.
(id)Hides a model on the map.
A model id.
(ids)Hides models on the map.
Hides a shown realty scene on the map.
(id)Removes a group of labels from the map.
A label group id.
(id, keepModel?)Removes a model from the map.
A model id.
Specifies whether model data should be cached for future use.
(ids, keepModels?)Removes models from the map.
Specifies whether model data should be cached for future use.
(keepModels?)Removes an interactive realty scene from the map.
Specifies whether model data should be cached for future use.
(pluginOptions)Sets options of the plugin.
Plugin options that are available for setting.
(id)Shows a model on the map.
A model id.
(ids)Shows models on the map.
Shows a hidden realty scene on the map.