AcceleratedDisplay preventing graphics display in very simple application?

381
1
10-04-2013 09:24 AM
Labels (1)
RickCote
New Contributor
The following is the generated MainWindow.xaml for an WCF runtime aplication that simply shows a
red dot on a blank map control. Works just fine.

Why, when I set UseAcceleratedDisplay="True", do I see nothing on the map control?

Thanks,
Rick


<Window x:Class="ArcGISWpfApplication1.MainWindow"
     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"
        Title="MainWindow" Height="350" Width="525">
    <Grid> 
        <esri:Map x:Name="_map" UseAcceleratedDisplay="False">
            <!-- ArcGIS Online Tiled Basemap Layer -->
            <!--<esri:ArcGISTiledMapServiceLayer ID="World Topo Map"
                       Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"/>-->

            <!-- Local Tiled Basemap Layer -->
            <!--<esri:ArcGISLocalTiledLayer ID="Topographic USA" Path="C:\Program Files (x86)\ArcGIS SDKs\WPF10.1.1\SDK\Samples\Data\TPKs\Topographic.tpk"/>-->

            <!-- ArcGIS Online Dynamic Map Service Layer -->
            <!--<esri:ArcGISDynamicMapServiceLayer ID="USA Demographic"
                      Url="http://services.arcgisonline.com/ArcGIS/rest/services/Demographics/USA_Recent_Population_Change/MapS..."/>-->

            <!--Local Dynamic Layer-->
            <!--<esri:ArcGISLocalDynamicMapServiceLayer ID="USA" Path="C:\Program Files (x86)\ArcGIS SDKs\WPF10.1.1\SDK\Samples\Data\MPKs\USCitiesStates.mpk"/>-->

            <!-- Online Editable FeatureLayer -->
            <!--<esri:FeatureLayer ID="Fire Incidents"
                      Url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Fire/Sheep/FeatureServer/0"
                                />-->

            <!--Local Feature Layer-->
            <!--<esri:ArcGISLocalFeatureLayer ID="arcGISLocalFeatureLayer"
                      Path="C:\Program Files (x86)\ArcGIS SDKs\WPF10.1.1\SDK\Samples\Data\MPKs\USCitiesStates.mpk"
                      LayerName="States"/>-->

            <!--Graphics Layer-->
            <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="0" Y="0" >
                            <esri:MapPoint.SpatialReference>
                                <esri:SpatialReference WKID="102100"/>
                            </esri:MapPoint.SpatialReference>
                        </esri:MapPoint>                   
                        </esri:Graphic.Geometry>                 
                </esri:Graphic>
            </esri:GraphicsLayer>
        </esri:Map>
    </Grid>
</Window>
0 Kudos
1 Reply
DavidLednik
Occasional Contributor II
Hi Rick,

We're aware of the issue. Map control gets it's spatial reference from the first layer added to the control which is usually the underlying basemap. It's something we're looking to fix in the new Runtime SDK for .NET

For now I would suggest to load a dummy layer with the spatialreference you need and unload the layer once the map is initialized.
After that you should be able to use graphicslayers with out a problem.

Regards,
David
0 Kudos