MapEllipse SetView Does not specify the location

0 Answers 36 Views
Map
Ohad
Top achievements
Rank 3
Bronze
Iron
Iron
Ohad asked on 15 Nov 2022, 10:35 AM | edited on 15 Nov 2022, 10:42 AM

When I create a MapPolygon and then I call SetView with the GeoBounds I get the correct zoom and center.

var polygon = new MapPolygon
{
    Points = points,
    ToolTip = toolTip,
    ShapeFill = new MapShapeFill
    {
        Stroke = new SolidColorBrush(Colors.Blue),
        StrokeThickness = 2,
        Fill = new SolidColorBrush(Color.FromArgb(0x5A, 0x80, 0x80, 0x80))
    }
};
RadMap.SetView(polygon.GeoBounds);

But when I create a MapEllipse and call SetView I get ZoomLevel = 1 and I don't understand why

var ellipse = new MapEllipse
{
    Width = (double)radius * 2,
    Height = (double)radius * 2,
    Stroke = new SolidColorBrush(Colors.Blue),
    StrokeThickness = 2,
    Fill = new SolidColorBrush(Color.FromArgb(0x5A, 0x80, 0x80, 0x80)),
    Location = points.ElementAt(0),
};
MapLayer.SetHotSpot(ellipse, new HotSpot { X = 0.5, Y = 0.5 });
RadMap.SetView(ellipse.GeoBounds);

Would appreciate help

No answers yet. Maybe you can help?

Tags
Map
Asked by
Ohad
Top achievements
Rank 3
Bronze
Iron
Iron
Share this question
or