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

> caption Figure 1: MiniMap

![WinForms RadMap MiniMap](https://www.telerik.com/products/winforms/documentation/assets/63c597a408c9017858137ef16f840c70/map-features-minimap001.png)

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

#### Hide Mini Map

```C#
this.radMap1.ShowMiniMap = false;
```

```VB.NET
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

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

```VB.NET
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.

> caption Figure 2: WholeWorld

![WinForms RadMap WholeWorld](https://www.telerik.com/products/winforms/documentation/assets/ea3838ccf109eb13e78ec7581fb0169b/map-features-minimap002.gif)

* **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.

> caption Figure 3: StaticZoom

![WinForms RadMap StaticZoom](https://www.telerik.com/products/winforms/documentation/assets/c29b455b135cd8129f7794394b4057f8/map-features-minimap003.gif)

* **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.

> caption Figure 4: OffsetZoom

![WinForms RadMap OffsetZoom](https://www.telerik.com/products/winforms/documentation/assets/c5aa3456fdf30b2627afed7740e53d98/map-features-minimap004.gif)

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

* [Layers Overview](https://www.telerik.com/products/winforms/documentation/controls/map/features/layers/overview)
* [Navigation Controls](https://www.telerik.com/products/winforms/documentation/controls/map/features/navigation-controls)
* [Scale Indicators](https://www.telerik.com/products/winforms/documentation/controls/map/features/scale-indicators)
* [Legend](https://www.telerik.com/products/winforms/documentation/controls/map/features/legend)
* [Pan and Zoom](https://www.telerik.com/products/winforms/documentation/controls/map/features/pan-and-zoom)
