New to Telerik UI for WinForms? Download free 30-day trial

Mini Map

The mini map feature is responsible for displaying a certain part of the world at a different zoom level compared to the main map control and thus allowing easier navigation. It is enabled by default and it is painted in the top right corner of the view port.

Figure 1: MiniMap

WinForms RadMap MiniMap

The RadMap.ShowMiniMap property is responsible for showing or hiding the mini map control.

Hide Mini Map

this.radMap1.ShowMiniMap = false;

Me.RadMap1.ShowMiniMap = False

The mini map can be also programmatically expanded or collapsed via its IsCollapsed property or the Expand and Collapse methods.

Expand/Collapse

if (this.radMap1.MapElement.MiniMapElement.IsCollapsed)
{
    this.radMap1.MapElement.MiniMapElement.Expand();
}
else
{
    this.radMap1.MapElement.MiniMapElement.Collapse();
}

If Me.RadMap1.MapElement.MiniMapElement.IsCollapsed Then
    Me.RadMap1.MapElement.MiniMapElement.Expand()
Else
    Me.RadMap1.MapElement.MiniMapElement.Collapse()
End If

Mini Map Modes

The mini map behavior can be altered by setting the MiniMapMode property.

  • MiniMapMode.WholeWorld: The mini map shows the whole world map.

Figure 2: WholeWorld

WinForms RadMap WholeWorld

  • MiniMapMode.StaticZoom: The mini map will show a fixed zoom level at all times. Use the BringIntoView method to position the map at the required location and zoom level.

Figure 3: StaticZoom

WinForms RadMap StaticZoom

  • MiniMapMode.OffsetZoom: The mini map will show a dynamic zoom level offset from the main map view. Use the ZoomLevelOffset property to define the offset.

Figure 4: OffsetZoom

WinForms RadMap OffsetZoom

The MiniMapElement can be easily accessed via the RadMap.MapElement object. The table below lists the exposed properties and methods.

Properties

Property Description
MapElement Gets the map element.
MiniMapMode Gets or sets the mini map mode.
ZoomLevel Gets or sets the current zoom level.
ZoomOffset Gets or sets the zoom offset. This property is used when the MiniMapMode is set to OffsetZoom.
ToggleMiniMapButton Gets the toggle mini map button.
MiniMapSize Gets or sets the size of the mini map.
IsCollapsed Gets or sets a value indicating whether this instance is collapsed.
ViewportControlBackColor Gets or sets the back color of the view port control.
ViewportControlBorderColor Gets or sets the border color of the view port control.

Methods

Method Description
Collapse Collapses the mini map.
Expand Expands the mini map.

See Also

In this article