Define Map Projection Online

This sample demonstrates how to define the map projection of layers in the map. The extent property of the map is set to an envelope. The envelope's projection id (WKID) defines the spatial reference for the map and reprojects the local dynamic layer for display in the map. Tiled map service layers will not (should not) be reprojected on the fly. For optimal performance, confirm that the tiled map service layers have the same spatial reference as that defined for the map.

Download Sample Application
XAML C# VB.NET
<UserControl x:Class="ArcGISWPFSDK.DefineMapProjection"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:esri="http://schemas.esri.com/arcgis/client/2009" >
    <Grid x:Name="LayoutRoot">
        <esri:Map x:Name="MyMap" Background="#FFE3E3E3" >
            <esri:Map.Extent>
                <esri:Envelope XMin="661140" YMin="-1420246" XMax="3015668" YMax="1594451" >
                    <esri:Envelope.SpatialReference>
                        <esri:SpatialReference WKID="26777"/>
                    </esri:Envelope.SpatialReference>
                </esri:Envelope>
            </esri:Map.Extent>
            <esri:Map.Layers>
                <esri:ArcGISDynamicMapServiceLayer ID="DynamicLayer1"
                    Url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer"/>
                <esri:ArcGISDynamicMapServiceLayer ID="DynamicLayer2"
                    Url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Petroleum/KGS_OilGasFields_Kansas/MapServer"/>
            </esri:Map.Layers>
        </esri:Map>
    </Grid>
</UserControl>

Sample code usage restrictions
5/16/2014