Hello,
I have a series of points that I would like to use to plot a shape (polygon) on the ultraGeographicMap control for WindowsForms.
I would like to do this dynamically in code, so I can not use a shape file.
I would like something like the following:
I am currently plotting points in the following way:
private void PlotShape(List<LatitudeLongitude> pointsToDraw) { var series = new GeographicSymbolSeries() { LongitudeMemberPath = "X", LatitudeMemberPath = "Y", MarkerType = MarkerType.Circle, }; var brush = new SolidColorBrush(); brush.Color = Color.WhiteSmoke; series.Brush = brush; series.MarkerBrush = brush; var outline = new SolidColorBrush(); outline.Color = Color.FromArgb(21, 115, 255); series.MarkerOutline = outline; series.IsHighlightingEnabled = true; series.MouseOverEnabled = true; series.Thickness = 0.5; var geoLocations = new List<Infragistics.Win.DataVisualization.Point>(); foreach (var point in pointsToDraw) { var infraPoint = new Infragistics.Win.DataVisualization.Point() { X = point.DoubleLongitude, Y = point.DoubleLatitude }; geoLocations.Add(infraPoint); } series.DataSource = geoLocations; this.ultraGeographicMap1.Series.Add(series); }
How can I create a shape, using these points, and fill it in?
Please review the following attachment.
GeoMapLineColors.zip
At the moment I can't get this working in Windows Forms. The sample above is in WPF.