New to Telerik UI for WinFormsStart a free 30-day trial

Mini Map

Updated over 6 months ago

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

C#
this.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

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

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

PropertyDescription
MapElementGets the map element.
MiniMapModeGets or sets the mini map mode.
ZoomLevelGets or sets the current zoom level.
ZoomOffsetGets or sets the zoom offset. This property is used when the MiniMapMode is set to OffsetZoom.
ToggleMiniMapButtonGets the toggle mini map button.
MiniMapSizeGets or sets the size of the mini map.
IsCollapsedGets or sets a value indicating whether this instance is collapsed.
ViewportControlBackColorGets or sets the back color of the view port control.
ViewportControlBorderColorGets or sets the border color of the view port control.

Methods

MethodDescription
CollapseCollapses the mini map.
ExpandExpands the mini map.

See Also