EllipseData on a VisualizationLayer while Zooming

7 posts, 0 answers
  1. John
    John avatar
    7 posts
    Member since:
    Apr 2014

    Posted 13 May 2014 Link to this post

    We are adding a VisualizationLayer to a RadMap via code behind like follows:
    var layer = new VisualizationLayer 
        { 
            DataContext = mapLayer,  
            AutoHighlightMapShape = true 
            UseBitmapCache = false, 
            ItemSelectionMode = ItemSelectionMode.MouseClickAndRectangle 
        }; 
    layer.SetBinding(VisibilityProperty, new Binding("IsEnabled") { Converter = new BooleanToVisibilityConverter() }); 
    layer.SetBinding(VisualizationLayer.SelectedItemsProperty, new Binding("SelectedShapeDataItems")); 
    layer.SetBinding(VisualizationLayer.ItemsSourceProperty, new Binding("ShapeData"));
     
    RadMap.Items.Add(layer);


    The ShapeData is an ObservableCollection of MapShapeData objects constructed like so:
    ShapeData = new ObservableCollection<MapShapeData>();
    foreach (var vertex in vertexes)
    {
        var ellipseData = new EllipseData
        {
            Location = new Location(vertex.Latitude, vertex.Longitude),
            Height = .1,
            Width = .1,
            ShapeFill = new MapShapeFill
                        {
                            Fill = Brushes.Blue,
                        }
        };
        ShapeData.Add(ellipseData);
    }


    The problem we are running into is as the RadMap is zoomed in and out, the EllipseData is not resizing. 

    If I use Stroke and StrokeThickness in the MapShapeFill, the ellipses will resize but not consistently.  As the zoom moves further and further in, the ellipses resize less and less.

    How exactly should I setup the EllipseData so that we can get the ellipses resized appropriately at every zoom level?

  2. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 14 May 2014 Link to this post

    Hi John,

    I've tried to reproduce the problem using code you've provided and using our latest binaries. All things seems to work just fine. The ellipses are resized properly.

    Could you, please, provide us with a small project demonstrating the reported issue? By doing so we will be able to further investigate the reasons behind the behavior.

    Thank you for your kind cooperation.

    Regards,
    Andrey Murzov
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. UI for WPF is Visual Studio 2017 Ready
  4. John
    John avatar
    7 posts
    Member since:
    Apr 2014

    Posted 14 May 2014 in reply to Andrey Link to this post

    I have attached a small project that replicates the issue. 

    Additionally, I am using the WPF controls version 2014.1.331.40 (2014 Q1 SP1).  I have not noticed a Q2 release yet...is that forthcoming?
  5. John
    John avatar
    7 posts
    Member since:
    Apr 2014

    Posted 14 May 2014 in reply to John Link to this post

    The attached png is actually a zip, so change png to zip to access the project.
  6. John
    John avatar
    7 posts
    Member since:
    Apr 2014

    Posted 23 May 2014 in reply to Andrey Link to this post

    I haven't heard back on this for a while, is there any further word?
  7. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1182 posts

    Posted 26 May 2014 Link to this post

    Hi John,

    Unfortunately we are unable to reproduce a problem using the project you sent. We've checked your solution and it works as expected on our side.
    As you can see on screenshots #6-8 the ellipse boundaries are at the same geographical positions. I.e. ellipse is resized properly according its geographical size and location.

    Regards,
    Pavel R. Pavlov
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  8. John
    John avatar
    7 posts
    Member since:
    Apr 2014

    Posted 27 May 2014 in reply to Pavel R. Pavlov Link to this post

    The pictures you show are exactly the problem I am having as you zoom in the ellipse has the same geographical boundaries and what I would expect to happen is for the ellipse to shrink in size.  Essentially, the ellipse should cover the same amount of area on the map regardless of the zoom.  This is the behavior you get when dealing with lines (strokethickness) and when using an informationlayer that displays ellipses.  Take the attached project as an example.  This demonstrates the behavior I would expect when using EllipseData.  As you zoom in the Ellipses shrink (or stay the same size and cover less geographical area). 

    Once again the png is a zip.
Back to Top
UI for WPF is Visual Studio 2017 Ready