RadMap InformationLayer MapEllipse Location Binding

3 posts, 0 answers
  1. Aliaksei
    Aliaksei avatar
    4 posts
    Member since:
    Dec 2018

    Posted 14 Dec 2018 Link to this post

    Hello,

    Can anyone help by answering on question: Why using this code MapEllipse shape didn't show on RadMap InformationLayer>?

    <telerik:RadMap x:Name="RadMap"
        ZoomLevel="{Binding MapZoomLevel}"
        Provider="{Binding MapProvider}"
        Center="{Binding MapCenter}"
        cal:Message.Attach="[Event MapMouseClick] = [Action RadMapClicked($source,$eventArgs)];
                <telerik:InformationLayer>
                    <telerik:MapEllipse
                        telerik:MapLayer.Location="{Binding Location}"
                        Width="10"
                        Height="10"
                        Fill="Red"
                        Stroke="OrangeRed"
                        StrokeThickness="2">
                    </telerik:MapEllipse>
                </telerik:InformationLayer>
              </telerik:RadMap>

     

     

    private Location _location;
    public Location Location
    {
        get { return _location; }
        set
        {
            _location = value;
            NotifyOfPropertyChange(() => Location);
        }
    }
     
    public void RadMapClicked(object sender, MapMouseRoutedEventArgs eventArgs)
    {
        Location = eventArgs.Location;
    }

     

    RadMapClicked event is triggered well and Location coordinates are correct wrote

     

    Thank you!

  2. Aliaksei
    Aliaksei avatar
    4 posts
    Member since:
    Dec 2018

    Posted 14 Dec 2018 Link to this post

    This code works well for me. But Binding don't work.

     

    <telerik:InformationLayer>
                    <telerik:MapEllipse
                        Location="58.060385, 35.736556"
                        Width="10"
                        Height="10"
                        Fill="Red"
                        Stroke="OrangeRed"
                        StrokeThickness="2">
                    </telerik:MapEllipse>
                </telerik:InformationLayer>
  3. Dinko
    Admin
    Dinko avatar
    853 posts

    Posted 19 Dec 2018 Link to this post

    Hi Aliaksei,

    Thank you for the provided code snippets.

    Can you try setting the binding mode of the Location attached property to TwoWay and try again on your side?
    <telerik:RadMap x:Name="RadMap"
        ZoomLevel="{Binding MapZoomLevel}"
        Provider="{Binding MapProvider}"
        Center="{Binding MapCenter}"
        cal:Message.Attach="[Event MapMouseClick] = [Action RadMapClicked($source,$eventArgs)];
                <telerik:InformationLayer>
                    <telerik:MapEllipse
                        telerik:MapLayer.Location="{Binding Location,Mode=TwoWay}"
                        Width="10"
                        Height="10"
                        Fill="Red"
                        Stroke="OrangeRed"
                        StrokeThickness="2">
                    </telerik:MapEllipse>
                </telerik:InformationLayer>
              </telerik:RadMap>

    Regards,
    Dinko
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top