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

Put a Mark on the clicked Location

Updated on Mar 26, 2026

If you want to mark the position where the user has clicked, you just have to handle the MapMouseClick event and add the desired mark element to the VisualizationLayer of the RadMap on the clicked location.

The following example will use a RadMap with one VisualizationLayer. The VisualizationLayer has its ItemTemplate property set. The DataTemplate contains a red Ellipse. In this example, the object that will be passed to the VisualizationLayer will be of type Location, so the MapLayer.Location property of the ellipse is bound to the DataContext of the template.

Here is the code for the example:

Example 1

XAML
<dataVisualization:RadMap x:Name="radMap"
				Width="600"
				Height="480"
				MapMouseClick="radMap_MapMouseClick">
	<dataVisualization:RadMap.Provider>
		<telerikMap:OpenStreetMapProvider APIKey="Your API Key" StandardModeUserAgent="Your User Agent"/>
		</dataVisualization:RadMap.Provider>
	<telerikMap:VisualizationLayer x:Name="visualizationLayer">
		<telerikMap:VisualizationLayer.ItemTemplate>
			<DataTemplate>
				<Ellipse telerikMap:MapLayer.Location="{Binding}"
						Width="20"
						Height="20"
						Stroke="Red"
						StrokeThickness="3"
						Fill="Transparent">
					<telerikMap:MapLayer.HotSpot>
						<dataVisualization:HotSpot X="0.5"
										Y="0.5" />
					</telerikMap:MapLayer.HotSpot>
				</Ellipse>
			</DataTemplate>
		</telerikMap:VisualizationLayer.ItemTemplate>                
	</telerikMap:VisualizationLayer>
</dataVisualization:RadMap>

Example 2

C#
private void radMap_MapMouseClick( object sender, MapMouseRoutedEventArgs eventArgs )
{
	this.visualizationLayer.Items.Clear();
	this.visualizationLayer.Items.Add( eventArgs.Location );
}

See Also

In this article
See Also
Not finding the help you need?
Contact Support