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
115
XamMap v2010.2
posted

I'm trying to display the usa_st shape file in your example, I can display this map in v2010.1 so I'm sure the shape file is good.  The usa_st shp and dbf files are in a folder ShapeFiles.  I have tried all paths, foward slash, back slash, no begining slash.  Please help....Thank you 

 <Window x:Class="MapTest.MainWindow"

 

 

 

   xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"

 

 

 

   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

 

 

 

   xmlns:igMap="clr-namespace:Infragistics.Controls.Maps;assembly=InfragisticsWPF4.Controls.Maps.XamMap.v10.2"

 

 

 

   Title="MainWindow" Height="600" Width="800">

 

 

 

 

<Grid x:Name="MainGrid">

 

 

 

 

   <igMap:XamMap x:Name="xamMap" >

 

 

 

 

      <igMap:XamMap.Layers>

 

 

 

 

         <igMap:MapLayer x:Name="statesLayer">

 

 

 

 

            <igMap:MapLayer.Reader>

 

 

 

 

 

               <!--<igMap:ShapeFileReader Uri="/ShapeFiles/usa_st"             DataMapping="caption=STATE_ABBR"/>-->

 

 

 

 

 

             <igMap:ShapeFileReader Uri="/ShapeFiles/usa_st" />

 

 

 

 

 

            </igMap:MapLayer.Reader>

 

 

 

 

       </igMap:MapLayer>

 

 

 

 

 

    </igMap:XamMap.Layers>

  </igMap:XamMap>

 

 

</Grid>

</

 

 

Window>

 

 

Parents
  • 17605
    posted

    In WPF Map v10.2 when ShapeFileReader.Uri starts with “/” the control is not looking for project resources like before. Now it is looking for files, relative to the executable file.

    If your shape files are in /project/ShapeFiles/usa_st, and your executable is in /project/bin/debug/

    You need to set this path:

    <igMap:ShapeFileReader Uri="/../../ShapeFiles/usa_st" />

Reply Children