What is a Map control?

The Map control is the container in which the application displays your maps and data for 2D mapping and visualization. It displays webmaps and a collection of layers, which are primarily service based layers whether online or local plus other special layers such as media layers and Global Positioning System (GPS) layers. For best results when desigining your application, you must think about layer ordering, spatial reference and accelerated display before using the Map control.

Layer ordering

The order in which you place the layers in your map is very important. Layers are drawn in a particular order for a given map extent and map projection. They should be positioned with the basemap layer on the bottom, the operational layers, then the graphics layers on top.

When adding your layers in Extensible Application Markup Language (XAML), the layers are added in the map from the top of the XAML code to the bottom. For example, in the code snippet below, you will see that the Example Graphic layer is displayed on top of the arcGISLocalFeatureLayer layer, which in turn is on top of the World Topo Layer layer.

<esri:Map x:Name="MyMap" UseAcceleratedDisplay="True" Extent="-20014711, 15, 1656956, 12175318">
            <!-- ArcGIS Online Tiled Basemap Layer -->
            <esri:ArcGISTiledMapServiceLayer ID="World Topo Map" 
                       Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"/>
            <esri:ArcGISLocalFeatureLayer ID="arcGISLocalFeatureLayer"
                      Path="C:\Program Files (x86)\ArcGIS SDKs\WPF10.2.5\sdk\samples\data\mpks\USCitiesStates.mpk" 
                      LayerName="States"/>
            <esri:GraphicsLayer ID="Example Graphic">
                <esri:Graphic>
                    <esri:Graphic.Symbol>
                        <esri:SimpleMarkerSymbol Style="Circle" Color="Red"/>
                    </esri:Graphic.Symbol>
                    <esri:Graphic.Geometry>
                        <esri:MapPoint  X="-10000000" Y="5000000" >
                            <esri:MapPoint.SpatialReference>
                                <esri:SpatialReference WKID="102100"/>
                            </esri:MapPoint.SpatialReference>
                        </esri:MapPoint>
                    </esri:Graphic.Geometry>
                </esri:Graphic>
            </esri:GraphicsLayer>
</esri:Map>

Spatial reference

The Map control has a single spatial reference and does not itself support reprojection on-the-fly of layers that are rendered map images. Client-side graphics layers and layers that derive from the graphics layer such as feature layers, can be reprojected in the client. Unless explicitly set, the map spatial reference will be that of the first layer added and the extent will be the full extent of that layer. An extent can also be defined for the map to ensure the user starts in a familiar location.

Accelerated display

The Map control supports accelerated display. In Windows Presentation Foundation (WPF), accelerated display is a property on the Map control that can be turned on or off.You must think about the Map control and accelerated display, and future deployments of your applications. You must ensure that the machine using the application has the required specifications for optimal performance.

1/27/2015