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); } }
It seems to freeze when switching to a lower detail level:
Hello Dj,
My team and I have done an initial investigation into this post, and I am curious about the contents of your “templateRenderHandler” that is being passed into the DataTemplateRenderHandler, and whether it may be doing anything expensive. I ask, as each time you zoom in, out, or load a new position on the map, the contents of this DataTemplateRenderHandler will be evaluated.
Something you might be able to do as a simple test is to comment out the setting of the MarkerTemplate to your CustomRenderTemplate. If the hanging still exists, this eliminates this as the cause, but if it does, this tells us that this would be the cause, and I will need to see the “templateRenderHandler” in this case to be able to tell what may be wrong.
Please let me know if you have any other questions or concerns on this matter.