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
460
GeographicShapeSeries Markertemplate add textblock
posted

I have this GeographicShapeSeries component and I would like the add a TextBlock to the DataTemplate but I'm getting a cast exception when I try 

GeographicShapeSeries series = new GeographicShapeSeries()
{
ItemsSource = data,
MarkerTemplate = new DataTemplate(),
ShapeMemberPath = "Points",
Brush = brush,
BorderBrush = Brushes.MediumBlue,
ToolTip = "DæknigsGrad " + s.properties.maxDaekningTal + " PostBy " + s.properties.POSTBYNAVN + " Post nr " + s.properties.POSTNR_TXT

};

Parents
No Data
Reply
  • 34810
    Offline posted

    Hello Thomas,

    From your code-snippet, I am little unsure why you are seeing a cast exception, but I am attaching a sample project to demonstrate how you can modify the MarkerTemplate of a GeographicShapeSeries in the Infragistics for WPF XamGeographicMap. I hope this helps you.

    Please note that in the sample, the .shp and .dbf files are using an absolute URI as that is what is expected for the ShapeDataSource, and so you will need to change them to the file paths on your machine accordingly.

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

    XamGeoMapMarkerTemplateDemo.zip

Children