Select to view content in your preferred language

Can't add ElementLayer when UsAcceleratedDisplay=True, 10.1.1

1003
2
Jump to solution
01-24-2013 12:26 PM
Labels (1)
KeithMacIntyre
Deactivated User
When in Accelerated Display Mode, an Element Layer can't be added, even outside the AcceleratedDisplayLayers Group.  GraphicsLayers can be added correctly.  According to the release notes, it should be allowed to be added outside the AcceleratedDisplayLayers Group

Code posted below exception

NotImplemented Exception

ElementLayer support not implemented for native rendering. Layer ID: Elements

   at ESRI.ArcGIS.Client.Runtime.NativeLayer.Create(Layer layer, RequestQueue queue)
   at ESRI.ArcGIS.Client.NativeMap.AddLayer(Int32 index, Layer layer)
   at ESRI.ArcGIS.Client.DrawingSurface.AddLayer(Int32 index, Layer layer)
   at ESRI.ArcGIS.Client.DrawingSurface.FindIndexAndAddLayer(Layer layer, IList`1 collection)
   at ESRI.ArcGIS.Client.Map.TryAddLayerToDrawSurface(Layer layer)
   at ESRI.ArcGIS.Client.Map.layer_Initialized(Object sender, EventArgs e)
   at System.EventHandler`1.Invoke(Object sender, TEventArgs e)
   at ESRI.ArcGIS.Client.Layer.OnInitialized(EventArgs e)
   at ESRI.ArcGIS.Client.Layer.Initialize()
   at ESRI.ArcGIS.Client.Map.OnApplyTemplate()
   at System.Windows.FrameworkElement.ApplyTemplate()


<Window x:Class="ESRI_10._1._1_Test.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="800" Width="1000" Loaded="Window_Loaded_1">
    <Grid>
       
        <esri:Map UseAcceleratedDisplay="True" x:Name="MyMap">
            <esri:AcceleratedDisplayLayers >
                <esri:ArcGISTiledMapServiceLayer ID="World Topo Map"
                    Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"/>
            </esri:AcceleratedDisplayLayers>
            <esri:ElementLayer ID="Elements"></esri:ElementLayer>
            <esri:GraphicsLayer ID="Graphics"></esri:GraphicsLayer>
        </esri:Map>
    </Grid>
</Window>
0 Kudos
1 Solution

Accepted Solutions
KerrieScholefield
Deactivated User
Hi,

In the code example provided the map is also defined as accelerated. If you remove UseAcceleratedDisplay="True" or change to UseAcceleratedDisplay="False" as shown in the code below the element layer should be added successfully. 

         <esri:Map UseAcceleratedDisplay="False" x:Name="MyMap">             <esri:AcceleratedDisplayLayers >                 <esri:ArcGISTiledMapServiceLayer ID="World Topo Map"  Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"/>             </esri:AcceleratedDisplayLayers>             <esri:ElementLayer ID="Elements"></esri:ElementLayer>             <esri:GraphicsLayer ID="Graphics"></esri:GraphicsLayer>         </esri:Map>




Cheers,

Kerrie

View solution in original post

0 Kudos
2 Replies
KerrieScholefield
Deactivated User
Hi,

In the code example provided the map is also defined as accelerated. If you remove UseAcceleratedDisplay="True" or change to UseAcceleratedDisplay="False" as shown in the code below the element layer should be added successfully. 

         <esri:Map UseAcceleratedDisplay="False" x:Name="MyMap">             <esri:AcceleratedDisplayLayers >                 <esri:ArcGISTiledMapServiceLayer ID="World Topo Map"  Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"/>             </esri:AcceleratedDisplayLayers>             <esri:ElementLayer ID="Elements"></esri:ElementLayer>             <esri:GraphicsLayer ID="Graphics"></esri:GraphicsLayer>         </esri:Map>




Cheers,

Kerrie
0 Kudos
KeithMacIntyre
Deactivated User
I was under the impression that we need the UseAcceleratedDisplay property to be true to have any accelerated layers.  Thank you.

Unfortunately, this still does not solve our problem, because the reason we needed the Accelerated Display was for the new MGRS grid line feature, and the following setting only works if the map's UseAcceleratedDisplay property is set to true.  It would be better if the MGRS grid lines were in a layer rater than a setting.

<esri:Map UseAcceleratedDisplay="True" x:Name="MyMap">
            <esri:Map.AcceleratedDisplay>
                <esri:AcceleratedDisplaySettings GridType="MGRS"></esri:AcceleratedDisplaySettings>
            </esri:Map.AcceleratedDisplay>
            <esri:AcceleratedDisplayLayers >
                <esri:ArcGISTiledMapServiceLayer ID="World Topo Map"  
                    Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Topo_Map/MapServer"/>
                <esri:MessageLayer SymbolDictionaryType="Mil2525C" x:Name="MilitaryLayer" Initialized="MilitaryLayer_Initialized" ></esri:MessageLayer>
            </esri:AcceleratedDisplayLayers>
        </esri:Map>
0 Kudos