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?
Oups! I was sharing same ShapeStyleSelector among two series. Never mind, it works now.
Thanks,
Vasu.
Hi Ivan Kotev,
I have the same trouble here, I'm trying with US state shape files downloaded from here : http://www.census.gov/cgi-bin/geo/shapefiles2011/main
Can you help me figure it out?
Hi SBASupport,
This exception is raised when XamMap cannot read correctly the shapefiles. Could you please send us the shapefiles so we can investigate the issue?
Ivan Kotev