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?
Hello DJ,
Can you try using a GeographicShapeSeries and use the same geoLocations and form a datasource? The DataSource forr the shape series needs each object to have at least one data column that stores the longitude and latitude which you are already providing.
https://es.infragistics.com/help/winforms/geographicmap-using-geographic-shape-series
I don't know how to work with shape series, can you provide an example?I tried the following which had no effect:
// create and set data binding to the GeographicShapeSeries var geoSeries = new GeographicShapeSeries(); geoSeries.DataSource = geoLocations; geoSeries.ShapeMemberPath = "Points"; // add the GeographicShapeSeries to the the UltraGeographicMap this.ultraGeographicMap1.Series.Add(geoSeries);
I am going to work on building a sample today. I will follow up when I have a demo to provide.
Thanks! Looking forward to it!