Hello!
I've been evaluating the xamMap and I have a problem with projection, the layer from my shapefile is not where it's suposed to be and it also seems smaller than it should be. The shapefile works fine in Arcgis explorer, it also works fine in Telerik's map component after beeing converted to kml.
The shape file wont display at all if I don't add the <igMap:SphericalMercator /> in the shapefile reader. And it looks like to me that the projection on the shapefile is of that type.
If I set the MapProjectionType to Equirectangular the shapefile display, but then the openstreetmap doesnt.
I have not been able to try this using Bing's free maps instead of openstreetmap since I can't find any help on how to do that when you don't have a username and password for bing that you get with the pay version.
//Thomas
My code is as below
<igMap:XamMap
Grid.Column="0"
MapProjectionType="SphericalMercator"
HorizontalAlignment="Left"
Name="xamMap1"
VerticalAlignment="Top"
Width="600"
Height="836"
ElementClick="xamMap1_ElementClick"
IsClickable="True"
ViewportBackground="Transparent" BorderBrush="Black" BorderThickness="2" >
<igMap:XamMap.MapTileSource>
<igMap:OpenStreetMapTileSource x:Name="openStreetsTileSource" />
</igMap:XamMap.MapTileSource>
<igMap:XamMap.Layers>
<igMap:MapLayer.Reader>
<igMap:ShapeFileReader Uri="../Shapefiles/Sweden_county07">
<igMap:ShapeFileReader.CoordinateSystem>
<igMap:CoordinateSystem>
<igMap:CoordinateSystem.Projection>
<igMap:SphericalMercator />
</igMap:CoordinateSystem.Projection>
</igMap:CoordinateSystem>
</igMap:ShapeFileReader.CoordinateSystem>
</igMap:ShapeFileReader>
</igMap:MapLayer.Reader>
</igMap:MapLayer>
</igMap:XamMap.Layers>
</igMap:XamMap>
Hi, just to check first, is your code running something like the InitMapCoordinates function from this how to guide?
http://help.infragistics.com/NetAdvantage/DV/2010.2/CLR4.0/?page=xamWebMap_Add_Open_Street_Maps_as_Geo-Imagery_Data_Source.html
-Graham
Nope, just adding 1 shapefile as shown in xaml, it seems the openstreetmap always show just that depending on the mapProjectionType the xamMap pan to show the shapefile layeres and that can be way off from the world map that openstreetmap shows.
If it is world map coordinates I need to set to get openStreetMap to work with my shapefiles how exactly do I know how to set those? If I use the settings in the example you linked to my shapefiles still doesn't fit correctly on the map.
It looks like the shapefile use Bessel_1841 the xamMap cannot unproject this and project to wgs80?