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 toFalse
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:
Example 1
<StackPanel>
<telerikMap:MapMouseLocationIndicator MapControl="{Binding ElementName=radMap}"
LocationFormat="Number"
Margin="10"
HorizontalAlignment="Center"
Width="250"
IndicatorLabelBackground="White"
IndicatorLabelBorderBrush="Black"
Foreground="Black" />
<dataVisualization:RadMap x:Name="radMap" Width="600" Height="480" MouseLocationIndicatorVisibility="Collapsed" >
<dataVisualization:RadMap.Providers>
<telerikMap:OpenStreetMapProvider APIKey="Your API Key" StandardModeUserAgent="Your User Agent"/>
</dataVisualization:RadMap.Providers>
</dataVisualization:RadMap>
</StackPanel>