scale(m: Number);
m. Scale to be set.
The scale method scales a coordinate system.
To execute the example the HTML page must contain the MapChart component map (see Example of Creating the MapChart Component). Open a spherical map. Get model and view matrix:
// Get class object used to work with 3D projection var projection = map.getGLControl().getProjection(); // Get model and view matrix console.log("Model and view matrix: "); console.log(projection.getModelMatrix().getData());
As a result the console displays model and view matrix:
Model and view matrix:
[1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, -1.089900016784668, 1]
Change coordinate system scale and get a new model and view matrix:
// Change scale projection.scale(2); // Get a new model and view matrix console.log("Model and view matrix: "); console.log(projection.getModelMatrix().getData());
As a result the console displays model and view matrix:
Model and view matrix:
[1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, -2.179800033569336, 2]
See also: