title | page_title | description | slug | tags | published | position |
---|---|---|---|---|---|---|
Getting Started |
Getting Started |
Check our "Getting Started" documentation article for the RadMap {{ site.framework_name }} control. |
radmap-getting-started |
getting,started |
true |
4 |
The RadMap control allows you to display rich geographical information from various sources, including Microsoft Bing Maps, as well as to overlay the map with your own custom data. This topic will help you to quickly get started using the control. It will focus on the following:
To use RadMap when working with NuGet packages, install the Telerik.Windows.Controls.DataVisualization.for.Wpf.Xaml
package. The [package name may vary]({%slug nuget-available-packages%}) slightly based on the Telerik dlls set - [Xaml or NoXaml]({%slug xaml-vs-noxaml%})
Read more about NuGet installation in the [Installing UI for WPF from NuGet Package]({%slug nuget-installation%}) article.
tip With the 2025 Q1 release, the Telerik UI for WPF has a new licensing mechanism. You can learn more about it [here]({%slug installing-license-key%}).
If you are not using NuGet packages, you can add a reference to the following assemblies:
- Telerik.Licensing.Runtime
- Telerik.Windows.Controls
- Telerik.Windows.Controls.DataVisualization
- Telerik.Windows.Data
For .NET 6 and later you will need to install also the
System.ServiceModel.Http
NuGet package. This is required only if the Telerik assemblies are referenced manually in the project. In case you install the dlls using NuGet or the Telerik Visual Studio Extension, this package is included automatically.
You can find the required assemblies for each control from the suite in the {% if site.site_name == 'Silverlight' %}[Controls Dependencies]({%slug installation-installing-controls-dependencies%}){% else %}[Controls Dependencies]({%slug installation-installing-controls-dependencies-wpf%}){% endif %} help article.
After adding references to the aforementioned dlls, you can declare a new RadMap as any normal Silverlight/WPF control.
{{region radmap-getting-started_0}} <telerik:RadMap x:Name="radMap" /> {{endregion}}
The RadMap control doesn't display a map on itself, it needs a map provider from which to consume the required data. Currently the RadMap control supports a few providers out of the box:
-
[Bing Maps]({%slug radmap-features-providers-bing-rest-map%})
-
[OpenStreet Maps]({%slug radmap-features-providers%}#openstreet-maps)
-
[ArcGIS Online]({%slug radmap-features-providers-arcgis%})
-
[Empty Provider]({%slug radmap-features-empty-provider%})
-
[URI Image provider]({%slug radmap-features-uriimageprovider%})
-
WMS
This example will use Bing Maps as its provider. In order to do that you have to set the Provider property of the RadMap to the built-in BingMapProvider class.
{{region radmap-getting-started_1}} <telerik:RadMap x:Name="radMap"> telerik:RadMap.Provider <telerik:BingRestMapProvider ApplicationId="Bing_Map_Key" Mode="Aerial" IsLabelVisible="True"/> </telerik:RadMap.Provider> </telerik:RadMap> {{endregion}}
{{region radmap-getting-started_2}} this.radMap.Provider = new BingRestMapProvider( MapMode.Aerial, true, "key" ); {{endregion}}
{{region radmap-getting-started_3}} Me.radMap.Provider = New BingRestMapProvider(MapMode.Aerial, True, "key") {{endregion}}
Using the third overload of the BingRestMapProvider's constructor, allows you to pass some starting parameters:
-
The starting view mode of the map: Aerial.
-
The visibility of the map labels: Visible.
-
A Bing Maps specific key.
In order to use the Bing Maps with the RadMap control, you have to provide a valid Bing Maps Key. To learn how to obtain such a key, read this topic. Note that the Bing Map won't appear in your RadMap control, without supplying the key.
After specifying the provider, you should be able to see the respective map appear in the RadMap control.
You are able to display data on the top of the visualized map. The data may be represented by any framework element or map shape objects. This can be accomplished via the RadMap's layers.
There are two visualization engines in the RadMap package:
-
The old implementation of the map objects' (points and shapes) visualization consists of three layers: InformationLayer, DynamicLayer and VirtualizationLayer. This visualization engine, however, lacks certain features and has a few performance issues.
-
In the Q2 2013 release we introduced a new visualization engine in the RadMap. It has been designed from scratch to have better performance. The new visualization engine replaces all three layers with the new VisualizationLayer.
The major goals of the new engine are:
-
Improve the performance of the data visualization.
-
Allow reading map shapes from different sources (KML, ESRI, and SQL Geospatial) in the background thread.
-
Integrating clustering and items virtualization into the core. This simplifies the usage of both features.
-
Ability to attach/detach almost any input event available for the FrameworkElement to the map shape visualization.
-
Support of items selection in the engine core.
To learn more about the layers and how to display the different types of elements in them, please read the [Visualization layer]({%slug radmap-visualization-layer-introduction%}) section.
The controls from our suite support different themes. You can see how to apply a theme different than the default one in the [Setting a Theme]({%slug styling-apperance-implicit-styles-overview%}) help article.
important Changing the theme using implicit styles will affect all controls that have styles defined in the merged resource dictionaries. This is applicable only for the controls in the scope in which the resources are merged.
To change the theme, you can follow the steps below:
-
Choose between the themes and add reference to the corresponding theme assembly (ex: Telerik.Windows.Themes.Fluent.dll). You can see the different themes applied in the Theming examples from our {% if site.site_name == 'WPF' %}WPF Controls Examples{% else %}Silverlight Controls Examples{% endif %} application.
-
Merge the ResourceDictionaries with the namespace required for the controls that you are using from the theme assembly. For RadMap, you will need to merge the following resources:
- Telerik.Windows.Controls
- Telerik.Windows.Controls.DataVisualization
Example 4 demonstrates how to merge the ResourceDictionaries so that they are applied globally for the entire application.
{{region radmap-getting-started_04}} <Application.Resources> <ResourceDictionary.MergedDictionaries> </ResourceDictionary.MergedDictionaries> </Application.Resources> {{endregion}}
Figure 4 shows RadMap with the Fluent theme applied.
{% if site.site_name == 'WPF' %}
- Telerik UI for WPF Map Component
- [Getting Started with Telerik UI for WPF Components]({%slug getting-started-first-steps%})
- [Telerik UI for WPF Installation]({%slug installation-installing-which-file-do-i-need%})
- [Telerik UI for WPF and WinForms Integration]({%slug winforms-integration%})
- [Telerik UI for WPF Visual Studio Templates]({%slug visual-studio-templates%})
- [Setting a Theme with Telerik UI for WPF]({%slug styling-apperance-implicit-styles-overview%})
- Telerik UI for WPF Virtual Classroom (Training Courses for Registered Users)
- Telerik UI for WPF License Agreement {% endif %}
- [Overview]({%slug radmap-overview%})
- [Visual Structure]({%slug radmap-visual-structure%})
- [Bing Map Rest Provider]({%slug radmap-features-providers-bing-rest-map%})