TopoNormalization: Object;
The TopoNormalization property determines settings of map topobase geometric normalization.
Use JSON or the setTopoNormalization method to set the property value and the getTopoNormalization method to get the property value.
The property contains a JSON object with the following fields: norm - topobase normalization coefficient, offsetx - X axis offset, offsety - Y axis offset, offsetz - Z axis offset.
To execute the example the HTML page must contain the MapChart component named map and the ToolBar component named MapType (see Example of Creating the MapChart Component). A map with the WebGL topobase must be loaded. To do this, execute the following script line in the browser console:
changeMapType("WebGL");
Increase normalization coefficient of map topobase by 2.5 times:
// Get map layer area with the RU-KYA ID var shape = map.getShape("RU-KYA"); console.log("Initial height of map layer area: " + shape.getZValue()); // Get normalization settings var topoNormalization = map.getTopoNormalization(); // Increase normalization coefficient in 2.5 times topoNormalization.norm *= 2.5; // Apply normalization settings map.setTopoNormalization(topoNormalization); shape.setChart(map); // Redraw map layer arrea shape.draw(); // Refresh a map map.refresh(); console.log("Obtained height of map layer area: " + shape.getZValue());
After executing the example normalization coefficient of map topobase is increased by 2.5 times:
The browser console displays initial and obtained values of height for map layer area with the RU-KYA identifier:
Initial height of map layer area: 0.0037431996863608076
Obtained height of map layer area: 0.009357999215902019
See also: