GltfPlugin | MapGL | Urbi Documentation
MapGL JS API

GltfPlugin

new constructor(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,
    },
]);
Parameters
map
MapGL

The map instance.

pluginOptions?
PluginOptions

GltfPlugin initialization options.

Returns
Methods