When I move the following code from my localhost, where it works perfectly, to our development server, the map does not load into the map control. I see the control on the page but no map. What am I not doing?
<UserControl 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" xmlns:igMap="clr-namespace:Infragistics.Silverlight.Map;assembly=Infragistics.Silverlight.DataVisualization.Map.v9.2" x:Class="SilverlightApplication2.MainPage" Width="900" Height="600"> <Grid x:Name="LayoutRoot" Background="White">
<Grid.ColumnDefinitions> <ColumnDefinition Width="0.323*"/> <ColumnDefinition Width="0.677*"/> </Grid.ColumnDefinitions> <igMap:XamWebMap x:Name="District" Height="200" Margin="8,0,8,19" VerticalAlignment="Bottom" Width="200" MapProjectionType="Equirectangular"> <igMap:XamWebMap.Projection> <PlaneProjection RotationX="-70" RotationY="20"/> </igMap:XamWebMap.Projection> <igMap:XamWebMap.Layers> <igMap:MapLayer x:Name="schooldistricts"> <igMap:MapLayer.Reader> <igMap:ShapeFileReader Uri="Shapefiles/tl_2008_41_unsd" /> </igMap:MapLayer.Reader> </igMap:MapLayer> </igMap:XamWebMap.Layers> </igMap:XamWebMap>
</Grid></UserControl>
Make sure you have the MIME types for the shp files set up:
http://forums.infragistics.com/blogs/devin_rader/archive/2009/04/30/configuring-mime-types-in-iis-for-use-with-xamwebmap.aspx
Devin
This was helpful, thank you.
I was trying to debug a project running on my local server, and this made the map part suddenly appear.
However - BEFORE I saw this I tried several times with test projects running in the development server to see what was going on, and kept failing. Is there something that needs to be done to the Visual Studio 2010 development server to make those work as well?
Hi jensfiederer,
As far as I can understand from your post, the issue, you are experiencing is that the shapefiles don't appear when you run the project in Debug mode, using VS2010 development server, right?
If this is the case, please, make sure that the shapefiles are located in the Client Bin, either as separate files or as a part of the .xap file and that the Uri of their location is correct.More information on how to get the shapefiles copied in the ClientBin is available in this post.
Hope that helps,Milana Zhileva