AmbientLightValue: Number;
The AmbientLightValue method specifies level of map ambient light.
Property value is set from JSON or using the setAmbientLightValue method.
By default the property is set to 0.5.
The property can be applied only to Sphere type maps.
To execute the example the HTML page must contain the MapChart component named map and the component named MapType (see Example of Creating of the MapChart ComponentToolBar component named MapType (see Example of Creating of the MapChart Component). A map with the Sphere topobase must also be loaded. To change the type, execute the following script line in the browser console:
MapType.setIsVisible(true);
Next click the Sphere button in the newly appeared panel. A Sphere map will appear:
Set new level and direction of map ambient light:
// Set new level of map ambient light map.setAmbientLightValue(-2); // Set light direction map.setDirectLightDirection(new PP.Vector3(1, 1, -0.5)); // Redraw the map map.draw(0); this.onresize();
After executing the example map ambient light is decreased, and light direction changes to north-east:
See also: