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
60
XamGeographicMap cannot load shape file
posted

I tried the example from http://www.infragistics.com/community/blogs/mihail_mateev/archive/2011/11/07/introduction-to-infragistics-geographic-map.aspx

It shows the map control only without shapefile. I put the shapefile under "ClientBin\ShapeFiles\Cntry00" folder. I've updated the referenced DLL to the latest ones.

Is any thing wrong here? Thanks.

Here is the code:

<UserControl x:Class="XamGeographicMapDemo.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

xmlns:d="http://schemas.microsoft.com/expression/blend/2008"

xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"

mc:Ignorable="d"

d:DesignHeight="300" d:DesignWidth="400" xmlns:ig="http://schemas.infragistics.com/xaml">

<Grid x:Name="LayoutRoot" Background="White">

<Grid.Resources>

<RadialGradientBrush x:Key="mapBackground">

<GradientStop Color="#FFD4D4D4" Offset="1" />

<GradientStop Color="White" />

</RadialGradientBrush>  

<ig:BrushCollection x:Key="shapeBrushes">

<SolidColorBrush Color="#FF38A3D6" />

<SolidColorBrush Color="#FF134157" />

</ig:BrushCollection>

<ig:RandomFillStyleSelector x:Key="shapeStyleSelector" Brushes="{StaticResource shapeBrushes}" />         

<ig:ShapefileConverter x:Key="shapeFileSource"

ImportCompleted="OnShapefileImportCompleted"                                

ShapefileSource="/ClientBin/ShapeFiles/Cntry00/cntry00.shp"

DatabaseSource="/ClientBin/ShapeFiles/Cntry00/cntry00.dbf" />

</Grid.Resources>

<ig:XamGeographicMap HorizontalAlignment="Stretch" Margin="20" Name="xamGeographicMap1" Background="{StaticResource mapBackground}" VerticalAlignment="Stretch"

OverviewPlusDetailPaneVisibility="Visible" >

<ig:XamGeographicMap.BackgroundContent>

<ig:OpenStreetMapImagery Opacity="0" />

 

</ig:XamGeographicMap.BackgroundContent>

<ig:XamGeographicMap.Series>

<ig:GeographicShapeSeries ItemsSource="{StaticResource shapeFileSource}"

ShapeStyleSelector="{StaticResource shapeStyleSelector}"

ShapeMemberPath="Points" >

<ig:GeographicShapeSeries.MarkerTemplate>

<DataTemplate>

<TextBlock Text="{Binding Item.Fields[CNTRY_NAME]}" Foreground="White" />

</DataTemplate>                  

</ig:GeographicShapeSeries.MarkerTemplate>             

</ig:GeographicShapeSeries>         

</ig:XamGeographicMap.Series>

</ig:XamGeographicMap>

</Grid>

</UserControl>

Parents Reply Children
No Data