isMapAvailable();
The isMapAvailable method determines whether the Map data view is available in the workbook.
The method returns True, if map is available in the workbook, and False if map is bit available.
To execute the example the page must contain the WorkbookBox component named workbookBox (see Example of Creating the WorkbookBox Component). Determine whether the map is available in the workbook:
// Get data source source = workbookBox.getSource(); // Get active sheet - instance of the PP.TS.Workbook class sheet = source.getActiveSheet(); // Determine whether map is available in the workbook console.debug(sheet.isMapAvailable() ? "Map is available" : "Map is not available")
After executing the example the browser console displays the message "Map is available" if the map is available in the workbook, and the message "Map is not available" otherwise.
See also: