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