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
145
Corrupt shape files
posted

Hi there,

I am receiving the following error message when I try and run a Silverlight page that uses the xamMap control:

Message: System.Exception: Corrupt Shp file - failed to read PolyLineZ. at Infragistics.Controls.Maps.ShapeFileUtil.ReadShape(Header shapeHeader, BinaryReader shpReader, BinaryReader dbfReader) at Infragistics.Controls.Maps.ShapeFileReader.Import()

My XAML is: 

<ig:XamMap x:Name="Map" IsAutoWorldRect ="False">
<ig:XamMap.Layers>
  <ig:MapLayer x:Name="stationsLayer2" IsVisible="True">
   <ig:MapLayer.Reader>
     <ig:ShapeFileReader Uri="ShapeFiles/Alignment_keymap"/>
   </ig:MapLayer.Reader>
  </ig:MapLayer>
</ig:XamMap.Layers>  

<ig:MapNavigationPane Margin="15" VerticalAlignment="Top" ig:XamDock.Edge="InsideRight" /> 

<ig:MapThumbnailPane Width="200" Height="100" HorizontalAlignment="Center" Margin="15" Background="Transparent" HorizontalContentAlignment="Center" ig:XamDock.Edge="InsideBottom" ig:XamDock.HorizontalDockAlignment="Left" />

</ig:XamMap>

The error message mentions a corrupt shape file, however, I can open up the shape file in other packages such as MapWindow with no problems.  In fact I have only managed to get the xamMap control to work with the sample shape files provided by Infragistics.  I have other shape files that I can view when I use MapWindow, but yet they appear blank when I open them in the xamMap control.  What's the problem here?  Do shape files to be used by the xamMap control have to be in a special format?