# Getting Started with WinForms Map

This tutorial will help you to quickly get started using the control.

## Adding Telerik Assemblies Using NuGet

To use `RadMap` when working with NuGet packages, install the `Telerik.UI.for.WinForms.AllControls` package. The [package target framework version may vary](https://www.telerik.com/products/winforms/documentation/visual-studio-integration/available-nugets).

If you don’t need all controls, you can instead install a more lightweight package targeting only RadMap: **UI.for.WinForms.RadMap**. This package has a dependency on **UI.for.WinForms.Common**, which will be automatically installed when adding the **RadMap NuGet**.

Read more about NuGet installation in the [Install using NuGet Packages](https://www.telerik.com/products/winforms/documentation/installation-and-upgrades/install-using-nuget) article.

> tip With the 2025 Q1 release, the Telerik UI for WinForms has a new licensing mechanism. You can learn more about it [here](https://www.telerik.com/products/winforms/documentation/licensing/license-key).

## Adding Assembly References Manually

When dragging and dropping a control from the Visual Studio (VS) Toolbox onto the Form Designer, VS automatically adds the necessary assemblies. However, if you're adding the control programmatically, you'll need to manually reference the following assemblies:

* **Telerik.Licensing.Runtime**
* **Telerik.WinControls**
* **Telerik.WinControls.RadMap**
* **Telerik.WinControls.UI**
* **TelerikCommon**

The Telerik UI for WinForms assemblies can be install by using one of the available [installation approaches](https://www.telerik.com/products/winforms/documentation/installation-and-upgrades/installing-on-your-computer).

## Defining the RadMap

> important Please note that [Bing Maps](https://www.bingmapsportal.com/) **will be deprecated effective June 30, 2025**. As an alternative, users can refer to the [SDK example available in our GitHub repository](https://github.com/telerik/winforms-sdk/tree/master/Map/Custom%20Azure%20Provider), which demonstrates how to create a **custom provider** using the **Azure Maps API**. A **valid Azure Maps subscription key** is required to use this functionality.

Follow the steps:

1\. Create a new **Windows Application** project.
2\. Drop a **RadMap** control on the form and set its **Dock** property to *Fill*.
3\. The **RadMap** control doesn't display any imagery data initially, it needs an **IMapProvider** instance from which to consume this data. This example will use [Bing Maps](https://www.bingmapsportal.com/) for its imagery source. To achieve that you have to add a new **BingRestMapProvider** to the RadMap.**Providers** property.

> note You must provide a Bing Maps Key to the provider for it to work. To get your free Bing Maps Key, please refer to the following link: [Getting a Bing Maps Key](https://msdn.microsoft.com/en-us/library/ff428642.aspx).

> note If you use **RadMap** with .Net Framework 2.0 and you don't have an installation of the Telerik UI for WinForms suite on the current machine, it is necessary to add a reference to the Newtonsoft.Json assembly which can be found in the \Bin folder of the *Telerik_UI_For_WinForms\_\[version]\_Dev_dlls.zip*. If you are using .Net Framework 4.0 this is not requried.

If you want to use data caching, you should set an **IMapCacheProvider** instance to the BingRestMapProvider.**CacheProvider** property. In this example a **LocalFileCacheProvider** will be used:

#### Using BingRestMapProvider

```C#
string cacheFolder = @"..\..\cache";

BingRestMapProvider bingProvider = new Telerik.WinControls.UI.BingRestMapProvider();
bingProvider.UseSession = true;
bingProvider.BingKey = bingKey;

LocalFileCacheProvider cache = new LocalFileCacheProvider(cacheFolder);
bingProvider.CacheProvider = cache;

this.radMap1.Providers.Add(bingProvider);
```

```VB.NET
Dim cacheFolder As String = "..\..\cache"

Dim bingProvider As BingRestMapProvider = New Telerik.WinControls.UI.BingRestMapProvider()
bingProvider.UseSession = True
bingProvider.BingKey = bingKey

Dim cache As New LocalFileCacheProvider(cacheFolder)
bingProvider.CacheProvider = cache

Me.radMap1.Providers.Add(bingProvider)
```

> caption Figure 1: RadMap

![WinForms RadMap Getting Started](https://www.telerik.com/products/winforms/documentation/assets/5bf44c53756ce834761afa57b132d236/map-getting-started001.png)

## See Also

* [Providers](https://www.telerik.com/products/winforms/documentation/controls/map/providers/overview)
* [File Readers](https://www.telerik.com/products/winforms/documentation/controls/map/file-readers/file-readers)
* [Features](https://www.telerik.com/products/winforms/documentation/controls/map/features/layers/overview)

## Telerik UI for WinForms Learning Resources

* [Telerik UI for WinForms Map Component](https://www.telerik.com/products/winforms/map.aspx)
* [Getting Started with Telerik UI for WinForms Components](https://docs.telerik.com/devtools/winforms/getting-started/first-steps)
* [Telerik UI for WinForms Setup](https://docs.telerik.com/devtools/winforms/installation-and-upgrades/installing-on-your-computer)
* [Telerik UI for WinForms Converter](https://www.telerik.com/products/winforms/documentation/ai-coding-assistant/converter/converter)
* [Telerik UI for WinForms Visual Studio Templates](https://docs.telerik.com/devtools/winforms/visual-studio-integration/visual-studio-templates)
* [Deploy Telerik UI for WinForms Applications](https://docs.telerik.com/devtools/winforms/deployment-and-distribution/application-deployment)
* [Telerik UI for WinForms Virtual Classroom(Training Courses for Registered Users)](https://learn.telerik.com/learn/course/external/view/elearning/17/telerik-ui-for-winforms)
* [Telerik UI for WinForms License Agreement)](https://www.telerik.com/purchase/license-agreement/winforms-dlw-s)
