getInstance();
The getInstance method returns a map instance.
The method returns a PP.MapChart value.
To execute the example the HTML page must contain the MapChart component named map (see Example of Creating the MapChart Component). Determine sizes of the map and its topobase:
// Determine map sizes var width = map.getInstance().getWidth(); var height = map.getInstance().getHeight(); console.log("Map width: " + width + ", its height: " + height); // Get the topobase size var topobaseSize = map.getTopobaseSize(); console.log("Topobase width: " + topobaseSize.width + ", its height: " + topobaseSize.height);
As a result of executing the example, the browser console displays sizes of the map and the topobase:
Map width: 619, map height: 397
Topobase width: 844, topobase height: 504
See also: