Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
260
Plot Polygon On UltraGeographicMap Using Series Of Points
posted

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?

Parents
No Data
Reply Children