MapSizeLegendPanel Constructor

Syntax

MapSizeLegendPanel(settings: Object);

Parameters

settings.  JSON object that contains values of class properties.

Description

The MapSizeLegendPanel constructor creates an instance of the MapSizeLegendPanel class.

Example

To execute the example the HTML page must contain the ExpressBox component named expressBox (see Example of Creating the ExpressBox Component). The Map data view and the Format tab of the express report side panel must be open. Create the Size Legend panel titled MapSizeLegendPanel and add it to map wizard:

// Get master to work with a map
var mapMaster = expressBox.getPropertyBarView().getMapMaster();
// Get an array of panels from the map master
var mapMasterPanels = mapMaster.getItems();
// Create the Height legend panel
var mapSizePanel = new PP.Ui.MapSizeLegendPanel({
    ViewType: PP.Ui.NavigationItem,
    IsRTL: expressBox.getIsRTL()
});
// Show controls in the panel title
mapSizePanel.setIsHeaderControlVisible(true);
// Set a new title for the panel
mapSizePanel.setTitle("MapSizeLegendPanel");
// Add the panel in the master of working with map
mapMaster.addMasterPanel(mapSizePanel);
// Refresh master
mapMaster.refresh(null);
// Show panel
mapSizePanel.show();
// Expand panel
mapSizePanel.expand();

After executing the example the Size Legend panel, named MapSizeLegendPanel, is added to the map wizard, shown and expanded. Panel title contains a control for panel selection:

See also:

MapSizeLegendPanel