Hi,
I am trying to draw a sequare using the MapRectangle control.The sample I found at this post (http://www.telerik.com/community/forums/wpf/map/draw-square.aspx) is throwing exception at the highlighted line:
The exception is "Object reference not set to an instance of an object" and it is because this.MapCanvas is null.
Any help will be highly appreciated.
Madani
I am trying to draw a sequare using the MapRectangle control.The sample I found at this post (http://www.telerik.com/community/forums/wpf/map/draw-square.aspx) is throwing exception at the highlighted line:
private void SetShapeParameters() { if (this.MapControl != null) { Rectangle rect = this.Shape as Rectangle; Size size = this.MapCanvas.GetPixelSize(this.Location, this.RadiusX, this.RadiusY); if (!double.IsNaN(size.Width) && !double.IsInfinity(size.Width)) { rect.RadiusX = size.Width; } if (!double.IsNaN(size.Height) && !double.IsInfinity(size.Height)) { rect.RadiusY = size.Height; } } }The exception is "Object reference not set to an instance of an object" and it is because this.MapCanvas is null.
Any help will be highly appreciated.
Madani