Hi Support,
I am using Infragistics WinForms library (19.2.20192.476) in my .Net WinForms application created in C#. In one of the form of my application I am using UltraGeographicMap to show map. The datasource that I am assigning to map series, sometime contains duplicates points (same latitude and longitude) so on map its shows single point because duplicates points are stacked.
So in this scenario, My requirement to highlight duplicate points differently by assigning different marker.
Please advise me how I can highlight duplicate points so duplicates looks different then others
Thanks
Hello Brian,
Thank you for your update on this matter. I believe I further understand the behavior you are looking to achieve now. I will answer your new requirements in the order they were listed:
1. Set custom marker to the points: In order to set a custom marker to the points, you will need to use the MarkerTemplate mentioned in my response above. The GeographicSymbolSeries has a MarkerType property, but this will apply to all points in that particular series. The only way to change a MarkerType for other items is to either use a different series with a different MarkerType or use the MarkerTemplate property to define your own template for how the marker should be shown.
2. Points in the same series should have the same color: With the built-in markers, you can do this by setting the MarkerBrush and MarkerOutline properties. This will color all of the points the same if you are using the built-in markers. As mentioned above though, if you want duplicate points in the series to get a different marker, you will either need to use a separate series or the MarkerTemplate. The MarkerTemplate gives you full control of what colors you use for your defined template.
3. Ability to set tooltip for points: In order to do this in version 19.2, you need to set the ShowDefaultTooltip property of the series to “true” and handle the TooltipContentUpdating event of the series. This event allows you to return the Control you would like to show within the tooltip for a particular point plotted in the map. You can get the underlying data item for the point that is drawing its tooltip from the event arguments’ DataContext.Item property.
Please let me know if you have any other questions or concerns on this matter.
Hi Andrew,
Thanks for the sample application, it helped us mark the duplicate locations on map. However we have some additional functionalities that we want to use are not working in the sample application. In our application, we have series based on category (it is field in my datasource) and every series has configurable point color also series marker (type of infragistics's MarkerType) can be configured by user (marker would be same for all series).
So for example if category "ABC" has 10 points (locations) and color is set to green, all points would be shown in green with specified marker. Here some of points in "ABC" category may have duplicates points and for this, I wants to set different marker (type of MarkerType) but it would be same fill color as all other locations of "ABC" category has.
We want to achieve following:- Set custom marker to the points.- Points in the same series should have same color (we should be able to set the color at run time). Also the duplicate points in the series should get different marker. - Ability to set tootip for the points plotted on the map.
Thanking you.
I have been investigating into the behavior you are looking to achieve, and in order to highlight duplicate markers, I would recommend using a MarkerTemplate for the GeographicSymbolSeries so that you can define your own CustomRenderTemplate to modify the template that is shown. An alternative in this case is to utilize a separate GeographicSymbolSeries that contains your duplicate points.
I am attaching a sample project that demonstrates usage of a CustomRenderTemplate to provide a custom template. The red rectangles are duplicate points in the sample.
You may notice in the attached sample that there is a bit of commented code as well. This code is a 21.1 implementation of a simpler way to do this. Unfortunately, in version 19.2 the route to utilize the AssigningScatterMarkerStyle event of the series was not yet implemented.
UltraGeographicMapDuplicatePointsTest.zip