Mouse Location

The RadMap uses an UI control to display the current mouse location on the map. It displays the latitude and the longitude of the mouse position.

The UI control is represented by the MapMouseLocationIndicator control. You are able to use it outside the RadMap and place it somewhere around it. In this case you have to either hide the original one by using the MouseLocationIndicatorVisibility property of the RadMap or the UseDefaultLayout one.

Setting the UseDefaultLayout property to False will hide all of the UI controls inside the RadMap. To learn more read here.

In order to use the MapMouseLocationIndicator outside the RadMap you have to set its MapControl property to the respective RadMap instance. Additionally you can modify its appearance and the location formatting. Here is an example:

<StackPanel> 
    <telerik:MapMouseLocationIndicator MapControl="{Binding ElementName=radMap}" 
                                        LocationFormat="Number" 
                                        Margin="10" 
                                        HorizontalAlignment="Center" 
                                        Width="250" 
                                        IndicatorLabelBackground="White" 
                                        IndicatorLabelBorderBrush="Black" 
                                        Foreground="Black" /> 
    <telerik:RadMap x:Name="radMap" 
                    Width="600" 
                    Height="480" 
                    MouseLocationIndicatorVisibility="Collapsed" /> 
</StackPanel> 

Here is a snapshot of the result:

Silverlight RadMap Mouse Indicator Outside

See Also

In this article