Show Coordinates in Map Legend converted to other projection system

3 posts, 0 answers
  1. Manfred
    Manfred avatar
    53 posts
    Member since:
    Jan 2011

    Posted 24 Nov 2011 Link to this post

    Hi there,

    can anyone give me a short descritpion, how to change the map legend where the current coordinates are displayed to an other projection system?

    We do this:
    our collegues send some coordinates, we transform them to show the point in our map.
    But we want the to show the coordinates he send in the legend.
    A short example how to do that would be fine.

    Best Regards
  2. Andrey
    Andrey avatar
    1681 posts

    Posted 28 Nov 2011 Link to this post

    Hello Manfred,

    The MapLegend is a specific control which is designed for using with colorizer only. So, you can't use it to display coordinates.

    It seems you mean the MapMouseLocationIndicator (Mouse Position Coordinates or Mouse Location control) which is described in documentation at the following links:

    Unfortunately this control supports displaying location using the Number format or using the Geographical format only. It does not support displaying location in different projection systems. So, you should disable it in RadMap with setting the MouseLocationIndicatorVisibility to "Collapsed" and you should create you own implementation of control like the MapMouseLocationIndicator. You can use the RadMap.MouseMove event to get the current mouse location.
    The sample code is below.

    <UserControl x:Class="CustomMouseLocator.MainPage"
        d:DesignHeight="300" d:DesignWidth="700">
        <Grid x:Name="LayoutRoot" Background="White">
            <telerik:RadMap x:Name="radMap"
                    <telerik:OpenStreetMapProvider />
            <Border HorizontalAlignment="Left" VerticalAlignment="Bottom"
                    Width="220" Height="22"
                <TextBlock x:Name="mouseLocator"


    using System.Windows.Controls;
    using System.Windows.Input;
    using Telerik.Windows.Controls;
    using Telerik.Windows.Controls.Map;
    namespace CustomMouseLocator
        public partial class MainPage : UserControl
            public MainPage()
            private void radMap_MouseMove(object sender, MouseEventArgs e)
                RadMap map = sender as RadMap;
                if (map != null)
                    Location mouse = Location.GetCoordinates(map, e.GetPosition(map));
                    this.mouseLocator.Text = this.LocationToString(mouse);
            private string LocationToString(Location mouse)
                // TODO: should implement convertion to string format of required coordinate system
                return mouse.ToString();

    Kind regards,
    Andrey Murzov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. DevCraft R3 2016 release webinar banner
  4. Manfred
    Manfred avatar
    53 posts
    Member since:
    Jan 2011

    Posted 19 Mar 2012 Link to this post

    Hi Andrey,

    sorry for replying so late ;-)

    It worked fine for me, thanks a lot for your help.

    Best Regards
Back to Top