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
860
Using GeographicScatterAreaSeries
posted

Hi

I want to show some weather data on my map and the GeographicScatterAreaSeries seems to be the way to go.

I have a dataset simular to this:

Lat              Lon              Wind

53,90899     2,135807     6

53,93641     2,125473     5,9

53,8842       2,112338     6,1

... and so on

Can you point me in the right direction on how to use the GeographicScatterAreaSeries for this?

I already tried to create a test class:

public class TestClass
{
   public Point P { get; set; }
   public double Wind { get; set; }
}

And then setting the datasource:

scatterSeries.ItemsSource = enumrableOfTestClass;
scatterSeries.ColorMemberPath = "Wind";
scatterSeries.LongitudeMemberPath = "P.X";
scatterSeries.LongitudeMemberPath = "P.Y";

But nothing shows on the map.

Do I need to use some TriangleSource? As far as I could read in the documentation this should not be nessesary?

Do you have any helper functions/hints to create a TriangleSource from this dataset described above?

Parents
No Data
Reply
  • 34810
    Verified Answer
    Offline posted

    Hello logimatic,

    Thank you for your post.

    I have been investigating into this issue you are seeing, and you are correct that it is not necessary to use a TriangleSource in the XamGeographicMap when implementing the GeographicScatterAreaSeries. I believe the issue here is that it doesn't appear that you are using a ColorScale for your GeographicScatterAreaSeries. I would recommend that you add a CustomPaletteColorScale object with the MinimumValue, MaximumValue, InterpolationMode, and Palette properties set, as seen in the code in the documentation article, here: http://help.infragistics.com/Help/Doc/WPF/2012.2/CLR4.0/html/xamGeographicMap_Using_Geographic_Scatter_Area_Series.html.

    Regarding the usage of TriangleSource, I would recommend that you take a look at this article in our online documentation about Triangulating Geographic Data: http://help.infragistics.com/Help/Doc/WPF/2012.2/CLR4.0/html/xamGeographicMap_Triangulating_Geographic_Data.html.

    There is also a possibility here that your data set is very large, in which the auto-triangulation in the XamGeographicMap has the ability to take a longer time to calculate. From the code you have provided me, it does appear that you are missing the ColorScale, though. If this is not the case, and you data set is indeed rather large, please let me know.

    I have attached a sample project to demonstrate the proper usage of a GeographicScatterAreaSeries. You will need to zoom in a little bit to be able to see the data plot, but currently this data is plotted in a triangular shape around the European cities of Paris, Berlin, and Amsterdam. I hope this helps you.

    Please let me know if you have any other questions or concerns on this matter.

    Sincerely,
    Andrew
    Associate Developer
    Infragistics Inc.
    www.infragistics.com/support

    XamGeoMapScatterAreaCase.zip
Children