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
Freezing ultraGeographicMap Control
posted

Hello,

I have add an ultraGeographicMap control to our form.

It appears to cause slowness and hanging of our application.

This hanging happens either when loading a new position into the map and centering on it, or when zooming in or out.

Is there anything that can be done to prevent the application from loosing responsiveness?

I have implemented the map as follows:

public void PlotPoints(List<LatitudeLongitude> points, bool centerOn = false, double scaleFactor = 0.1)
        {
            var template = new CustomRenderTemplate();
            template.Render = new DataTemplateRenderHandler(templateRenderHandler);

            var series = new GeographicSymbolSeries()
            {
                LongitudeMemberPath = "X",
                LatitudeMemberPath = "Y",
                MarkerTemplate = template
            };

            var brush = new Infragistics.Win.DataVisualization.SolidColorBrush();
            brush.Color = System.Drawing.Color.WhiteSmoke;
            series.Brush = brush;
            series.MarkerBrush = brush;

            var outline = new Infragistics.Win.DataVisualization.SolidColorBrush();
            outline.Color = System.Drawing.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 points)
            {
                var infraPoint = new Infragistics.Win.DataVisualization.Point() { X = point.DoubleLongitude, Y = point.DoubleLatitude };
                geoLocations.Add(infraPoint);
            }

            series.DataSource = geoLocations;
            this.ultraGeographicMap1.Series.Add(series);

            // if only one point passed in, center on the given position - not sure if this is correct - should probably be in own method?
            if (centerOn && points.Count == 1)
            {
                this.CentreOnPoint(points.First().DoubleLongitude, points.First().DoubleLatitude, scaleFactor);
            }
}

Parents Reply Children
No Data