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?
Windows Forms controls do not support true transparency. The background of a transparent Windows Forms control is painted by its parent.
Although this will work in WPF by setting the Opacity property on the series.
Thanks for the help, that was exactly what I needed.One last question, any change I can make the shape semi opaque? (I'm guessing not after reading the docs on the brushes, but worth asking...)
I was setting the datasource too early. Please see this sample in Windows Forms.
CustomShapeMap (2).zip
At the moment I can't get this working in Windows Forms. The sample above is in WPF.
Please review the following attachment.
GeoMapLineColors.zip