MiniMap.Control

Syntax

Control: PP.Ui.IMiniMappable

Description

The Control property contains the control, to which the zoom control panel is bound.

Comments

Use JSON or the setControl method to set the property value, and the getControl method to get the property value.

Example

To execute the example the HTML page must contain the component map (see MapChart component map (see Example of Creating the MapChart Component). The example must be placed in the <script> tag. Create a zoom control panel and add it to map:

var miniMap = new PP.Ui.MiniMap({
    // Set zoom panel width
    Width: 100,
    // Set whether map is displayed
    ShowMap: true,
    // Set whether zoom control buttons are displayed
    ShowButtons: true,
    // Set whether map proportions change on resize
    KeepProportions: false,
    // Set whether initial borders are saved
    KeepInitialBounds: true,
    // Set height of zoom control buttons
    ButtonsHeight: 20,
    FrameStyle: new PP.Style({ Background: new PP.SolidColorBrush({ Color: PP.Color.Colors.lightgreen })})
});
// Add zoom panel to map
map.setMiniMap(miniMap);
// Set a control for zoom panel
miniMap._Control = map;
// Display zoom panel on map
map.setMiniMapEnabled(true, false);
// Remove weather icons
map._MilestoneLayer.remove();

As a result, zoom panel is added to map:

See also:

MiniMap