loadTexture(url: String);
url. Texture address.
The loadTexture method loads texture.
To execute the example, the HTML page must contain the MapChart component named map (see Example of Creating the MapChart Component). Spherical map must be opened. Set a handler of the TextureLoaded event and load a texture:
// Get a control of the spherical map
var control = map.getGLControl();
// Set the handler of the TextureLoaded event
control.TextureLoaded.add(function(sender, args) {
console.log("Texture is loaded");
});
// Load a texture
control.loadTexture("../../build/img/Earth.png");
As a result the console displays information about texture loading:
Texture is loaded
See also: